Exemplo n.º 1
0
 public void UnRegisterSimple(ObjectNotification e)
 {
     delObject -= e;
 }
Exemplo n.º 2
0
 //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;
 }
Exemplo n.º 3
0
 //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);
 }
Exemplo n.º 4
0
 public void AlternativeRegistrationMethod(Delegate[] e)
 {
     delObject = (ObjectNotification)Delegate.Combine(e);
 }