diff --git a/snippets/cs.snippets b/snippets/cs.snippets index 7b67d1d..c1fe94f 100644 --- a/snippets/cs.snippets +++ b/snippets/cs.snippets @@ -70,7 +70,7 @@ snippet simc } } snippet svm - ${1:public }static void Main(string[] args){ + ${1:public }static void Main(string[] args) { ${0} } # if condition @@ -172,32 +172,32 @@ snippet ctor # properties - auto properties by default. # default type is int with layout get / set. snippet prop - ${1:public} ${2:int} ${3:} { get; set; } + ${1:public} ${2:int} ${3} { get; set; } snippet p - ${1:public} ${2:int} ${3:} { get; set; } + ${1:public} ${2:int} ${3} { get; set; } snippet p+ - public ${1:int} ${2:} { get; set; } + public ${1:int} ${2} { get; set; } snippet p+& - public ${1:int} ${2:} { get; internal set; } + public ${1:int} ${2} { get; internal set; } snippet p+| - public ${1:int} ${2:} { get; protected set; } + public ${1:int} ${2} { get; protected set; } snippet p+- - public ${1:int} ${2:} { get; private set; } + public ${1:int} ${2} { get; private set; } snippet p& - internal ${1:int} ${2:} { get; set; } + internal ${1:int} ${2} { get; set; } snippet p&| - internal ${1:int} ${2:} { get; protected set; } + internal ${1:int} ${2} { get; protected set; } snippet p&- - internal ${1:int} ${2:} { get; private set; } + internal ${1:int} ${2} { get; private set; } snippet p| - protected ${1:int} ${2:} { get; set; } + protected ${1:int} ${2} { get; set; } snippet p|- - protected ${1:int} ${2:} { get; private set; } + protected ${1:int} ${2} { get; private set; } snippet p- - private ${1:int} ${2:} { get; set; } + private ${1:int} ${2} { get; set; } # property - bool snippet pi - ${1:public} int ${2:} { get; set; } + ${1:public} int ${2} { get; set; } snippet pi+ public int ${1} { get; set; } snippet pi+& @@ -220,7 +220,7 @@ snippet pi- private int ${1} { get; set; } # property - bool snippet pb - ${1:public} bool ${2:} { get; set; } + ${1:public} bool ${2} { get; set; } snippet pb+ public bool ${1} { get; set; } snippet pb+& @@ -243,7 +243,7 @@ snippet pb- private bool ${1} { get; set; } # property - string snippet ps - ${1:public} string ${2:} { get; set; } + ${1:public} string ${2} { get; set; } snippet ps+ public string ${1} { get; set; } snippet ps+& @@ -266,87 +266,87 @@ snippet ps- private string ${1} { get; set; } # members - void snippet m - ${1:public} ${2:void} ${3:}(${4:}) { - ${5:} + ${1:public} ${2:void} ${3}(${4}) { + ${0} } snippet m+ - public ${1:void} ${2:}(${3:}) { - ${4:} + public ${1:void} ${2}(${3}) { + ${0} } snippet m& - internal ${1:void} ${2:}(${3:}) { - ${4:} + internal ${1:void} ${2}(${3}) { + ${0} } snippet m| - protected ${1:void} ${2:}(${3:}) { - ${4:} + protected ${1:void} ${2}(${3}) { + ${0} } snippet m- - private ${1:void} ${2:}(${3:}) { - ${4:} + private ${1:void} ${2}(${3}) { + ${0} } # members - int snippet mi - ${1:public} int ${2:}(${3:}) { - ${4:return 0;} + ${1:public} int ${2}(${3}) { + ${0:return 0;} } snippet mi+ - public int ${1:}(${2:}) { - ${3:return 0;} + public int ${1}(${2}) { + ${0:return 0;} } snippet mi& - internal int ${1:}(${2:}) { - ${3:return 0;} + internal int ${1}(${2}) { + ${0:return 0;} } snippet mi| - protected int ${1:}(${2:}) { - ${3:return 0;} + protected int ${1}(${2}) { + ${0:return 0;} } snippet mi- - private int ${1:}(${2:}) { - ${3:return 0;} + private int ${1}(${2}) { + ${0:return 0;} } # members - bool snippet mb - ${1:public} bool ${2:}(${3:}) { - ${4:return false;} + ${1:public} bool ${2}(${3}) { + ${0:return false;} } snippet mb+ - public bool ${1:}(${2:}) { - ${3:return false;} + public bool ${1}(${2}) { + ${0:return false;} } snippet mb& - internal bool ${1:}(${2:}) { - ${3:return false;} + internal bool ${1}(${2}) { + ${0:return false;} } snippet mb| - protected bool ${1:}(${2:}) { - ${3:return false;} + protected bool ${1}(${2}) { + ${0:return false;} } snippet mb- - private bool ${1:}(${2:}) { - ${3:return false;} + private bool ${1}(${2}) { + ${0:return false;} } # members - string snippet ms - ${1:public} string ${2:}(${3:}) { - ${4:return "";} + ${1:public} string ${2}(${3}) { + ${0:return "";} } snippet ms+ - public string ${1:}(${2:}) { - ${3:return "";} + public string ${1}(${2}) { + ${0:return "";} } snippet ms& - internal string ${1:}(${2:}) { - ${3:return "";} + internal string ${1}(${2}) { + ${0:return "";} } snippet ms| protected string ${1:}(${2:}) { - ${3:return "";} + ${0:return "";} } snippet ms- - private string ${1:}(${2:}) { - ${3:return "";} + private string ${1}(${2}) { + ${0:return "";} } # structure snippet struct @@ -391,8 +391,8 @@ snippet cw # equals override snippet eq - public override bool Equals(object obj){ - if (obj == null || GetType() != obj.GetType()){ + public override bool Equals(object obj) { + if (obj == null || GetType() != obj.GetType()) { return false; } ${0:throw new NotImplementedException();} @@ -400,7 +400,7 @@ snippet eq } # exception snippet exc - public class ${1:MyException} : ${2:Exception}{ + public class ${1:MyException} : ${2:Exception} { public $1() { } public $1(string message) : base(message) { } public $1(string message, Exception inner) : base(message, inner) { } @@ -411,62 +411,62 @@ snippet exc } # indexer snippet index - public ${1:object} this[${2:int} index]{ - get { ${3:} } - set { ${0:} } + public ${1:object} this[${2:int} index] { + get { ${0} } + set { ${0} } } # eventhandler snippet inv EventHandler temp = ${1:MyEvent}; - if (${2:temp} != null){ + if (${2:temp} != null) { $2(); } # lock snippet lock - lock (${1:this}){ - ${0:} + lock (${1:this}) { + ${0} } # namespace snippet namespace - namespace ${1:MyNamespace}{ - ${0:} + namespace ${1:MyNamespace} { + ${0} } # property snippet prop - public ${1:int} ${2:MyProperty} { get; set;} + public ${1:int} ${2:MyProperty} { get; set; } snippet propf private ${1:int} ${2:myVar}; - public $1 ${3:MyProperty}{ - get { return $2;} - set { $2 = value;} + public $1 ${3:MyProperty} { + get { return $2; } + set { $2 = value; } } snippet propg public ${1:int} ${2:MyProperty} { get; private set; } # switch snippet switch - switch (${1:switch_on}){ + switch (${1:switch_on}) { ${0} default: } # try snippet try - try{ + try { ${0} } - catch (${1:System.Exception}){ + catch (${1:System.Exception}) { throw; } snippet tryf - try{ + try { ${0} } - finally{ + finally { ${1} } # using snippet usi - using(${1:resource}){ + using(${1:resource}) { ${0} }