29 references to TryGetProperty
Microsoft.CodeAnalysis.Features (29)
Completion\CommonCompletionItem.cs (2)
64=> item.TryGetProperty(DescriptionProperty, out var _); 68if (item.TryGetProperty(DescriptionProperty, out var encodedDescription))
Completion\CompletionItem.cs (1)
131if (TryGetProperty(name, out var value))
Completion\Providers\AbstractCrefCompletionProvider.cs (1)
24if (item.TryGetProperty(HideAdvancedMembers, out var hideAdvancedMembersString) &&
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (9)
96Debug.Assert(!attributeItem.TryGetProperty(AttributeFullName, out var _)); 162var typeName = item.TryGetProperty(AttributeFullName, out var attributeFullName) 166if (item.TryGetProperty(TypeAritySuffixName, out var aritySuffix)) 180if (item.TryGetProperty(MethodKey, out var methodSymbolKey)) 186var overloadCount = item.TryGetProperty(OverloadCountKey, out var overloadCountString) && int.TryParse(overloadCountString, out var count) ? count : 0; 189if (item.TryGetProperty(ReceiverKey, out var receiverTypeKey)) 206var typeName = item.TryGetProperty(AttributeFullName, out var attributeFullName) ? attributeFullName : item.DisplayText; 212if (item.TryGetProperty(TypeAritySuffixName, out var aritySuffix)) 227public static bool ShouldAlwaysFullyQualify(CompletionItem item) => item.TryGetProperty(AlwaysFullyQualifyKey, out var _);
Completion\Providers\MemberInsertingCompletionItem.cs (3)
43if (item.TryGetProperty("Modifiers", out var text) && 54if (item.TryGetProperty("Line", out var text) 65if (item.TryGetProperty("TokenSpanEnd", out var text)
Completion\Providers\Snippets\SnippetCompletionItem.cs (3)
44Contract.ThrowIfFalse(item.TryGetProperty(SnippetIdentifierKey, out var text)); 50Contract.ThrowIfFalse(item.TryGetProperty("Position", out var text)); 57return item.TryGetProperty(SnippetIdentifierKey, out var _);
Completion\Providers\SymbolCompletionItem.cs (10)
102if (item.TryGetProperty("ShouldProvideParenthesisCompletion", out _)) 130=> item.TryGetProperty("Symbols", out var _); 136if (item.TryGetProperty("Symbols", out var symbolIds)) 236if (item.TryGetProperty("InvalidProjects", out var invalidProjects) 237&& item.TryGetProperty("CandidateProjects", out var candidateProjects)) 250if (item.TryGetProperty("ContextPosition", out var text) && 268=> item.TryGetProperty(InsertionTextProperty, out insertionText); 351=> item.TryGetProperty("SymbolName", out var name) ? name : null; 354=> item.TryGetProperty("SymbolKind", out var kind) ? (SymbolKind?)int.Parse(kind) : null; 357=> item.TryGetProperty("IsGeneric", out var v) && bool.TryParse(v, out var isGeneric) && isGeneric;