public override string GetDisplayName() { if (displayName == null) { StringBuilder builder = new StringBuilder(); if (parentScope != null) { builder.Append(parentScope.GetDisplayName()); builder.Append('.'); } builder.Append(name); displayName = builder.ToString(); } return(displayName); }
public virtual string GetDisplayName() { Scope parentScope = GetParentScope(); string ret = string.Empty; if (parentScope != null) { string parentFullname = parentScope.GetDisplayName(); if (!string.IsNullOrEmpty(parentFullname)) { ret = parentFullname + "." + GetName(); } else { ret = GetName(); } } else { ret = GetName(); } // Add the generic instance. GenericInstance instance = GetGenericInstance(); if (instance != null) { ret += instance.GetDisplayName(); } // Add the generic prototype. GenericPrototype proto = GetGenericPrototype(); if (proto != null) { ret += proto.GetDisplayName(); } return(ret); }