protected virtual void OnValueChanged(SomeEventArgs e)
 {
     if (Value_Changed != null)
     {
         Value_Changed(this, e);
     }
 }
Example #2
0
 void HandleChange(object sender /*this will be the instance that raised the event*/, SomeEventArgs e)
 {
     //BTW: this.watcher == sender; //the same instance
     form.DisplayNotification(this.watcher.GetData());
 }
Example #3
0
 private void OnCommandManagerRequerySuggested(object sender, SomeEventArgs e)
 {
     InvalidateCommands();
 }
Example #4
0
 // this is what your button calls when clicked
 public void SaveAsync(object sender, SomeEventArgs args)
 {
       // the service does the actual work
      _service.SaveAsync()
 }
Example #5
0
    // Some event happens that we want to notify subscribers about
    void EventHandler(object sender, SomeEventArgs e)
    {
        UsefulInfo info = CreateUsefulInfo(e);

        _observable.OnNext(info);
    }
 private MyEventArgs ConvertEventArgs(SomeEventArgs args)
 {
     // the magic goes here...
 }
 private void HandleSomeClassSomeEvent(object sender, SomeEventArgs args)
 {
     OnSomeEvent(ConvertEventArgs(args));
 }