mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
added csharp, sql snippets from users
This commit is contained in:
parent
bfe0255fd1
commit
0732cfc7e6
7
snippets/text-mode/cc-mode/csharp-mode/attrib
Normal file
7
snippets/text-mode/cc-mode/csharp-mode/attrib
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : private attribute ....;
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $3
|
||||||
|
/// </summary>
|
||||||
|
private $1 $2;
|
21
snippets/text-mode/cc-mode/csharp-mode/attrib.1
Normal file
21
snippets/text-mode/cc-mode/csharp-mode/attrib.1
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : private attribute ....; public property ... ... { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $3
|
||||||
|
/// </summary>
|
||||||
|
private $1 $2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// $4
|
||||||
|
/// </summary>
|
||||||
|
/// <value>$5</value>
|
||||||
|
public $1 $2
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return this.$2;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.$2 = value;
|
||||||
|
}
|
||||||
|
}
|
21
snippets/text-mode/cc-mode/csharp-mode/attrib.2
Normal file
21
snippets/text-mode/cc-mode/csharp-mode/attrib.2
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : private _attribute ....; public Property ... ... { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $3
|
||||||
|
/// </summary>
|
||||||
|
private $1 ${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ${3:Description}
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>$1</c></value>
|
||||||
|
public ${1:Type} ${2:Name}
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")};
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.${2:$(if (> (length text) 0) (format "_%s%s" (downcase (substring text 0 1)) (substring text 1 (length text))) "")} = value;
|
||||||
|
}
|
||||||
|
}
|
21
snippets/text-mode/cc-mode/csharp-mode/class
Normal file
21
snippets/text-mode/cc-mode/csharp-mode/class
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : class ... { ... }
|
||||||
|
# --
|
||||||
|
${5:public} class ${1:Name}
|
||||||
|
{
|
||||||
|
#region Ctor & Destructor
|
||||||
|
/// <summary>
|
||||||
|
/// ${3:Standard Constructor}
|
||||||
|
/// </summary>
|
||||||
|
public $1($2)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ${4:Default Destructor}
|
||||||
|
/// </summary>
|
||||||
|
public ~$1()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
6
snippets/text-mode/cc-mode/csharp-mode/comment
Normal file
6
snippets/text-mode/cc-mode/csharp-mode/comment
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <summary> ... </summary>
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $1
|
||||||
|
/// </summary>
|
4
snippets/text-mode/cc-mode/csharp-mode/comment.1
Normal file
4
snippets/text-mode/cc-mode/csharp-mode/comment.1
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <param name="..."> ... </param>
|
||||||
|
# --
|
||||||
|
/// <param name="$1">$2</param>
|
4
snippets/text-mode/cc-mode/csharp-mode/comment.2
Normal file
4
snippets/text-mode/cc-mode/csharp-mode/comment.2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <param name="..."> ... </param>
|
||||||
|
# --
|
||||||
|
/// <returns>$1</returns>
|
4
snippets/text-mode/cc-mode/csharp-mode/comment.3
Normal file
4
snippets/text-mode/cc-mode/csharp-mode/comment.3
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : /// <exception cref="..."> ... </exception>
|
||||||
|
# --
|
||||||
|
/// <exception cref="$1">$2</exception>
|
10
snippets/text-mode/cc-mode/csharp-mode/method
Normal file
10
snippets/text-mode/cc-mode/csharp-mode/method
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : public void Method { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// ${5:Description}
|
||||||
|
/// </summary>${2:$(if (string= (upcase text) "VOID") "" (format "%s%s%s" "\n/// <returns><c>" text "</c></returns>"))}
|
||||||
|
${1:public} ${2:void} ${3:MethodName}($4)
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
7
snippets/text-mode/cc-mode/csharp-mode/namespace
Normal file
7
snippets/text-mode/cc-mode/csharp-mode/namespace
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : namespace .. { ... }
|
||||||
|
# --
|
||||||
|
namespace $1
|
||||||
|
{
|
||||||
|
$0
|
||||||
|
}
|
16
snippets/text-mode/cc-mode/csharp-mode/prop
Normal file
16
snippets/text-mode/cc-mode/csharp-mode/prop
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : property ... ... { ... }
|
||||||
|
# --
|
||||||
|
/// <summary>
|
||||||
|
/// $5
|
||||||
|
/// </summary>
|
||||||
|
/// <value>$6</value>
|
||||||
|
$1 $2 $3
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return this.$4;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this.$4 = value;
|
||||||
|
}
|
||||||
|
}
|
6
snippets/text-mode/cc-mode/csharp-mode/region
Normal file
6
snippets/text-mode/cc-mode/csharp-mode/region
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : #region ... #endregion
|
||||||
|
# --
|
||||||
|
#region $1
|
||||||
|
$0
|
||||||
|
#endregion
|
4
snippets/text-mode/cc-mode/csharp-mode/using
Normal file
4
snippets/text-mode/cc-mode/csharp-mode/using
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : using ...;
|
||||||
|
# --
|
||||||
|
using $1;
|
4
snippets/text-mode/cc-mode/csharp-mode/using.1
Normal file
4
snippets/text-mode/cc-mode/csharp-mode/using.1
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : using System;
|
||||||
|
# --
|
||||||
|
using System;
|
4
snippets/text-mode/cc-mode/csharp-mode/using.2
Normal file
4
snippets/text-mode/cc-mode/csharp-mode/using.2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : using System....;
|
||||||
|
# --
|
||||||
|
using System.$1;
|
4
snippets/text-mode/sql-mode/column
Normal file
4
snippets/text-mode/sql-mode/column
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : , ColumnName ColumnType NOT NULL...
|
||||||
|
# --
|
||||||
|
, ${1:Name} ${2:Type} ${3:NOT NULL}
|
4
snippets/text-mode/sql-mode/constraint
Normal file
4
snippets/text-mode/sql-mode/constraint
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : CONSTRAINT [..] PRIMARY KEY ...
|
||||||
|
# --
|
||||||
|
CONSTRAINT [${1:PK_Name}] PRIMARY KEY ${2:CLUSTERED} ([${3:ColumnName}])
|
4
snippets/text-mode/sql-mode/constraint.1
Normal file
4
snippets/text-mode/sql-mode/constraint.1
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : CONSTRAINT [..] FOREIGN KEY ...
|
||||||
|
# --
|
||||||
|
CONSTRAINT [${1:FK_Name}] FOREIGN KEY ${2:CLUSTERED} ([${3:ColumnName}])
|
10
snippets/text-mode/sql-mode/create
Normal file
10
snippets/text-mode/sql-mode/create
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : create table ...
|
||||||
|
# --
|
||||||
|
CREATE TABLE [${1:dbo}].[${2:TableName}]
|
||||||
|
(
|
||||||
|
${3:Id} ${4:INT IDENTITY(1,1)} ${5:NOT NULL}
|
||||||
|
$0
|
||||||
|
CONSTRAINT [${6:PK_}] PRIMARY KEY ${7:CLUSTERED} ([$3])
|
||||||
|
)
|
||||||
|
GO
|
12
snippets/text-mode/sql-mode/create.1
Normal file
12
snippets/text-mode/sql-mode/create.1
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : create procedure ...
|
||||||
|
# --
|
||||||
|
CREATE PROCEDURE [${1:dbo}].[${2:Name}]
|
||||||
|
(
|
||||||
|
$3 $4 = ${5:NULL} ${6:OUTPUT}
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
$0
|
||||||
|
END
|
||||||
|
GO
|
4
snippets/text-mode/sql-mode/references
Normal file
4
snippets/text-mode/sql-mode/references
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#contributor : Alejandro Espinoza Esparza <aespinoza@structum.com.mx>
|
||||||
|
#name : REFERENCES ...
|
||||||
|
# --
|
||||||
|
REFERENCES ${1:TableName}([${2:ColumnName}])
|
Loading…
x
Reference in New Issue
Block a user