So just dump mode now because these snippets are a bit random. First the download link again: Live Templates Download
NUnit / MbUnit
test - for some reason, I don't have this snippet using VS, but it was so easy to just create one, I didn't bother digging around to figure out where it was
[Test]
public void $METHOD$Test()
{
$END$
}
teste - Yeah so I probably could have named this something else, but I just didn't care enough. :-)
[Test,ExpectedException(typeof($EXCEPTION$))]
public void $METHOD$_Exception_Test()
{
$END$
}
Properties
propcint - Create an int property that looks for it's value from app/web.config before using a default value.
private int _$PROPVAR$ = $DEFAULT$;
public int $PROPNAME$
{
get
{
if (!string.IsNullOrEmpty(
ConfigurationManager.AppSettings["$CLASSNAME$_$PROPNAME$"]))
_$PROPVAR$ = Convert.ToInt32(
ConfigurationManager.AppSettings["$CLASSNAME$_$PROPNAME$"]);
return _$PROPVAR$;
}
set { _$PROPVAR$ = value; }
}
LLBL - Adapter
ec - Create an entity collection. This is pretty simple, but I find that the only drawback to using llblgen is that I tend to have fairly long type names.
EntityCollection<$Type$> $varname$ = new EntityCollection<$Type$>();
llu - Creates a DataAccessAdapter inside of a using block.
using(DataAccessAdapter adapter = new DataAccessAdapter())
{
$END$
}