By   January 23, 2014
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>log4net</Title>
      <Author>Jia KANG</Author>
      <Description>Code snippet for an log4net logger</Description>
      <Shortcut>log4net</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal Editable="false">
          <ID>class_name</ID>
          <Function>ClassName()</Function>
        </Literal>
        <Literal Editable="false">
          <ID>ilog</ID>
          <Function>SimpleTypeName(global::log4net.ILog)</Function>
        </Literal>
        <Literal Editable="false">
          <ID>log_man</ID>
          <Function>SimpleTypeName(global::log4net.LogManager)</Function>
        </Literal>
        <Literal Editable="true">
          <ID>_log</ID>
          <Type />
          <ToolTip />
          <Default>_log</Default>
          <Function />
        </Literal>
      </Declarations>
      <Code Language="csharp"><![CDATA[private static readonly $ilog$ $_log$ = $log_man$  .GetLogger(typeof($class_name$).Name);]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>propgo</Title>
      <Author>Jia KANG</Author>
      <Description>Code snippet for get-only property and backing private readonly field</Description>
      <HelpUrl></HelpUrl>
      <SnippetTypes />
      <Keywords />
      <Shortcut>propgo</Shortcut>
    </Header>
    <Snippet>
      <References />
      <Imports />
      <Declarations>
        <Literal Editable="true">
          <ID>_myAttribute</ID>
          <Type></Type>
          <ToolTip></ToolTip>
          <Default>_myAttribute</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>int</ID>
          <Type></Type>
          <ToolTip></ToolTip>
          <Default>int</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>MyAttribute</ID>
          <Type></Type>
          <ToolTip></ToolTip>
          <Default>MyAttribute</Default>
          <Function></Function>
        </Literal>
      </Declarations>
      <Code Language="csharp" Kind="method decl" Delimiter="$"><![CDATA[private readonly $int$ $_myAttribute$;

public $int$ $MyAttribute$
{
    get { return $_myAttribute$; }
}]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

Leave a Reply

Your email address will not be published. Required fields are marked *