1 instantiation of CodeSnippet
Microsoft.VisualStudio.LanguageServices.Razor (1)
Snippets\XmlSnippetParser.CodeSnippet.cs (1)
104return ReadCodeSnippetElements(document).SelectAsArray(element => new CodeSnippet(element));
15 references to CodeSnippet
Microsoft.VisualStudio.LanguageServices.Razor (14)
Snippets\XmlSnippetParser.CodeSnippet.cs (3)
59public static CodeSnippet ReadSnippetFromFile(string filePath, string snippetTitle) 64var matchingSnippet = snippets.Single(s => string.Equals(s.Title, snippetTitle, StringComparison.OrdinalIgnoreCase)); 102public static ImmutableArray<CodeSnippet> ReadSnippets(XDocument document)
Snippets\XmlSnippetParser.cs (4)
31var matchingSnippet = RetrieveSnippetXmlFromFile(snippetInfo); 44private static CodeSnippet RetrieveSnippetXmlFromFile(SnippetInfo snippetInfo) 59var snippet = CodeSnippet.ReadSnippetFromFile(snippetInfo.Path, snippetInfo.Title);
Snippets\XmlSnippetParser.ExpansionTemplate.cs (7)
37public ExpansionTemplate(CodeSnippet snippet) 39var snippetElement = CodeSnippet.GetElementWithoutNamespace(snippet.CodeSnippetElement, "Snippet"); 40var declarationsElement = CodeSnippet.GetElementWithoutNamespace(snippetElement, "Declarations"); 42var code = CodeSnippet.GetElementWithoutNamespace(snippetElement, "Code"); 68var functionElement = CodeSnippet.GetElementWithoutNamespace(declarationElement, "Function"); 71CodeSnippet.GetElementInnerText(declarationElement, "ID"), 72CodeSnippet.GetElementInnerText(declarationElement, "Default") ?? " ",
Microsoft.VisualStudio.LanguageServices.Razor.UnitTests (1)
Cohost\CohostInlineCompletionEndpointTest.cs (1)
123var snippets = XmlSnippetParser.CodeSnippet.ReadSnippets(testSnippetsXml);