summaryrefslogtreecommitdiffstats
path: root/tools/Sandcastle/Source/Reflection/ApiNamer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Sandcastle/Source/Reflection/ApiNamer.cs')
-rw-r--r--tools/Sandcastle/Source/Reflection/ApiNamer.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/Sandcastle/Source/Reflection/ApiNamer.cs b/tools/Sandcastle/Source/Reflection/ApiNamer.cs
new file mode 100644
index 0000000..ade218f
--- /dev/null
+++ b/tools/Sandcastle/Source/Reflection/ApiNamer.cs
@@ -0,0 +1,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);
+
+ }
+
+}