如何在VS2008片段中强制使用UpperCase?

Ang*_*ker 4 properties visual-studio-2008 casing code-snippets

我已经确定了以下创建属性的方式(带有支持字段):

private _firstName;
public string FirstName
{
    get { return _firstName; }
    set { _firstName = value; }
}
Run Code Online (Sandbox Code Playgroud)

鉴于该属性的名称类似于支持字段的名称,我已将内置prop代码段改进为以下内容:

<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>prop</Title>
      <Author>Frank Rizzo</Author>
      <Description>Code snippet for property and backing field - changed one (not the original).</Description>
      <Shortcut>prop</Shortcut>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>type</ID>
          <ToolTip>Property type</ToolTip>
          <Default>int</Default>
        </Literal>
        <Literal>
          <ID>property</ID>
          <ToolTip>Property name</ToolTip>
          <Default>MyProperty</Default>
        </Literal>
        <Literal>
          <ID>field</ID>
          <ToolTip>The variable backing this property</ToolTip>
          <Default>myVar</Default>
        </Literal>
      </Declarations>
      <Code Language="CSharp"><![CDATA[private $type$ _$field$;

    public $type$ $field$
    {
        get { return _$field$;}
        set { _$field$ = value;}
    }
    $end$
            ]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
Run Code Online (Sandbox Code Playgroud)

这在一定程度上起作用,但是支持字段的外壳和属性名称总是相同的,在我的约定中,支持字段是驼峰式的,其中属性名称是pascal-cased.

所以我的问题是这样的:片段语法是否有办法更改属性的第一个字母,以便代码段符合我的约定?

SLa*_*aks 6

不幸的是,这还不可能.

希望它可以在Visual Studio的未来版本中使用.