public void UnRegisterSimple(ObjectNotification e) { delObject -= e; }
//allowing the outside world to send in methods to attach to our delegate object public void RegistrationMethod(ObjectNotification e) { //multicast delegate: maintains a list of methods to call delObject += e; }
//method group conversion: //supply a direct method name, rather than a delegate object, when calling methods that take delegates //as arguments. public void UnRegisterBackGround(ObjectNotification e) { delObject = (ObjectNotification)Delegate.Remove(delObject, e); }
public void AlternativeRegistrationMethod(Delegate[] e) { delObject = (ObjectNotification)Delegate.Combine(e); }