//
// Text representation of type used by documentation writer
//
- public override string GetSignatureForDocumentation ()
+ public sealed override string GetSignatureForDocumentation ()
+ {
+ return GetSignatureForDocumentation (false);
+ }
+
+ public virtual string GetSignatureForDocumentation (bool explicitName)
{
StringBuilder sb = new StringBuilder ();
if (IsNested) {
- sb.Append (DeclaringType.GetSignatureForDocumentation ());
- } else {
- sb.Append (MemberDefinition.Namespace);
+ sb.Append (DeclaringType.GetSignatureForDocumentation (explicitName));
+ } else if (MemberDefinition.Namespace != null) {
+ sb.Append (explicitName ? MemberDefinition.Namespace.Replace ('.', '#') : MemberDefinition.Namespace);
}
if (sb.Length != 0)
- sb.Append (".");
+ sb.Append (explicitName ? "#" : ".");
sb.Append (Name);
if (Arity > 0) {
if (i > 0)
sb.Append (",");
- sb.Append (TypeArguments[i].GetSignatureForDocumentation ());
+ sb.Append (TypeArguments[i].GetSignatureForDocumentation (explicitName));
}
sb.Append ("}");
} else {
return sb.ToString ();
}
- public string GetExplicitNameSignatureForDocumentation ()
- {
- StringBuilder sb = new StringBuilder ();
- if (IsNested) {
- sb.Append (DeclaringType.GetExplicitNameSignatureForDocumentation ());
- } else if (MemberDefinition.Namespace != null) {
- sb.Append (MemberDefinition.Namespace.Replace ('.', '#'));
- }
-
- if (sb.Length != 0)
- sb.Append ("#");
-
- sb.Append (Name);
- if (Arity > 0) {
- sb.Append ("{");
- for (int i = 0; i < Arity; ++i) {
- if (i > 0)
- sb.Append (",");
-
- sb.Append (TypeArguments[i].GetExplicitNameSignatureForDocumentation ());
- }
- sb.Append ("}");
- }
-
- return sb.ToString ();
- }
-
public override string GetSignatureForError ()
{
string s;
case MemberKind.Struct:
case MemberKind.Enum:
case MemberKind.Void:
+ case MemberKind.PointerType:
return false;
case MemberKind.InternalCompilerType:
//
public static readonly InternalType FakeInternalType = new InternalType ("<fake$type>");
public static readonly InternalType Namespace = new InternalType ("<namespace>");
public static readonly InternalType ErrorType = new InternalType ("<error>");
+ public static readonly InternalType VarOutType = new InternalType ("var out");
readonly string name;
#endregion
+ public override void CheckObsoleteness (IMemberContext mc, Location loc)
+ {
+ Element.CheckObsoleteness (mc, loc);
+ }
+
public override ObsoleteAttribute GetAttributeObsolete ()
{
return Element.GetAttributeObsolete ();
return null;
}
- public override string GetSignatureForDocumentation ()
+ public override string GetSignatureForDocumentation (bool explicitName)
{
- return Element.GetSignatureForDocumentation () + GetPostfixSignature ();
+ return Element.GetSignatureForDocumentation (explicitName) + GetPostfixSignature ();
}
public override string GetSignatureForError ()
return sb.ToString ();
}
- public override string GetSignatureForDocumentation ()
+ public override string GetSignatureForDocumentation (bool explicitName)
{
StringBuilder sb = new StringBuilder ();
- GetElementSignatureForDocumentation (sb);
+ GetElementSignatureForDocumentation (sb, explicitName);
return sb.ToString ();
}
- void GetElementSignatureForDocumentation (StringBuilder sb)
+ void GetElementSignatureForDocumentation (StringBuilder sb, bool explicitName)
{
var ac = Element as ArrayContainer;
if (ac == null)
- sb.Append (Element.GetSignatureForDocumentation ());
+ sb.Append (Element.GetSignatureForDocumentation (explicitName));
else
- ac.GetElementSignatureForDocumentation (sb);
+ ac.GetElementSignatureForDocumentation (sb, explicitName);
- sb.Append ("[");
- for (int i = 1; i < rank; i++) {
- if (i == 1)
- sb.Append ("0:");
+ if (explicitName) {
+ sb.Append (GetPostfixSignature (rank));
+ } else {
+ sb.Append ("[");
+ for (int i = 1; i < rank; i++) {
+ if (i == 1)
+ sb.Append ("0:");
- sb.Append (",0:");
+ sb.Append (",0:");
+ }
+ sb.Append ("]");
}
- sb.Append ("]");
}
public static ArrayContainer MakeType (ModuleContainer module, TypeSpec element)
return ac;
}
+
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
+ {
+ return Element.ResolveMissingDependencies (caller);
+ }
}
class ReferenceContainer : ElementTypeSpec