Add para [Parameter] Code Snippet
Code Snippet Category is Blazor. Added in the existing VSIX.
This commit is contained in:
parent
a1e613b717
commit
3a89b5121f
|
|
@ -0,0 +1,2 @@
|
|||
[$RootKey$\Languages\CodeExpansions\CSharp\Paths]
|
||||
"Blazor"="$PackageFolder$\CodeSnippets\Blazor"
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
|
||||
<CodeSnippet Format="1.0.0">
|
||||
<Header>
|
||||
<Title>para</Title>
|
||||
<Shortcut>para</Shortcut>
|
||||
<Description>Code snippet for an automatically implemented parameter for Blazor</Description>
|
||||
<Author>Microsoft</Author>
|
||||
<SnippetTypes>
|
||||
<SnippetType>Expansion</SnippetType>
|
||||
</SnippetTypes>
|
||||
</Header>
|
||||
<Snippet>
|
||||
<Declarations>
|
||||
<Literal>
|
||||
<ID>type</ID>
|
||||
<ToolTip>Parameter type</ToolTip>
|
||||
<Default>int</Default>
|
||||
</Literal>
|
||||
<Literal>
|
||||
<ID>property</ID>
|
||||
<ToolTip>Parameter name</ToolTip>
|
||||
<Default>MyParmeter</Default>
|
||||
</Literal>
|
||||
</Declarations>
|
||||
<Code Language="csharp">
|
||||
<![CDATA[[Parameter] protected $type$ $property$ { get; set; }$end$]]>
|
||||
</Code>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</CodeSnippets>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
|
||||
|
|
@ -113,6 +113,10 @@
|
|||
this problem, we're only using the P2P references to force build ordering. Then we include the build
|
||||
output of those projects as content.
|
||||
-->
|
||||
<Content Include="CodeSnippets.pkgdef">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<Content Include="Templates.pkgdef" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Blazor.Templates\Microsoft.AspNetCore.Blazor.Templates.csproj">
|
||||
<Project>{edd21533-c6e6-4f85-be4f-10e06756e24c}</Project>
|
||||
|
|
@ -258,6 +262,10 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="CodeSnippets\Blazor\para.snippet">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<IncludeInVSIX>true</IncludeInVSIX>
|
||||
</Content>
|
||||
<None Include="Key.snk" />
|
||||
<None Include="source.extension.vsixmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="File" Path="Microsoft.AspNetCore.Blazor.Razor.Extensions.dll" />
|
||||
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="File" Path="Microsoft.VisualStudio.LanguageServices.Blazor.dll" />
|
||||
<Asset Type="Microsoft.VisualStudio.VsPackage" Path="Templates.pkgdef" />
|
||||
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="CodeSnippets.pkgdef" />
|
||||
</Assets>
|
||||
<Prerequisites>
|
||||
<Prerequisite Id="Microsoft.VisualStudio.Component.Web" Version="[15.7.27520.0,16.0)" DisplayName="ASP.NET and web development tools" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue