Reporter | Stig Rasmussen (boomshanka) |
---|---|
Created | Sep 28, 2010 2:24:03 PM |
Updated | Mar 27, 2012 5:03:10 PM |
Priority | Normal |
Type | Cosmetics |
Fix versions | 7.0 |
State | Open |
Assignee | Alexey Kuptsov (alexey.kuptsov) |
Subsystem | Quick Fixes |
Affected versions | No Affected versions |
Fixed in build | No Fixed in build |
Maybe this is already configurable in ReSharper, but I have noticed that when defining events in a .aspx or .ascx file, resharper implements them using EventArgs instead of the event-specific type. For instance, if we write this line in a .aspx or .ascx file:
<asp:ListView ID="MyListView" runat="server" OnItemDataBound="MyListView_ItemDataBound" />
If you then choose "Create method MyListView_ItemDataBound" the event method signature will look like this:
instead of this:
This is also the case with other controls like LinqDataSource events. I haven't stated this as a bug since you can simply attach the event in the code behind file and it will generate the correct signature.
<asp:ListView ID="MyListView" runat="server" OnItemDataBound="MyListView_ItemDataBound" />
If you then choose "Create method MyListView_ItemDataBound" the event method signature will look like this:
protected void MyListView_ItemDataBound(object sender, EventArgs e) { throw new NotImplementedException(); }
instead of this:
protected void MyListView_ItemDataBound(object sender, ListViewItemEventArgs e) { throw new NotImplementedException(); }
This is also the case with other controls like LinqDataSource events. I haven't stated this as a bug since you can simply attach the event in the code behind file and it will generate the correct signature.