Repository: dotnet/roslyn
File: src/Features/Core/Portable/Completion/Providers/SymbolCompletionItem.cs (C#)

Code before:

    public static CompletionItem AddShouldProvideParenthesisCompletion(CompletionItem item)
        => item.AddProperty("ShouldProvideParenthesisCompletion", true.ToString());

    public static bool GetShouldProvideParenthesisCompletion(CompletionItem item)
    {
        if (item.TryGetProperty("ShouldProvideParenthesisCompletion", out _))
        {
            return true;
        }

        return false;
    }

    public static CompletionItem AddHasAccessibleNestedTypes(CompletionItem item)
        => item.AddProperty("HasAccessibleNestedTypes", true.ToString());

    public static bool GetHasAccessibleNestedTypes(CompletionItem item)
    {
        if (item.TryGetProperty("HasAccessibleNestedTypes", out _))
        {
            return true;
        }

        return false;
    }

    public static string EncodeSymbols(ImmutableArray<ISymbol> symbols)
    {
        if (symbols.Length > 1)
        {
            return string.Join("|", symbols.Select(EncodeSymbol));
        }
        else if (symbols.Length == 1)
        {
            return EncodeSymbol(symbols[0]);
        }
        else
        {
            return string.Empty;
        }
    }

    public static string EncodeSymbol(ISymbol symbol)
        => SymbolKey.CreateString(symbol);

    public static bool HasSymbols(CompletionItem item)
        => item.TryGetProperty("Symbols", out var _);

    private static readonly char[] s_symbolSplitters = ['|'];


Review comment (suggestion):
```suggestion
    public static bool GetHasAccessibleNestedTypes(CompletionItem item)
        => item.TryGetProperty("HasAccessibleNestedTypes", out _);
```

Code after:

    public static CompletionItem AddShouldProvideParenthesisCompletion(CompletionItem item)
        => item.AddProperty("ShouldProvideParenthesisCompletion", true.ToString());

    public static bool GetShouldProvideParenthesisCompletion(CompletionItem item)
    {
        if (item.TryGetProperty("ShouldProvideParenthesisCompletion", out _))
        {
            return true;
        }

        return false;
    }

    public static CompletionItem AddHasAccessibleNestedTypes(CompletionItem item)
        => item.AddProperty("HasAccessibleNestedTypes", true.ToString());

    public static bool GetHasAccessibleNestedTypes(CompletionItem item)
        => item.TryGetProperty("HasAccessibleNestedTypes", out _);

    public static string EncodeSymbols(ImmutableArray<ISymbol> symbols)
    {
        if (symbols.Length > 1)
        {
            return string.Join("|", symbols.Select(EncodeSymbol));
        }
        else if (symbols.Length == 1)
        {
            return EncodeSymbol(symbols[0]);
        }
        else
        {
            return string.Empty;
        }
    }

    public static string EncodeSymbol(ISymbol symbol)
        => SymbolKey.CreateString(symbol);

    public static bool HasSymbols(CompletionItem item)
        => item.TryGetProperty("Symbols", out var _);

    private static readonly char[] s_symbolSplitters = ['|'];

    public static async Task<ImmutableArray<ISymbol>> GetSymbolsAsync(CompletionItem item, Document document, CancellationToken cancellationToken)
    {
        if (item.TryGetProperty("Symbols", out var symbolIds))
        {
            var idList = symbolIds.Split(s_symbolSplitters, StringSplitOptions.RemoveEmptyEntries).ToList();
            using var _ = ArrayBuilder<ISymbol>.GetInstance(out var symbols);