22 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2060:MakeGenericMethod", Justification =
"The call to MakeGenericMethod is safe due to the fact that we are preserving the constructors of type which is what Make() is doing.")]
25 return s_make.MakeGenericMethod(
type).CreateDelegate<Func<object>>();
28 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2060:MakeGenericMethod", Justification =
"The call to MakeGenericMethod is safe due to the fact that FastInvokerBuilder.CreateGetterInternal<T, T1> is not annotated.")]
34 return func(propertyInfo);
44 [
UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2060:MakeGenericMethod", Justification =
"The call to MakeGenericMethod is safe due to the fact that FastInvokerBuilder.CreateSetterInternal<T, T1> is not annotated.")]
53 return func(propertyInfo);
84 if (
typeof(DeclaringType).IsValueType)
89 DeclaringType
obj2 = (DeclaringType)
obj;
113 if (
typeof(DeclaringType).IsValueType)
118 DeclaringType
obj2 = (DeclaringType)
obj;
123 Action<DeclaringType, PropertyType>
setMethod =
propInfo.SetMethod.CreateDelegate<Action<DeclaringType, PropertyType>>();
void SetValue(object? obj, object? value)
object? GetValue(object? obj)
static string GetClrTypeFullName(Type type)
static Exception ThrowHelperError(Exception e)
static Func< object > GetMakeNewInstanceFunc([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type)
static readonly MethodInfo s_make
static Setter CreateSetter(MemberInfo memberInfo)
delegate void StructSetDelegate< T, TArg >(ref T obj, TArg value)
delegate object Getter(object obj)
delegate TResult StructGetDelegate< T, out TResult >(ref T obj)
static Getter CreateGetterInternal< DeclaringType, PropertyType >(PropertyInfo propInfo)
static readonly MethodInfo s_createSetterInternal
delegate void Setter(ref object obj, object value)
static Getter CreateGetter(MemberInfo memberInfo)
static object Make< T >()
static Setter CreateSetterInternal< DeclaringType, PropertyType >(PropertyInfo propInfo)
static readonly MethodInfo s_createGetterInternal
static string Format(string resourceFormat, object p1)
static string NoSetMethodForProperty
static string InvalidMember
DynamicallyAccessedMemberTypes