public static void PopulateMethodList(XMLMethods methods, List <CompNamed> method_list)
        {
            foreach (object key in methods.keys.Keys)
            {
                XMLMethods.SignatureFlags signatureFlags = (methods.signatureFlags != null &&
                                                            methods.signatureFlags.ContainsKey(key) ?
                                                            (XMLMethods.SignatureFlags)methods.signatureFlags [key] :
                                                            XMLMethods.SignatureFlags.None);

                XMLParameters parameters = (methods.parameters == null ? null
                                                            : (XMLParameters)methods.parameters[key]);
                XMLGenericParameters genericParameters = (methods.genericParameters == null ? null
                                                                                  : (XMLGenericParameters)methods.genericParameters[key]);
                XMLAttributes attributes = (methods.attributeMap == null ? null
                                                            : (XMLAttributes)methods.attributeMap[key]);
                string returnType = (methods.returnTypes == null ? null
                                                     : (string)methods.returnTypes[key]);
                method_list.Add(new MasterMethod((string)methods.keys[key],
                                                 signatureFlags,
                                                 returnType,
                                                 parameters,
                                                 genericParameters,
                                                 methods.ConvertToString(Int32.Parse((string)methods.access[key])),
                                                 attributes));
            }
        }
 public MasterMethod(string name,
                     XMLMethods.SignatureFlags signatureFlags,
                     string returnType,
                     XMLParameters parameters,
                     XMLGenericParameters genericParameters,
                     string methodAccess,
                     XMLAttributes attributes)
     : base(String.Format("{0} {1}", returnType, name))
 {
     this.signatureFlags    = signatureFlags;
     this.returnType        = returnType;
     this.parameters        = parameters;
     this.genericParameters = genericParameters;
     // we don't care about the Assembly (internal) part
     this.methodAccess = methodAccess.Replace("FamORAssem", "Family");
     this.attributes   = attributes;
 }
Esempio n. 3
0
        public MasterMethod(string name,
		                     XMLMethods.SignatureFlags signatureFlags,
		                     string returnType,
		                     XMLParameters parameters,
		                     XMLGenericParameters genericParameters,
		                     string methodAccess,
		                     XMLAttributes attributes)
            : base(String.Format ("{0} {1}", returnType, name))
        {
            this.signatureFlags = signatureFlags;
            this.returnType = returnType;
            this.parameters = parameters;
            this.genericParameters = genericParameters;
            // we don't care about the Assembly (internal) part
            this.methodAccess = methodAccess.Replace ("FamORAssem", "Family");
            this.attributes = attributes;
        }