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

RSRP-296604: Introduce Parameter not working in Razor view

$
0
0
Reporter Werner Strydom (bloudraak) Werner Strydom (bloudraak)
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

@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.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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