S
steve.falzon@
Hi
I've been searching high and low for this info but have been
unsuccessful so far. I wonder if anybody knows where I can get a
specification for the directives contained within the code element of
a snippet.
I'm not looking for info on literals such as $SystemAttributeUsage$
which are described by Literal nodes and vary with each snippet but
info on directives such as $end$ which obviously signify the end of
something but it isn't clear what (there is no corresponding $begin$
for instance), and code can come after the $end$ statement as in the
snippet below.
The meaning of some is obvious eg, for a SurroundsWith snippet type
the $selected$ directive gives the code to be surrounded by the
snippet, many others aren't that obvious.
Any pointers to a spec would be greatly appreciated.
TIA
Steve
----------------
<Code Language="csharp"><![CDATA[
[$SystemAttributeUsage$($SystemAttributeTargets$.$target$, Inherited =
$inherited$, AllowMultiple = $allowmultiple$)]
sealed class $name$Attribute : $SystemAttribute$
{
// See the attribute guidelines at
//
http://msdn.microsoft.com/library/d.../cpgenref/html/cpconusingattributeclasses.asp
readonly string _positionalString;
int _namedInt;
// This is a positional argument.
public $name$Attribute (string positionalString)
{
this._positionalString = positionalString;
// TODO: Implement code here.
$end$throw new $Exception$("The method or operation is not
implemented.");
}
public string PositionalString
{
get
{
return this._positionalString;
}
}
// This is a named argument.
public int NamedInt
{
get
{
return this._namedInt;
}
set
{
this._namedInt = value;
}
}
}
]]>
</Code>
------------------------
I've been searching high and low for this info but have been
unsuccessful so far. I wonder if anybody knows where I can get a
specification for the directives contained within the code element of
a snippet.
I'm not looking for info on literals such as $SystemAttributeUsage$
which are described by Literal nodes and vary with each snippet but
info on directives such as $end$ which obviously signify the end of
something but it isn't clear what (there is no corresponding $begin$
for instance), and code can come after the $end$ statement as in the
snippet below.
The meaning of some is obvious eg, for a SurroundsWith snippet type
the $selected$ directive gives the code to be surrounded by the
snippet, many others aren't that obvious.
Any pointers to a spec would be greatly appreciated.
TIA
Steve
----------------
<Code Language="csharp"><![CDATA[
[$SystemAttributeUsage$($SystemAttributeTargets$.$target$, Inherited =
$inherited$, AllowMultiple = $allowmultiple$)]
sealed class $name$Attribute : $SystemAttribute$
{
// See the attribute guidelines at
//
http://msdn.microsoft.com/library/d.../cpgenref/html/cpconusingattributeclasses.asp
readonly string _positionalString;
int _namedInt;
// This is a positional argument.
public $name$Attribute (string positionalString)
{
this._positionalString = positionalString;
// TODO: Implement code here.
$end$throw new $Exception$("The method or operation is not
implemented.");
}
public string PositionalString
{
get
{
return this._positionalString;
}
}
// This is a named argument.
public int NamedInt
{
get
{
return this._namedInt;
}
set
{
this._namedInt = value;
}
}
}
]]>
</Code>
------------------------