<ILLinkArgs>$(ILLinkArgs) -v true</ILLinkArgs>
<!-- don't remove the embedded root xml resource since ILLink may run again on the assembly -->
<ILLinkArgs>$(ILLinkArgs) --strip-resources false</ILLinkArgs>
- <!-- reflection heuristics to apply -->
- <ILLinkArgs>$(ILLinkArgs) -h LdtokenTypeMethods,InstanceConstructors</ILLinkArgs>
</PropertyGroup>
<MakeDir Directories="$(ILLinkTrimInputPath)" />
<!-- Methods is used by VS Tasks Window. -->
<method name="GetActiveTaskFromId" />
</type>
+ <type fullname="System.Collections.Generic.GenericArraySortHelper`1">
+ <!-- Instantiated via reflection -->
+ <method name=".ctor" />
+ </type>
+ <type fullname="System.Collections.Generic.GenericArraySortHelper`2">
+ <!-- Instantiated via reflection -->
+ <method name=".ctor" />
+ </type>
<!-- Accessed via private reflection by tracing controller. -->
<type fullname="System.Diagnostics.Tracing.EventPipe*" />
<!-- Accessed via private reflection and by native code. -->
<type fullname="System.Diagnostics.Tracing.RuntimeEventSource" />
+ <type fullname="System.Diagnostics.Tracing.NativeRuntimeEventSource" />
<!-- Accessed via reflection in TraceLogging-style EventSource events. -->
<type fullname="*f__AnonymousType*" />
+ <type fullname="System.Diagnostics.Tracing.PropertyValue/ReferenceTypeHelper`1">
+ <!-- Instantiated via reflection -->
+ <method name=".ctor" />
+ </type>
<!-- Accessed via native code. -->
<type fullname="System.Runtime.InteropServices.ComTypes.IEnumerable" />
<type fullname="System.Runtime.InteropServices.CustomMarshalers.*" />
<!-- Accessed by the WinRT Host -->
<type fullname="Internal.Runtime.InteropServices.WindowsRuntime.ActivationFactoryLoader" />
+ <!-- Workaround for https://github.com/mono/linker/issues/378 -->
+ <type fullname="System.Runtime.InteropServices.IDispatch" />
+ <type fullname="Internal.Runtime.InteropServices.IClassFactory2" />
</assembly>
</linker>
<data name="Serialization_MissingValues" xml:space="preserve">
<value>The values for this dictionary are missing.</value>
</data>
- <data name="Serialization_NonSerType" xml:space="preserve">
- <value>Type '{0}' in Assembly '{1}' is not marked as serializable.</value>
- </data>
<data name="Serialization_NoParameterInfo" xml:space="preserve">
<value>Serialized member does not have a ParameterInfo.</value>
</data>
return -1;
}
-#if false // This routine is not needed at all, it was used for unit test debugging.
- [Conditional("DEBUG")]
- private static void OutputDebugString(string msg)
- {
-#if !ES_BUILD_PCL
- msg = msg.TrimEnd('\r', '\n') +
- string.Format(CultureInfo.InvariantCulture, ", Thrd({0})" + Environment.NewLine, Environment.CurrentManagedThreadId);
- System.Diagnostics.Debugger.Log(0, null, msg);
-#endif
- }
-#endif
-
/// <summary>
/// Sends an error message to the debugger (outputDebugString), as well as the EventListeners
/// It will do this even if the EventSource is not enabled.
private bool ThrowOnEventWriteErrors
{
get { return (m_config & EventSourceSettings.ThrowOnEventWriteErrors) != 0; }
- set
- {
- if (value) m_config |= EventSourceSettings.ThrowOnEventWriteErrors;
- else m_config &= ~EventSourceSettings.ThrowOnEventWriteErrors;
- }
}
private bool SelfDescribingEvents
((m_config & EventSourceSettings.EtwSelfDescribingEventFormat) != 0));
return (m_config & EventSourceSettings.EtwSelfDescribingEventFormat) != 0;
}
- set
- {
- if (!value)
- {
- m_config |= EventSourceSettings.EtwManifestEventFormat;
- m_config &= ~EventSourceSettings.EtwSelfDescribingEventFormat;
- }
- else
- {
- m_config |= EventSourceSettings.EtwSelfDescribingEventFormat;
- m_config &= ~EventSourceSettings.EtwManifestEventFormat;
- }
- }
}
// private instance state
fixedCount,
null)
{
- return;
}
/// <summary>
checked((ushort)(custom == null ? 0 : custom.Length)),
custom)
{
- return;
}
private FieldMetadata(
namespace System.Runtime.Serialization
{
- // SafeSerializationEventArgs are provided to the delegates which do safe serialization. Each delegate
- // serializes its own state into an IDeserializationCallback instance which must, itself, be serializable.
- // These indivdiual states are then added to the SafeSerializationEventArgs in order to be saved away when
- // the original ISerializable type is serialized.
+ // This type exists for public surface compatibility only.
public sealed class SafeSerializationEventArgs : EventArgs
{
- private readonly List<object> _serializedStates = new List<object>();
-
- internal SafeSerializationEventArgs() { }
+ private SafeSerializationEventArgs() { }
public void AddSerializedState(ISafeSerializationData serializedState)
{
- if (serializedState == null)
- throw new ArgumentNullException(nameof(serializedState));
- if (!serializedState.GetType().IsSerializable)
- throw new ArgumentException(SR.Format(SR.Serialization_NonSerType, serializedState.GetType(), serializedState.GetType().Assembly.FullName));
-
- _serializedStates.Add(serializedState);
}
public StreamingContext StreamingContext { get; }
ref StackCrawlMark stackMark,
AssemblyBuilderAccess access);
- private class AssemblyBuilderLock { }
+ private static readonly object s_assemblyBuilderLock = new object();
internal static AssemblyBuilder InternalDefineDynamicAssembly(
AssemblyName name,
ref StackCrawlMark stackMark,
IEnumerable<CustomAttributeBuilder>? unsafeAssemblyAttributes)
{
- lock (typeof(AssemblyBuilderLock))
+ lock (s_assemblyBuilderLock)
{
// We can only create dynamic assemblies in the current domain
return new AssemblyBuilder(name,
DEFINE_CLASS(SAFE_TYPENAMEPARSER_HANDLE, System, SafeTypeNameParserHandle)
+DEFINE_METHOD(SAFE_TYPENAMEPARSER_HANDLE, CTOR, .ctor, IM_RetVoid)
DEFINE_CLASS(SECURITY_EXCEPTION, Security, SecurityException)
GCPROTECT_BEGIN(objSafeHandle);
objSafeHandle = (SAFEHANDLE)AllocateObject(MscorlibBinder::GetClass(CLASS__SAFE_TYPENAMEPARSER_HANDLE));
- CallDefaultConstructor(objSafeHandle);
+
+ MethodDescCallSite strCtor(METHOD__SAFE_TYPENAMEPARSER_HANDLE__CTOR);
+
+ ARG_SLOT args[1] =
+ {
+ ObjToArgSlot(objSafeHandle)
+ };
+
+ strCtor.Call(args);
this->AddRef();
objSafeHandle->SetHandle(this);