public ReadOnlyClassEvent(ClassEvent classEvent) { this.classEvent = classEvent; eventType = new ReadOnlyDelegateReference(classEvent.Type); if (classEvent.IsEventProperty) { addBody = new ReadOnlyMethodBody(classEvent.Accessors.AddBody); removeBody = new ReadOnlyMethodBody(classEvent.Accessors.RemoveBody); } }
public ReadOnlyStructEvent(StructEvent structEvent) { this.structEvent = structEvent; eventType = new ReadOnlyDelegateReference(structEvent.Type); if (structEvent.IsEventProperty) { addBody = new ReadOnlyMethodBody(structEvent.Accessors.AddBody); removeBody = new ReadOnlyMethodBody(structEvent.Accessors.RemoveBody); } }