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

RSRP-191544: "Create method" for events in markup files implements the event handler with EventArgs

$
0
0
Reporter Stig Rasmussen (boomshanka) 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:

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.

Viewing all articles
Browse latest Browse all 106942

Trending Articles