Skip to content

Instantly share code, notes, and snippets.

@timheuer
Created October 11, 2019 21:53
Show Gist options
  • Save timheuer/23d6b8eb548313eee8cd86b1789c5632 to your computer and use it in GitHub Desktop.
Save timheuer/23d6b8eb548313eee8cd86b1789c5632 to your computer and use it in GitHub Desktop.
blazor component parameter
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Blazor Component Parameter</Title>
<Shortcut>param</Shortcut>
<Description>Code snippet for a parameter in a component with public get/set</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Property type</ToolTip>
<Default>string</Default>
</Literal>
<Literal>
<ID>property</ID>
<ToolTip>Property name</ToolTip>
<Default>MyProperty</Default>
</Literal>
</Declarations>
<Code Language="csharp"><![CDATA[[Parameter]
public $type$ $property$ { get; set; }$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment