Reporter |
|
---|---|
Created | Apr 21, 2012 2:13:25 AM |
Updated | Apr 26, 2018 5:59:56 PM |
Subsystem | ASP.NET - Razor |
Assignee | Slava Trenogin (derigel) |
Priority | Major |
State | Submitted |
Type | Bug |
Fix version | Backlog |
Affected versions | 6.1.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Consider the following Razor view snippet
Select "Details" and then from the context menu, select "Refactor", then "Introduce Parameter" and then select "actionName" as the parameter name. Observe that after the refactoring the method looks as follows:
Notice that the "Details" action name was not replaced with the parameter.
@helper MenuItem([JetBrains.Annotations.LocalizationRequired(true)] string linkText)
{
<li>@Html.ActionLink(linkText, "Details", "Accounts", null, new {id = "account"})</li>
}
Select "Details" and then from the context menu, select "Refactor", then "Introduce Parameter" and then select "actionName" as the parameter name. Observe that after the refactoring the method looks as follows:
@helper MenuItem([JetBrains.Annotations.LocalizationRequired(true)] string linkText, string actionName)
{
<li>@Html.ActionLink(linkText, "Details", "Accounts", null, new {id = "account"})</li>
}
Notice that the "Details" action name was not replaced with the parameter.