[英]Issues with Resharper Search with Pattern/Structural Replacement functionality
我正在嘗試使用Resharper的“具有模式/結構替換的搜索”功能來查找(cs)html片段,如下所示,最終目的是用編輯器模板替換所述代碼:
<div class="editor-label">
@Html.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.FirstName, new { @class = "text" })
@Html.ValidationMessageFor(model => model.FirstName)
</div>
我正在使用以下模式,但是收到一條錯誤消息,提示無法解析搜索模式:
@Html.LabelFor(model => model.$propertyName$)
<div class="editor-label">
@Html.LabelFor(model => model.$propertyName$)
</div>
<div class="editor-field">
@Html.TextBoxFor(model => model.$propertyName$, new { @class = "text" })
@Html.ValidationMessageFor(model => model.$propertyName$)
</div>
誰能告訴我:
提前致謝
J.P
ReSharper 6.0不支持HTML中的SSR,但6.1支持。 但是,仍然只有純HTML(在html,aspx,cshtml文件中),而不是Razor構造(如@Html)。 因此,即使在6.1版中,您的模式也無法使用。
PS:是的,ReSharper能夠處理多行圖案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.