2007-10-05

Create object code snippet

This is another Code Snippet very usefull to me.
You can see in a previous post how to implement it in Visual Studio 2005.


<?xml version="1.0" encoding="utf-8"?>

<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">

  <CodeSnippet Format="1.0.0">

    <Header>

      <Title>vnew</Title>

      <Shortcut>vnew</Shortcut>

      <Description>Code snippet for create a basic new variable</Description>

      <Author>Red Line .Net</Author>

    </Header>

    <Snippet>

      <Declarations>

        <Literal Editable="true">

          <ID>type</ID>

          <ToolTip>Variable type</ToolTip>

          <Default>Object</Default>

          <Function>

          </Function>

        </Literal>

        <Literal Editable="true">

          <ID>variable</ID>

          <ToolTip>The variable backing this property</ToolTip>

          <Default>myVar</Default>

          <Function>

          </Function>

        </Literal>

        <Literal Editable="true">

          <ID>parameters</ID>

          <ToolTip>Parameters Constructor</ToolTip>

          <Default>

          </Default>

          <Function>

          </Function>

        </Literal>

      </Declarations>

      <Code Language="csharp"><![CDATA[$type$ $variable$ = new $type$($parameters$);]]></Code>

    </Snippet>

  </CodeSnippet>

  <CodeSnippet Format="1.0.0">

    <Header>

      <Title>

      </Title>

      <Shortcut>

      </Shortcut>

      <Description>

      </Description>

      <Author>

      </Author>

    </Header>

    <Snippet>

      <Code Language=""><![CDATA[]]></Code>

    </Snippet>

  </CodeSnippet>

</CodeSnippets>

No comments: