Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-48036: Generate OnEvent method for events

$
0
0
Reporter Dmitry Shaporenkov (dsha1253017721110) Dmitry Shaporenkov (dsha1253017721110)
Created Aug 27, 2007 4:40:48 PM
Updated Mar 23, 2012 12:26:47 AM
Resolved Mar 23, 2012 12:26:47 AM
Priority Normal
Type Feature
Fix versions Mirabile Futurum, 5.1.1
State Fixed
Assignee Alexander Shvedov (shvedov)
Subsystem Generate Action
Affected versions No Affected versions
Fixed in build No Fixed in build
This is similar to generation of properties for fields. The method should look like the following:
public void delegate MyEventHandler (object sender, MyEventArgs args);

public event MyEventHandler SomethingHappened;

Should generate:
protected virtual void OnSomethingHappened(MyEventArgs e)
{
  MyEventHandler h = SomethingHappened;
  if (h != null) h(this, e);
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>