示例#1
0
 /// <summary>
 /// Add an event to this class
 /// </summary>
 /// <param name="name">event name</param>
 /// <param name="eType">event type</param>
 /// <returns>a descriptor for this new event</returns>
 public Event AddEvent(string name, Type eType)
 {
     Event e = (Event)FindFeature(name, events);
     if (e != null)
         throw new DescriptorException("Event " + e.NameString());
     e = new Event(name, eType, this);
     events.Add(e);
     return e;
 }
示例#2
0
 internal void AddEvent(Event ev)
 {
     Contract.Requires(ev != null);
     if (ev == null) return;
     ev.SetParent(this);
     events.Add(ev);
 }
示例#3
0
 internal static void Read(PEReader buff, TableRow[] events)
 {
     for (int i = 0; i < events.Length; i++)
         events[i] = new Event(buff);
 }