AbstractMetadataAsSourceService.AbstractWrappedNamespaceOrTypeSymbol.cs 1.6 KB
Newer Older
1 2 3
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Collections.Immutable;
4
using Microsoft.CodeAnalysis.DocumentationComments;
5 6 7 8 9 10 11

namespace Microsoft.CodeAnalysis.MetadataAsSource
{
    internal partial class AbstractMetadataAsSourceService
    {
        private abstract class AbstractWrappedNamespaceOrTypeSymbol : AbstractWrappedSymbol, INamespaceOrTypeSymbol
        {
12
            private readonly INamespaceOrTypeSymbol _symbol;
13 14 15 16

            protected AbstractWrappedNamespaceOrTypeSymbol(INamespaceOrTypeSymbol symbol, bool canImplementImplicitly, IDocumentationCommentFormattingService docCommentFormattingService)
                : base(symbol, canImplementImplicitly, docCommentFormattingService)
            {
17
                _symbol = symbol;
18 19 20 21 22 23 24 25 26 27 28 29
            }

            public abstract ImmutableArray<ISymbol> GetMembers();
            public abstract ImmutableArray<ISymbol> GetMembers(string name);
            public abstract ImmutableArray<INamedTypeSymbol> GetTypeMembers();
            public abstract ImmutableArray<INamedTypeSymbol> GetTypeMembers(string name);
            public abstract ImmutableArray<INamedTypeSymbol> GetTypeMembers(string name, int arity);

            public bool IsNamespace
            {
                get
                {
30
                    return _symbol.IsNamespace;
31 32 33 34 35 36 37
                }
            }

            public bool IsType
            {
                get
                {
38
                    return _symbol.IsType;
39 40 41 42 43
                }
            }
        }
    }
}