Ejemplo n.º 1
0
        public string get_Prototype(int Flags)
        {
            vsCMPrototype flags = (vsCMPrototype)Flags;

            if ((flags & vsCMPrototype.vsCMPrototypeType) != 0)
            {
                CodeMemberField cmf = CodeObject as CodeMemberField;

                if (cmf != null)
                {
                    return(cmf.Name + " : " + cmf.Type.BaseType);
                }
            }

            return("");
        }
Ejemplo n.º 2
0
        public string get_Prototype(int Flags)
        {
            CodeMemberMethod cmm = CodeObject as CodeMemberMethod;

            if (cmm == null)
            {
                return(cmm.Name);
            }

            vsCMPrototype flags = (vsCMPrototype)Flags;

            StringBuilder sb = new StringBuilder(Name);

            if ((flags & vsCMPrototype.vsCMPrototypeParamTypes) != 0)
            {
                sb.Append(" (");

                bool first = true;

                foreach (CodeParameterDeclarationExpression cpde in cmm.Parameters)
                {
                    first = false;
                    sb.Append(cpde.Type.BaseType);
                    sb.Append(", ");
                }

                if (!first)
                {
                    sb.Length = sb.Length - 2;
                }

                sb.Append(")");
            }

            if ((flags & vsCMPrototype.vsCMPrototypeType) != 0)
            {
                sb.Append(" : ");
                sb.Append(cmm.ReturnType.BaseType);
            }

            return(sb.ToString());
        }