Element SnippetType (urywki kodu IntelliSense)
Określa, jak Visual Studio powoduje wstawienie wstawki kodu programu.
<SnippetType>
SurroundsWith/Expansion
<SnippetType>
Atrybuty i elementy
W poniższych sekcjach opisano atrybuty i elementy podrzędne elementy nadrzędne.
Atrybuty
Brak.
Elementy podrzędne
Brak.
Elementy nadrzędne
Element |
Opis |
---|---|
Grupy SnippetType elementy. |
Wartość tekstowa
Wartości tekstowe muszą jedną z wartości folllowing.
SurroundsWith: Umożliwia wstawki kodu programu do umieszczona wokół wybranego fragmentu kodu.
Expansion: umożliwia urywek kodu ma zostać wstawiony przy kursorze.
Refactoring: Określa, że wstawki kodu programu jest używany podczas Visual C# przeróbek.Refactoringnie można używać w urywki kodu niestandardowego.
Przykład
SnippetType Element poniższy urywek kodu ma wartość Expansion.Oznacza to, że wstawki kodu programu może być wstawiany przy kursorze.
<CodeSnippets xmlns="https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Copy File</Title>
<Author>Microsoft Corporation</Author>
<Description>Copies a file and saves it as another file.</Description>
<HelpUrl>www.microsoft.com</HelpUrl>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Keywords>
<Keyword>File copying</Keyword>
<Keyword>Copying files</Keyword>
</Keywords>
<Shortcut>copyfile</Shortcut>
</Header>
<Snippet>
<!-- Insert snippet information here -->
</Snippet>
</CodeSnippet>
</CodeSnippets>