1 instantiation of CodeSnippet
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
112
return ReadCodeSnippetElements(document)?.Select(element => new
CodeSnippet
(element)).ToImmutableArray();
14 references to CodeSnippet
Microsoft.CodeAnalysis.LanguageServer.Protocol (14)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (10)
63
public static
CodeSnippet
ReadSnippetFromFile(string filePath, string snippetTitle)
69
var
matchingSnippet = snippets.Value.Single(s => string.Equals(s.Title, snippetTitle, StringComparison.OrdinalIgnoreCase));
110
internal static ImmutableArray<
CodeSnippet
>? ReadSnippets(XDocument document)
132
public ExpansionTemplate(
CodeSnippet
snippet)
134
var snippetElement =
CodeSnippet
.GetElementWithoutNamespace(snippet.CodeSnippetElement, "Snippet");
135
var declarationsElement =
CodeSnippet
.GetElementWithoutNamespace(snippetElement, "Declarations");
137
var code =
CodeSnippet
.GetElementWithoutNamespace(snippetElement, "Code");
161
var functionElement =
CodeSnippet
.GetElementWithoutNamespace(declarationElement, "Function");
164
CodeSnippet
.GetElementInnerText(declarationElement, "ID"),
165
CodeSnippet
.GetElementInnerText(declarationElement, "Default") ?? " ",
Handler\InlineCompletions\XmlSnippetParser.cs (4)
68
var
matchingSnippet = RetrieveSnippetXmlFromFile(snippetInfo);
84
private static
CodeSnippet
RetrieveSnippetXmlFromFile(SnippetInfo snippetInfo)
99
var
snippet =
CodeSnippet
.ReadSnippetFromFile(snippetInfo.Path, snippetInfo.Title);