Ejemplo n.º 1
0
 public override EventDescriptorCollection GetEvents()
 {
     if (this._events != null)
     {
         return(this._events);
     }
     EventInfo[]       events = base.InfoType.GetEvents();
     EventDescriptor[] array  = new EventDescriptor[events.Length];
     for (int i = 0; i < events.Length; i++)
     {
         array[i] = new ReflectionEventDescriptor(events[i]);
     }
     this._events = new EventDescriptorCollection(array);
     return(this._events);
 }
Ejemplo n.º 2
0
        public override EventDescriptorCollection GetEvents()
        {
            if (_events != null)
            {
                return(_events);
            }

            EventInfo[]       events = InfoType.GetEvents();
            EventDescriptor[] descs  = new EventDescriptor [events.Length];
            for (int n = 0; n < events.Length; n++)
            {
                descs [n] = new ReflectionEventDescriptor(events[n]);
            }

            _events = new EventDescriptorCollection(descs);
            return(_events);
        }
		public override EventDescriptorCollection GetEvents ()
		{
			if (_events != null)
				return _events;
			
			EventInfo[] events = InfoType.GetEvents ();
			EventDescriptor[] descs = new EventDescriptor [events.Length];
			for (int n=0; n<events.Length; n++)
				descs [n] = new ReflectionEventDescriptor (events[n]);

			_events = new EventDescriptorCollection (descs);
			return _events;
		}