예제 #1
0
파일: TypeGroup.cs 프로젝트: MilkTool/chela
        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);
        }
예제 #2
0
        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);
        }