diff options
author | Rodrigo Moya <rodrigo.moya@xamarin.com> | 2019-09-23 17:28:55 +0300 |
---|---|---|
committer | Rodrigo Moya <rodrigo.moya@xamarin.com> | 2019-09-23 17:28:55 +0300 |
commit | fe05b36028c4ba7c81b83b7ef11321b310b7f786 (patch) | |
tree | 74f99f21d36c3de4e6af4893b49fb2a8a26664c6 /main/src | |
parent | 169d0b9e025990dce1ce4eac55492b11247604fa (diff) |
[AspNetCore] Add Razor Component file template
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/944132
Diffstat (limited to 'main/src')
4 files changed, 40 insertions, 0 deletions
diff --git a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj index 73e22982ba..ad2bef8f6b 100644 --- a/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj +++ b/main/src/addins/MonoDevelop.AspNetCore/MonoDevelop.AspNetCore.csproj @@ -132,6 +132,12 @@ <None Include="Resources\AspNetCore.filenesting.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="Templates\RazorComponent.xft.xml"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="Templates\RazorComponent.razor"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\core\MonoDevelop.Ide\MonoDevelop.Ide.csproj"> diff --git a/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml b/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml index 9311e171a0..fa4749ca05 100644 --- a/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml +++ b/main/src/addins/MonoDevelop.AspNetCore/Properties/MonoDevelop.AspNetCore.addin.xml @@ -43,6 +43,8 @@ file = "Templates/StartupClass.xft.xml"/>
<FileTemplate id = "AspNetCoreWebApiController"
file = "Templates/WebApiController.xft.xml"/>
+ <FileTemplate id = "AspNetCoreRazorComponent"
+ file = "Templates/RazorComponent.xft.xml"/>
<FileTemplate id = "AspNetCoreMVCViewImportsPage"
file = "Templates/MVCViewImportsPage.xft.xml"/>
diff --git a/main/src/addins/MonoDevelop.AspNetCore/Templates/RazorComponent.razor b/main/src/addins/MonoDevelop.AspNetCore/Templates/RazorComponent.razor new file mode 100644 index 0000000000..e167869c28 --- /dev/null +++ b/main/src/addins/MonoDevelop.AspNetCore/Templates/RazorComponent.razor @@ -0,0 +1,5 @@ +<h3>Component1</h3>
+
+@code {
+
+}
diff --git a/main/src/addins/MonoDevelop.AspNetCore/Templates/RazorComponent.xft.xml b/main/src/addins/MonoDevelop.AspNetCore/Templates/RazorComponent.xft.xml new file mode 100644 index 0000000000..0f64e5c402 --- /dev/null +++ b/main/src/addins/MonoDevelop.AspNetCore/Templates/RazorComponent.xft.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Template + originator="Microsoft" + created="2019/09/23" + lastModified="2019/09/23"> + + <TemplateConfiguration> + <_Name>Razor Component</_Name> + <Icon>md-html-file-icon</Icon> + <_Category>ASP.NET Core</_Category> + <LanguageName>C#</LanguageName> + <DefaultFilename>Index</DefaultFilename> + <_Description>A reusable UI component implemented with Razor</_Description> + </TemplateConfiguration> + + <Conditions> + <Or> + <AspNetCore minVersion="3.0"/> + <ProjectCapability Name="DotNetCoreRazor"/> + </Or> + </Conditions> + + <!-- Template Content --> + <TemplateFiles> + <File name="${Name}.razor" src="RazorComponent.razor" BuildAction="Compile" /> + </TemplateFiles> +</Template>
\ No newline at end of file |