56 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2067:UnrecognizedReflectionPattern", Justification =
"Only the parameterless ctor is referenced on proxyBaseType. Other members can be trimmed if unused.")]
75 string name =
type.Assembly.GetName().Name;
99 internal void Get(
int i)
292 for (
int i = 0; i <
array.Length; i++)
301 for (
int j = 0;
j <
array.Length;
j++)
392 select p.ParameterType).ToArray());
430 for (
int i = 0; i < parameters.Length; i++)
436 if (
mi.ContainsGenericParameters)
454 for (
int l = 0;
l < parameters.Length;
l++)
456 if (!parameters[
l].IsOut || !parameters[
l].ParameterType.IsByRef || parameters[
l].
IsIn)
469 if (
mi.ContainsGenericParameters)
498 for (
int n = 0;
n < parameters.Length;
n++)
500 if (parameters[
n].ParameterType.IsByRef)
674 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2026:RequiresUnreferencedCode", Justification =
"MakeGenericMethod is safe here because the user code invoking the generic method will reference the GenericTypes being used, which will guarantee the requirements of the generic method.")]
703 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2062:UnrecognizedReflectionPattern", Justification =
"interfaceType is annotated as preserve All members, so any Types returned from GetInterfaces should be preserved as well once https://github.com/mono/linker/issues/1731 is fixed.")]
static ? object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture)
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void ICollection< T >. Add(T item)
static Type GetUnderlyingType(Type enumType)
GeneratedTypeInfo([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type generatedType, MethodInfo[] methodInfos)
void GenerateInstanceOfIgnoresAccessChecksToAttribute(string assemblyName)
readonly AssemblyBuilder _ab
readonly HashSet< string > _ignoresAccessAssemblyNames
readonly ModuleBuilder _mb
void EnsureTypeIsVisible(Type type)
ConstructorInfo _ignoresAccessChecksToAttributeConstructor
ConstructorInfo IgnoresAccessChecksAttributeConstructor
ProxyBuilder CreateProxy(string name, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type proxyBaseType)
readonly MethodInfo _003CInterfaceRaiseMethod_003Ek__BackingField
MethodBuilder AddMethodBuilder
MethodBuilder RaiseMethodBuilder
MethodBuilder RemoveMethodBuilder
EventAccessorInfo(MethodInfo interfaceAddMethod, MethodInfo interfaceRemoveMethod, MethodInfo interfaceRaiseMethod)
MethodInfo InterfaceRemoveMethod
MethodInfo InterfaceAddMethod
void EndSet(Type stackType)
GenericArray(ILGenerator il, int len)
readonly LocalBuilder _lb
readonly Type[] _paramTypes
void EndSet(int i, Type stackType)
ParametersArray(ILGenerator il, Type[] paramTypes)
MethodBuilder SetMethodBuilder
MethodInfo InterfaceGetMethod
readonly MethodInfo _003CInterfaceSetMethod_003Ek__BackingField
MethodBuilder GetMethodBuilder
PropertyAccessorInfo(MethodInfo interfaceGetMethod, MethodInfo interfaceSetMethod)
static readonly OpCode[] s_convOpCodes
readonly List< FieldBuilder > _fields
static readonly OpCode[] s_ldindOpCodes
static void Convert(ILGenerator il, Type source, Type target, bool isAddress)
static readonly OpCode[] s_stindOpCodes
static void Stind(ILGenerator il, Type type)
static int GetTypeCode(Type type)
void AddInterfaceImpl([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type iface)
readonly List< MethodInfo > _methodInfos
readonly Type _proxyBaseType
static void Ldind(ILGenerator il, Type type)
GeneratedTypeInfo CreateType()
MethodBuilder AddMethodImpl(MethodInfo mi, int methodInfoIndex)
ProxyBuilder(ProxyAssembly assembly, TypeBuilder tb, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type proxyBaseType)
readonly ProxyAssembly _assembly
static GeneratedTypeInfo GetProxyType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
static readonly ProxyAssembly s_proxyAssembly
static readonly MethodInfo s_dispatchProxyInvokeMethod
static MethodInfo GetGenericMethodMethodInfo()
static readonly MethodInfo s_getTypeFromHandleMethod
static object CreateProxyInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
static GeneratedTypeInfo GenerateProxyType([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type baseType, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
static readonly MethodInfo s_makeGenericMethodMethod
static readonly Dictionary< Type, Dictionary< Type, GeneratedTypeInfo > > s_baseTypeAndInterfaceToGeneratedProxyType
void SetCustomAttribute(ConstructorInfo con, byte[] binaryAttribute)
static AssemblyBuilder DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)
ModuleBuilder DefineDynamicModule(string name)
virtual void Emit(OpCode opcode)
static ConstructorInfo AddToModule(ModuleBuilder mb)
TypeBuilder DefineType(string name)
static readonly OpCode Castclass
static readonly OpCode Unbox
static readonly OpCode Stind_R8
static readonly OpCode Conv_I4
static readonly OpCode Stind_I1
static readonly OpCode Unbox_Any
static readonly OpCode Callvirt
static readonly OpCode Ldind_I1
static readonly OpCode Conv_I2
static readonly OpCode Stind_I2
static readonly OpCode Stloc
static readonly OpCode Ldind_R4
static readonly OpCode Ldind_I2
static readonly OpCode Ldind_I4
static readonly OpCode Ldind_U2
static readonly OpCode Conv_I1
static readonly OpCode Ldind_U4
static readonly OpCode Ldind_R8
static readonly OpCode Ldind_I8
static readonly OpCode Stind_I8
static readonly OpCode Ldobj
static readonly OpCode Ldc_I4
static readonly OpCode Stelem_Ref
static readonly OpCode Conv_U1
static readonly OpCode Ldfld
static readonly OpCode Stind_I4
static readonly OpCode Conv_U4
static readonly OpCode Ldelem_Ref
static readonly OpCode Conv_R4
static readonly OpCode Pop
static readonly OpCode Conv_U2
static readonly OpCode Stobj
static readonly OpCode Ldind_U1
static readonly OpCode Ldtoken
static readonly OpCode Call
static readonly OpCode Conv_R8
static readonly OpCode Nop
static readonly OpCode Ret
static readonly OpCode Ldloc
static readonly OpCode Stind_R4
static readonly OpCode Box
static readonly OpCode Ldarg_0
static readonly OpCode Conv_U8
static readonly OpCode Stfld
static readonly OpCode Newarr
static readonly OpCode Ldarg
static readonly OpCode Conv_I8
static int DefineMethod(QCallModule module, int tkParent, string name, byte[] signature, int sigLength, MethodAttributes attributes)
ConstructorBuilder DefineConstructor(MethodAttributes attributes, CallingConventions callingConvention, Type[]? parameterTypes)
void DefineMethodOverride(MethodInfo methodInfoBody, MethodInfo methodInfoDeclaration)
static int DefineProperty(QCallModule module, int tkParent, string name, PropertyAttributes attributes, byte[] signature, int sigLength)
static int DefineEvent(QCallModule module, int tkParent, string name, EventAttributes attributes, int tkEventType)
void AddInterfaceImplementation([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type interfaceType)
virtual Type[] GetRequiredCustomModifiers()
virtual Type ParameterType
static string BaseType_Cannot_Be_Abstract
static string Format(string resourceFormat, object p1)
static string InterfaceType_Must_Be_Interface
static string BaseType_Must_Have_Default_Ctor
static string BaseType_Cannot_Be_Sealed
static int Increment(ref int location)
virtual bool IsAssignableFrom([NotNullWhen(true)] Type? c)
virtual bool IsGenericParameter
ConstructorInfo? GetConstructor(Type[] types)
static readonly Type[] EmptyTypes
DynamicallyAccessedMemberTypes
GenericParameterAttributes
override bool Equals([NotNullWhen(true)] object? obj)