summaryrefslogtreecommitdiffstats
path: root/tools/Sandcastle/Source/Reflection/ApiNamer.cs
blob: ade218faac27a726cb78e7b8f8b09094fc6c368e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation.  All rights reserved.
//

using System.Compiler;

namespace Microsoft.Ddue.Tools.Reflection {

    public abstract class ApiNamer {

        public virtual string GetApiName(Member api) {

            Namespace space = api as Namespace;
            if (space != null) return (GetNamespaceName(space));

            TypeNode type = api as TypeNode;
            if (type != null) return (GetTypeName(type));

            return (GetMemberName(api));

        }

        public abstract string GetMemberName(Member member);

        public abstract string GetNamespaceName(Namespace space);

        public abstract string GetTypeName(TypeNode type);

    }

}