1 type derived from EventDescriptor
System.ComponentModel.TypeConverter (1)
System\ComponentModel\ReflectEventDescriptor.cs (1)
60internal sealed class ReflectEventDescriptor : EventDescriptor
215 references to EventDescriptor
netstandard (1)
netstandard.cs (1)
315[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.EventDescriptor))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
301[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.EventDescriptor))]
System.ComponentModel.TypeConverter (95)
System\ComponentModel\CustomTypeDescriptor.cs (2)
117[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 118public virtual EventDescriptor? GetDefaultEvent() => _parent?.GetDefaultEvent();
System\ComponentModel\Design\IEventPropertyService.cs (6)
9/// Provides a set of useful methods for binding <see cref='System.ComponentModel.EventDescriptor'/> objects to user code. 18string CreateUniqueMethodName(IComponent component, EventDescriptor e); 24ICollection GetCompatibleMethods(EventDescriptor e); 30EventDescriptor? GetEvent(PropertyDescriptor property); 40PropertyDescriptor GetEventProperty(EventDescriptor e); 58bool ShowCode(IComponent component, EventDescriptor e);
System\ComponentModel\EventDescriptor.cs (3)
14/// Initializes a new instance of the <see cref='System.ComponentModel.EventDescriptor'/> class with the 22/// Initializes a new instance of the <see cref='System.ComponentModel.EventDescriptor'/> class with the name and attributes in 30/// Initializes a new instance of the <see cref='System.ComponentModel.EventDescriptor'/> class with
System\ComponentModel\EventDescriptorCollection.cs (28)
16private EventDescriptor?[] _events; 31public EventDescriptorCollection(EventDescriptor[]? events) 35_events = Array.Empty<EventDescriptor>(); 49public EventDescriptorCollection(EventDescriptor[]? events, bool readOnly) : this(events) 54private EventDescriptorCollection(EventDescriptor?[] events, int eventCount, string[]? namedSort, IComparer? comparer) 75public virtual EventDescriptor? this[int index] 91public virtual EventDescriptor? this[string name] => Find(name, false); 93public int Add(EventDescriptor? value) 115public bool Contains(EventDescriptor? value) => IndexOf(value) >= 0; 130EventDescriptor[] newEvents = new EventDescriptor[Count]; 153_events = new EventDescriptor[sizeNeeded]; 160EventDescriptor[] newEvents = new EventDescriptor[newSize]; 169public virtual EventDescriptor? Find(string name, bool ignoreCase) 171EventDescriptor? p = null; 199public int IndexOf(EventDescriptor? value) => Array.IndexOf(_events, value, 0, Count); 201public void Insert(int index, EventDescriptor? value) 217public void Remove(EventDescriptor? value) 314List<EventDescriptor?> eventList = new List<EventDescriptor?>(_events); 322EventDescriptor? currentEvent = eventList[j]; 391_events[index] = (EventDescriptor?)value; 395int IList.Add(object? value) => Add((EventDescriptor?)value); 397bool IList.Contains(object? value) => Contains((EventDescriptor?)value); 401int IList.IndexOf(object? value) => IndexOf((EventDescriptor?)value); 403void IList.Insert(int index, object? value) => Insert(index, (EventDescriptor?)value); 405void IList.Remove(object? value) => Remove((EventDescriptor?)value);
System\ComponentModel\IComNativeDescriptorHandler.cs (1)
18EventDescriptor GetDefaultEvent(object component);
System\ComponentModel\ICustomTypeDescriptor.cs (2)
38[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 39EventDescriptor? GetDefaultEvent();
System\ComponentModel\ReflectEventDescriptor.cs (1)
115EventDescriptor oldReflectEventDescriptor,
System\ComponentModel\ReflectPropertyDescriptor.cs (8)
74private EventDescriptor? _realChangedEvent; // <propertyname>Changed event handler on object 75private EventDescriptor? _realIPropChangedEvent; // INotifyPropertyChanged.PropertyChanged event handler on object 248private EventDescriptor ChangedEventValue 265private EventDescriptor IPropChangedEventValue 505EventDescriptor changedEvent = ChangedEventValue; 518EventDescriptor iPropChangedEvent = IPropChangedEventValue; 982EventDescriptor changedEvent = ChangedEventValue; 998EventDescriptor iPropChangedEvent = IPropChangedEventValue;
System\ComponentModel\ReflectTypeDescriptionProvider.cs (10)
388internal EventDescriptor? GetDefaultEvent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, object? instance) 517internal static EventDescriptor? GetExtendedDefaultEvent() 1153private static EventDescriptor[] ReflectGetEvents(Type type) 1156EventDescriptor[]? events = (EventDescriptor[]?)eventCache[type]; 1164events = (EventDescriptor[]?)eventCache[type]; 1177events = new EventDescriptor[eventInfos.Length]; 1201EventDescriptor[] newEvents = new EventDescriptor[eventCount]; 1207foreach (EventDescriptor dbgEvent in events)
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (6)
249internal EventDescriptor? GetDefaultEvent(object? instance) 443EventDescriptor[] eventArray; 444Dictionary<string, EventDescriptor> eventList = new Dictionary<string, EventDescriptor>(16); 451foreach (EventDescriptor ed in eventArray) 459eventArray = new EventDescriptor[eventList.Count];
System\ComponentModel\TypeDescriptor.cs (28)
451public static EventDescriptor CreateEvent( 464public static EventDescriptor CreateEvent( 466EventDescriptor oldEventDescriptor, 892[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 893public static EventDescriptor? GetDefaultEvent( 908[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage + " The Type of component cannot be statically discovered.")] 909public static EventDescriptor? GetDefaultEvent(object component) => GetDefaultEvent(component, false); 915[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage + " The Type of component cannot be statically discovered.")] 916public static EventDescriptor? GetDefaultEvent(object component, bool noCustomTypeDesc) 1134var descriptors = new EventDescriptor[filteredEvents.Count]; 1253EventDescriptor[] eventArray = new EventDescriptor[results.Count]; 1923EventDescriptor[] eventArray = new EventDescriptor[list.Count]; 2114EventDescriptor[] eventArray = new EventDescriptor[list.Count]; 2121throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(EventDescriptor).FullName)); 2262EventDescriptor[] eventArray = new EventDescriptor[list.Count]; 2824[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 2825EventDescriptor ICustomTypeDescriptor.GetDefaultEvent() 3132[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 3133EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() 3543[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 3544EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() 3926[RequiresUnreferencedCode(EventDescriptor.RequiresUnreferencedCodeMessage)] 3927public EventDescriptor? GetDefaultEvent() 3933EventDescriptor? defaultEvent;
System.Data.Common (5)
System\Data\Common\DataRecordInternal.cs (1)
327EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent()
System\Data\Common\DbConnectionStringBuilder.cs (1)
637EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent()
System\Data\Common\DbDataRecord.cs (1)
83EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => null;
System\Data\DataRowView.cs (1)
240EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => null;
System\Data\DataViewManagerListItemTypeDescriptor.cs (1)
58EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => null;
System.Windows.Forms (10)
System\Windows\Forms\ActiveX\AxHost.cs (1)
2472EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent()
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.ComTypeDescriptor.cs (1)
41EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => null;
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.NullTypeDescriptor.cs (1)
24EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => null;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (1)
317EventDescriptor? eventDescriptor = _eventBindings.GetEvent(mergeDescriptor[0]);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (3)
34private static EventDescriptor? s_targetEventdesc; 618EventDescriptor? eventDescriptor = null; 779EventDescriptor? eventDescriptor,
System\Windows\Forms\DataBinding\Binding.cs (2)
30private EventDescriptor? _validateInfo; 545EventDescriptor? tempValidateInfo = null;
System\Windows\Forms\Design\EventsTab.cs (1)
42return TypeDescriptor.GetDefaultEvent(obj) is EventDescriptor defaultEvent
System.Windows.Forms.Design (35)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
1253EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => null;
System\ComponentModel\Design\ComponentDesigner.cs (5)
257EventDescriptor? thisDefaultEvent = null; 271EventDescriptor? defaultEvent = TypeDescriptor.GetDefaultEvent(comp); 633EventDescriptor?[] values = new EventDescriptor[events.Values.Count]; 636foreach (EventDescriptor? evt in values)
System\ComponentModel\Design\EventBindingService.cs (12)
18private EventDescriptor? _showCodeEventDescriptor; 36protected abstract string CreateUniqueMethodName(IComponent component, EventDescriptor e); 45protected virtual void FreeMethod(IComponent component, EventDescriptor e, string methodName) 55protected abstract ICollection GetCompatibleMethods(EventDescriptor e); 82protected abstract bool ShowCode(IComponent component, EventDescriptor e, string methodName); 91protected virtual void UseMethod(IComponent component, EventDescriptor e, string methodName) 108string IEventBindingService.CreateUniqueMethodName(IComponent component, EventDescriptor e) 120ICollection IEventBindingService.GetCompatibleMethods(EventDescriptor e) 131EventDescriptor? IEventBindingService.GetEvent(PropertyDescriptor property) 139private static bool HasGenericArgument([NotNullWhen(true)] EventDescriptor? ed) 197PropertyDescriptor IEventBindingService.GetEventProperty(EventDescriptor e) 228bool IEventBindingService.ShowCode(IComponent component, EventDescriptor e)
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (4)
27internal EventPropertyDescriptor(EventDescriptor eventDesc, EventBindingService eventSvc) : base(eventDesc, null) 60internal EventDescriptor Event { get; } 284private readonly EventDescriptor _evt; 289internal EventConverter(EventDescriptor evt)
System\ComponentModel\Design\Serialization\CodeDomSerializationProvider.cs (1)
111if (typeof(EventDescriptor).IsAssignableFrom(objectType))
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (1)
248else if (member is EventDescriptor evt)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (4)
495EventDescriptor? evt = GetEventsHelper(manager, targetObject, null)[statement.Event.EventName]; 1228EventDescriptor? evt = GetEventsHelper(manager, targetObject, null)[eventName]; 2100protected void SerializeEvent(IDesignerSerializationManager manager, CodeStatementCollection statements, object value, EventDescriptor descriptor) 2133foreach (EventDescriptor evt in events)
System\ComponentModel\Design\Serialization\EventMemberCodeDomSerializer.cs (1)
28if (descriptor is not EventDescriptor eventToSerialize)
System\Windows\Forms\Design\ComponentTray.cs (1)
2470EventDescriptor defaultEvent = TypeDescriptor.GetDefaultEvent(component);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1251EventDescriptor? ICustomTypeDescriptor.GetDefaultEvent() => TypeDescriptor.GetDefaultEvent(DataGridViewColumn);
System\Windows\Forms\Design\ToolStripContentPanelDesigner.cs (2)
72EventDescriptor? eventDescriptor; 92eventDescriptor = (EventDescriptor?)events[noBrowseEvents[i]];
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
519EventDescriptor? eventDescriptor = (EventDescriptor?)events[noBrowseEvents[i]];
System.Windows.Forms.Design.Tests (62)
System\ComponentModel\Design\ComponentDesignerTests.cs (62)
778.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 782.Setup(s => s.CreateUniqueMethodName(component3, It.IsAny<EventDescriptor>())) 786.Setup(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>())) 843mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(3)); 845mockEventBindingService.Verify(s => s.CreateUniqueMethodName(component3, It.IsAny<EventDescriptor>()), Times.Once()); 846mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 864mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(6)); 866mockEventBindingService.Verify(s => s.CreateUniqueMethodName(component3, It.IsAny<EventDescriptor>()), Times.Exactly(2)); 867mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(4)); 891.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 895.Setup(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>())) 898.Setup(s => s.CreateUniqueMethodName(component, It.IsAny<EventDescriptor>())) 901.Setup(s => s.ShowCode(component, It.IsAny<EventDescriptor>())) 958mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 960mockEventBindingService.Verify(s => s.ShowCode(component, It.IsAny<EventDescriptor>()), Times.Exactly(expectedCallCount)); 971mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 973mockEventBindingService.Verify(s => s.ShowCode(component, It.IsAny<EventDescriptor>()), Times.Exactly(expectedCallCount * 2)); 1002.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1006.Setup(s => s.CreateUniqueMethodName(component3, It.IsAny<EventDescriptor>())) 1010.Setup(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>())) 1071mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(3)); 1073mockEventBindingService.Verify(s => s.CreateUniqueMethodName(component3, It.IsAny<EventDescriptor>()), Times.Once()); 1074mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1095mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(6)); 1097mockEventBindingService.Verify(s => s.CreateUniqueMethodName(component3, It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1098mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(4)); 1118.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1177mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1188mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1211.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1270mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1281mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1302.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1360mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1371mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1392.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1396.Setup(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>())) 1455mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1456mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Once()); 1468mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1469mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1499.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1503.Setup(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>())) 1562mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1563mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Once()); 1575mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1576mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1601.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1659mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1669mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1882.Setup(s => s.GetEventProperty(It.IsAny<EventDescriptor>())) 1886.Setup(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>())) 1931mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Once()); 1932mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Once()); 1943mockEventBindingService.Verify(s => s.GetEventProperty(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 1944mockEventBindingService.Verify(s => s.GetCompatibleMethods(It.IsAny<EventDescriptor>()), Times.Exactly(2)); 2433EventDescriptor descriptor = TypeDescriptor.GetEvents(typeof(CustomComponent))[0]; 2439EventDescriptor result = Assert.IsAssignableFrom<EventDescriptor>(events["Event"]); 2872EventDescriptor descriptor = TypeDescriptor.GetEvents(typeof(CustomComponent))[0]; 2879EventDescriptor result = Assert.IsAssignableFrom<EventDescriptor>(events["Event"]);
System.Windows.Forms.Tests (6)
System\Windows\Forms\AxHostTests.cs (2)
2495EventDescriptor eventDescriptor = customTypeDescriptor.GetDefaultEvent(); 2518EventDescriptor eventDescriptor = customTypeDescriptor.GetDefaultEvent();
System\Windows\Forms\AxSystemMonitorTests.cs (1)
51foreach (EventDescriptor singleEvent in events)
System\Windows\Forms\AxWebBrowserTests.cs (1)
46.Cast<EventDescriptor>()
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (1)
122public EventDescriptor? GetDefaultEvent() => throw new NotImplementedException();
System\Windows\Forms\ListBindingHelperTests.cs (1)
822public EventDescriptor GetDefaultEvent()