XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.VSIX

【VSIX】XFEExtension的Visual Studio扩展

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFEExtension.NetCore.VSIX

添加数个代码片段

1414e70
XFE工作室室长 <xfe18827675401@126.com>
提交于

代码差异

10 个文件 +226 -27
Added XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/ac.snippet +42 -0
@@ -0,0 +1,42 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3 <CodeSnippet Format="1.0.0">
4 <Header>
5 <Title>ac</Title>
6 <Shortcut>ac</Shortcut>
7 <Description>Auto Config Snippet</Description>
8 <Author>XFEstudio</Author>
9 <SnippetTypes>
10 <SnippetType>Expansion</SnippetType>
11 </SnippetTypes>
12 </Header>
13 <Snippet>
14 <References>
15 <Reference>
16 <Assembly>XFEExtension.NetCore.AutoConfig</Assembly>
17 </Reference>
18 </References>
19 <Imports>
20 <Import>
21 <Namespace>XFEExtension.NetCore.AutoConfig</Namespace>
22 </Import>
23 </Imports>
24 <Declarations>
25 <Literal>
26 <ID>type</ID>
27 <ToolTip>Config Type</ToolTip>
28 <Default>int</Default>
29 </Literal>
30 <Literal>
31 <ID>name</ID>
32 <ToolTip>Config Name (start with small letter)</ToolTip>
33 <Default>configField</Default>
34 </Literal>
35 </Declarations>
36 <Code Language="csharp">
37 <![CDATA[[ProfileProperty]
38 private $type$ $name$;$end$]]>
39 </Code>
40 </Snippet>
41 </CodeSnippet>
42 </CodeSnippets>
Added XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/ap.snippet +37 -0
@@ -0,0 +1,37 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3 <CodeSnippet Format="1.0.0">
4 <Header>
5 <Title>ac</Title>
6 <Shortcut>ac</Shortcut>
7 <Description>Auto Path Snippet</Description>
8 <Author>XFEstudio</Author>
9 <SnippetTypes>
10 <SnippetType>Expansion</SnippetType>
11 </SnippetTypes>
12 </Header>
13 <Snippet>
14 <References>
15 <Reference>
16 <Assembly>XFEExtension.NetCore.AutoPath</Assembly>
17 </Reference>
18 </References>
19 <Imports>
20 <Import>
21 <Namespace>XFEExtension.NetCore.AutoPath</Namespace>
22 </Import>
23 </Imports>
24 <Declarations>
25 <Literal>
26 <ID>name</ID>
27 <ToolTip>Path Name (start with small letter)</ToolTip>
28 <Default>pathNameField</Default>
29 </Literal>
30 </Declarations>
31 <Code Language="csharp">
32 <![CDATA[[AutoPath]
33 private readonly string $name$;$end$]]>
34 </Code>
35 </Snippet>
36 </CodeSnippet>
37 </CodeSnippets>
Modified XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/cr.snippet +1 -1
@@ -4,7 +4,7 @@
4 4 <Header>
5 5 <Title>cr</Title>
6 6 <Shortcut>cr</Shortcut>
7 <Description>Console.ReadLine 的代码片段</Description>
7 <Description>Console.ReadLine Snippet</Description>
8 8 <Author>XFEstudio</Author>
9 9 <SnippetTypes>
10 10 <SnippetType>Expansion</SnippetType>
Added XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/mt.snippet +35 -0
@@ -0,0 +1,35 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3 <CodeSnippet Format="1.0.0">
4 <Header>
5 <Title>mt</Title>
6 <Shortcut>mt</Shortcut>
7 <Description>Method Test's Snippet</Description>
8 <Author>XFEstudio</Author>
9 <SnippetTypes>
10 <SnippetType>Expansion</SnippetType>
11 </SnippetTypes>
12 </Header>
13 <Snippet>
14 <Declarations>
15 <Literal>
16 <ID>type</ID>
17 <ToolTip>Method Return Type</ToolTip>
18 <Default>void</Default>
19 </Literal>
20 <Literal>
21 <ID>name</ID>
22 <ToolTip>Method Name</ToolTip>
23 <Default>TestMethod</Default>
24 </Literal>
25 </Declarations>
26 <Code Language="csharp" Kind="method decl">
27 <![CDATA[[MTest]
28 public $type$ $name$()
29 {
30 $end$
31 }]]>
32 </Code>
33 </Snippet>
34 </CodeSnippet>
35 </CodeSnippets>
Added XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/smt.snippet +35 -0
@@ -0,0 +1,35 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3 <CodeSnippet Format="1.0.0">
4 <Header>
5 <Title>smt</Title>
6 <Shortcut>smt</Shortcut>
7 <Description>Static Method Test's Snippet</Description>
8 <Author>XFEstudio</Author>
9 <SnippetTypes>
10 <SnippetType>Expansion</SnippetType>
11 </SnippetTypes>
12 </Header>
13 <Snippet>
14 <Declarations>
15 <Literal>
16 <ID>type</ID>
17 <ToolTip>Method Return Type</ToolTip>
18 <Default>void</Default>
19 </Literal>
20 <Literal>
21 <ID>name</ID>
22 <ToolTip>Method Name</ToolTip>
23 <Default>TestMethod</Default>
24 </Literal>
25 </Declarations>
26 <Code Language="csharp" Kind="method decl">
27 <![CDATA[[SMTest]
28 public static $type$ $name$()
29 {
30 $end$
31 }]]>
32 </Code>
33 </Snippet>
34 </CodeSnippet>
35 </CodeSnippets>
Modified XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/to.snippet +3 -8
@@ -4,20 +4,15 @@
4 4 <Header>
5 5 <Title>to</Title>
6 6 <Shortcut>to</Shortcut>
7 <Description>TODO任务的代码片段</Description>
7 <Description>TODO Task Snippet</Description>
8 8 <Author>XFEstudio</Author>
9 9 <SnippetTypes>
10 10 <SnippetType>Expansion</SnippetType>
11 <SnippetType>SurroundsWith</SnippetType>
11 12 </SnippetTypes>
12 13 </Header>
13 14 <Snippet>
14 <Declarations>
15 <Literal Editable="false">
16 <ID>TodoTask</ID>
17 <ToolTip>TODO comment</ToolTip>
18 </Literal>
19 </Declarations>
20 <Code Language="csharp"><![CDATA[//TODO: $end$]]>
15 <Code Language="csharp" Kind="any"><![CDATA[//TODO: $end$]]>
21 16 </Code>
22 17 </Snippet>
23 18 </CodeSnippet>
Added XFEExtension.NetCore.VSIX/XFEExtension CodeSnippets/XFEExtension CSharp/tol.snippet +35 -0
@@ -0,0 +1,35 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
3 <CodeSnippet Format="1.0.0">
4 <Header>
5 <Title>tol</Title>
6 <Shortcut>tol</Shortcut>
7 <Description>TODO Task With Level Snippet</Description>
8 <Author>XFEstudio</Author>
9 <SnippetTypes>
10 <SnippetType>Expansion</SnippetType>
11 <SnippetType>SurroundsWith</SnippetType>
12 </SnippetTypes>
13 </Header>
14 <Snippet>
15 <References>
16 <Reference>
17 <Assembly>XFEExtension.NetCore.TodoHighLight</Assembly>
18 </Reference>
19 </References>
20 <Declarations>
21 <Literal>
22 <ID>level</ID>
23 <ToolTip>TODO Comment Warning Level
24 0 - Hidden
25 1 - Tip
26 2 - Warning
27 3 - Error</ToolTip>
28 <Default>2</Default>
29 </Literal>
30 </Declarations>
31 <Code Language="csharp" Kind="any"><![CDATA[//TODO:$level$ $end$]]>
32 </Code>
33 </Snippet>
34 </CodeSnippet>
35 </CodeSnippets>
Modified XFEExtension.NetCore.VSIX/XFEExtension.NetCore.VSIX.csproj +20 -0
@@ -64,6 +64,26 @@
64 64 <None Include="source.extension.vsixmanifest">
65 65 <SubType>Designer</SubType>
66 66 </None>
67 <Content Include="XFEExtension CodeSnippets\XFEExtension CSharp\smt.snippet">
68 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
69 <IncludeInVSIX>true</IncludeInVSIX>
70 </Content>
71 <Content Include="XFEExtension CodeSnippets\XFEExtension CSharp\mt.snippet">
72 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
73 <IncludeInVSIX>true</IncludeInVSIX>
74 </Content>
75 <Content Include="XFEExtension CodeSnippets\XFEExtension CSharp\ac.snippet">
76 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
77 <IncludeInVSIX>true</IncludeInVSIX>
78 </Content>
79 <Content Include="XFEExtension CodeSnippets\XFEExtension CSharp\ap.snippet">
80 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
81 <IncludeInVSIX>true</IncludeInVSIX>
82 </Content>
83 <Content Include="XFEExtension CodeSnippets\XFEExtension CSharp\tol.snippet">
84 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
85 <IncludeInVSIX>true</IncludeInVSIX>
86 </Content>
67 87 </ItemGroup>
68 88 <ItemGroup>
69 89 <Reference Include="PresentationCore" />
Modified XFEExtension.NetCore.VSIX/XFEExtension.NetCore.VSIXPackage.cs +17 -17
@@ -27,27 +27,27 @@ namespace XFEExtension.NetCore.VSIX
27 27 [Guid(XFEExtensionVSIX.PackageGuidString)]
28 28 public sealed class XFEExtensionVSIX : AsyncPackage
29 29 {
30 /// <summary>
30 /// <summary>
31 31 /// XFEExtensionVSIX GUID string.
32 32 /// </summary>
33 33 public const string PackageGuidString = "32b24864-1c8f-44d1-acb3-8bff3496a2f1";
34 34
35 #region Package Members
35 #region Package Members
36 36
37 /// <summary>
38 /// Initialization of the package; this method is called right after the package is sited, so this is the place
39 /// where you can put all the initialization code that rely on services provided by VisualStudio.
40 /// </summary>
41 /// <param name="cancellationToken">A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.</param>
42 /// <param name="progress">A provider for progress updates.</param>
43 /// <returns>A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.</returns>
44 protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
45 {
46 // When initialized asynchronously, the current thread may be a background thread at this point.
47 // Do any initialization that requires the UI thread after switching to the UI thread.
48 await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
49 }
37 /// <summary>
38 /// Initialization of the package; this method is called right after the package is sited, so this is the place
39 /// where you can put all the initialization code that rely on services provided by VisualStudio.
40 /// </summary>
41 /// <param name="cancellationToken">A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.</param>
42 /// <param name="progress">A provider for progress updates.</param>
43 /// <returns>A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.</returns>
44 protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
45 {
46 // When initialized asynchronously, the current thread may be a background thread at this point.
47 // Do any initialization that requires the UI thread after switching to the UI thread.
48 await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
49 }
50 50
51 #endregion
52 }
51 #endregion
52 }
53 53 }
Modified XFEExtension.NetCore.VSIX/source.extension.vsixmanifest +1 -1
@@ -1,7 +1,7 @@
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3 3 <Metadata>
4 <Identity Id="XFEExtension.NetCore.VSIX.26e90afd-9260-4229-819a-61538e0198f7" Version="1.0" Language="zh-CN" Publisher="XFEstudio" />
4 <Identity Id="XFEExtension.NetCore.VSIX.26e90afd-9260-4229-819a-61538e0198f7" Version="0.1" Language="zh-CN" Publisher="XFEstudio" />
5 5 <DisplayName>XFEExtension.NetCore.VSIX</DisplayName>
6 6 <Description xml:space="preserve">A Extension VSIX package based on the XFEExtenison.NetCore Nuget Package</Description>
7 7 <License>LICENSE.txt</License>