37 : base(name, attributes)
39 if (componentClass ==
null)
59 : base(oldReflectEventDescriptor, attributes)
65 _addMethod = reflectEventDescriptor._addMethod;
74 if (component ==
null)
84 if (componentChangeService !=
null)
108 if (dictionaryService !=
null)
112 dictionaryService.
SetValue(
this, a);
120 addMethod.
Invoke(component, parameters);
137 base.FillAttributes(attributes);
140 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2075:UnrecognizedReflectionPattern", Justification =
"currentReflectType is in _componentClass's hierarchy. Since _componentClass is annotated with All, this means currentReflectType is annotated with All as well.")]
143 string name = realEventInfo.
Name;
147 while (
type != typeof(
object))
158 while (
type != typeof(
object))
175 attributes.Add(
value);
195 while (baseType !=
null && baseType != typeof(
object))
199 if (@event.GetAddMethod() !=
null)
206 if (eventInfo !=
null)
236 [UnconditionalSuppressMessage(
"ReflectionAnalysis",
"IL2075:UnrecognizedReflectionPattern", Justification =
"currentReflectType is in _componentClass's hierarchy. Since _componentClass is annotated with All, this means currentReflectType is annotated with All as well.")]
239 string name = realMethodInfo.
Name;
243 while (
type !=
null &&
type != typeof(
object))
254 while (
type !=
null &&
type != typeof(
object))
271 attributes.Add(
value);
280 if (component ==
null)
290 if (componentChangeService !=
null)
310 if (dictionaryService !=
null)
322 removeMethod.
Invoke(component, parameters);
static readonly CheckoutException Canceled
static ? ISite GetSite(object? component)
static ? MethodInfo FindMethod([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type componentClass, string name, Type[] args, Type returnType)
override void RemoveEventHandler(object component, Delegate value)
override void FillAttributes(IList attributes)
void FillSingleMethodAttribute(MethodInfo realMethodInfo, IList attributes)
ReflectEventDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentClass, EventInfo eventInfo)
ReflectEventDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentClass, string name, Type type, Attribute[] attributes)
void FillEventInfoAttribute(EventInfo realEventInfo, IList attributes)
readonly Type _componentClass
override bool IsMulticast
ReflectEventDescriptor([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type componentType, EventDescriptor oldReflectEventDescriptor, Attribute[] attributes)
override Type ComponentType
override void AddEventHandler(object component, Delegate value)
static Attribute[] ReflectGetAttributes(Type type)
static ? Delegate Remove(Delegate? source, Delegate? value)
static ? Delegate Combine(Delegate? a, Delegate? b)
MethodInfo? GetAddMethod()
virtual ? Type EventHandlerType
MethodInfo? GetRemoveMethod()
object? Invoke(object? obj, object?[]? parameters)
static string InvalidNullArgument
static string ErrorInvalidEventType
static string Format(string resourceFormat, object p1)
static string ErrorInvalidEventHandler
static string ErrorMissingEventAccessors
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
EventInfo? GetEvent(string name)
void OnComponentChanged(object component, MemberDescriptor? member, object? oldValue, object? newValue)
void OnComponentChanging(object component, MemberDescriptor? member)
object? GetValue(object key)
void SetValue(object key, object? value)
object? GetService(Type serviceType)
DynamicallyAccessedMemberTypes