我想知道是否有办法制作#region Some Region #endregion Some Region
. 如果没有办法做到这一点,那么 Resharper 可能吗?
希望很清楚我在这里想要达到的目标。
编辑:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>#region</Title>
<Shortcut>#region</Shortcut>
<Description>Code snippet for #region</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<ToolTip>Region name</ToolTip>
<Default>MyRegion</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[#region $name$
$selected$ $end$
#endregion $name$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
第二次编辑: 它有效,但只有当我制作插入片段时。我猜从智能感知这个使用其他一些片段。
那么有没有办法从智能感知而不是从插入片段菜单中添加我的区域?