Skip to content

Commit e50f4f2

Browse files
authored
Merge pull request #5198 from MRmlik12/feature/auto-complete-name
Add auto complete name to class, interface, enum, struct etc.
2 parents a64910f + 5a007ba commit e50f4f2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

snippets/csharp.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"prefix": "attribute",
44
"body": [
55
"[System.AttributeUsage(System.AttributeTargets.${1:All}, Inherited = ${2:false}, AllowMultiple = ${3:true})]",
6-
"sealed class ${4:My}Attribute : System.Attribute",
6+
"sealed class ${$TM_FILENAME_BASE}Attribute : System.Attribute",
77
"{",
88
"\t// See the attribute guidelines at",
99
"\t// http://go.microsoft.com/fwlink/?LinkId=85236",
1010
"\treadonly string positionalString;",
1111
"\t",
1212
"\t// This is a positional argument",
13-
"\tpublic ${4:My}Attribute(string positionalString)",
13+
"\tpublic ${4:$TM_FILENAME_BASE}Attribute(string positionalString)",
1414
"\t{",
1515
"\t\tthis.positionalString = positionalString;",
1616
"\t\t",
@@ -51,7 +51,7 @@
5151
"Class": {
5252
"prefix": "class",
5353
"body": [
54-
"class ${1:Name}",
54+
"class ${1:$TM_FILENAME_BASE}",
5555
"{",
5656
"\t$0",
5757
"}"
@@ -88,7 +88,7 @@
8888
"Enum": {
8989
"prefix": "enum",
9090
"body": [
91-
"enum ${1:Name}",
91+
"enum ${1:$TM_FILENAME_BASE}",
9292
"{",
9393
"\t$0",
9494
"}"
@@ -132,12 +132,12 @@
132132
"prefix": "exception",
133133
"body": [
134134
"[System.Serializable]",
135-
"public class ${1:My}Exception : ${2:System.Exception}",
135+
"public class ${1:$TM_FILENAME_BASE}Exception : ${2:System.Exception}",
136136
"{",
137-
"\tpublic ${1:My}Exception() { }",
138-
"\tpublic ${1:My}Exception(string message) : base(message) { }",
139-
"\tpublic ${1:My}Exception(string message, System.Exception inner) : base(message, inner) { }",
140-
"\tprotected ${1:My}Exception(",
137+
"\tpublic ${1:$TM_FILENAME_BASE}Exception() { }",
138+
"\tpublic ${1:$TM_FILENAME_BASE}Exception(string message) : base(message) { }",
139+
"\tpublic ${1:$TM_FILENAME_BASE}Exception(string message, System.Exception inner) : base(message, inner) { }",
140+
"\tprotected ${1:$TM_FILENAME_BASE}Exception(",
141141
"\t\tSystem.Runtime.Serialization.SerializationInfo info,",
142142
"\t\tSystem.Runtime.Serialization.StreamingContext context) : base(info, context) { }",
143143
"}"
@@ -198,7 +198,7 @@
198198
"Interface": {
199199
"prefix": "interface",
200200
"body": [
201-
"interface I${1:Name}",
201+
"interface ${1:$TM_FILENAME_BASE}",
202202
"{",
203203
"\t$0",
204204
"}"
@@ -368,7 +368,7 @@
368368
"Struct": {
369369
"prefix": "struct",
370370
"body": [
371-
"struct ${1:Name}",
371+
"struct ${1:$TM_FILENAME_BASE}",
372372
"{",
373373
"\t$0",
374374
"}"

0 commit comments

Comments
 (0)