public override List <CompNamed> GetMethods()
        {
            List <CompNamed> method_list = new List <CompNamed> ();

            MasterUtils.PopulateMethodList(xml_cls.methods, method_list);
            return(method_list);
        }
Exemple #2
0
        protected override void LoadExtraData(string name, XmlNode node)
        {
            XmlNode pNode = node.SelectSingleNode("properties");

            if (IsMonoTODOAttribute(name))
            {
                isTodo = true;
                if (pNode.ChildNodes [0].Attributes ["value"] != null)
                {
                    comment = pNode.ChildNodes [0].Attributes ["value"].Value;
                }
                return;
            }

            if (MasterUtils.IsImplementationSpecificAttribute(name))
            {
                return;
            }

            if (pNode != null)
            {
                XMLAttributeProperties p = new XMLAttributeProperties(name);
                p.LoadData(pNode);

                IDictionary <string, XMLAttributeProperties> properties = Properties;
                if (properties.ContainsKey(name))
                {
                    properties [name] = p;
                }
                else
                {
                    properties.Add(name, p);
                }
            }
        }
        public MasterClass(XMLClass cls, CompType type)
            : base(cls.name, type)
        {
            xml_cls = cls;

            interfaces   = new List <CompNamed>();
            constructors = new List <CompNamed>();
            methods      = new List <CompNamed>();
            properties   = new List <CompNamed>();
            fields       = new List <CompNamed>();
            events       = new List <CompNamed>();

            MasterUtils.PopulateMemberLists(xml_cls,
                                            interfaces,
                                            constructors,
                                            methods,
                                            properties,
                                            fields,
                                            events);

            delegate_list  = new List <CompNamed>();
            enum_list      = new List <CompNamed>();
            class_list     = new List <CompNamed>();
            struct_list    = new List <CompNamed>();
            interface_list = new List <CompNamed>();

            MasterUtils.PopulateTypeLists(xml_cls,
                                          class_list,
                                          enum_list,
                                          delegate_list,
                                          interface_list,
                                          struct_list);
        }
        public override List <CompNamed> GetConstructors()
        {
            List <CompNamed> ctor_list = new List <CompNamed> ();

            MasterUtils.PopulateMethodList(xml_cls.constructors, ctor_list);
            return(ctor_list);
        }
 public MasterAssembly(string path)
     : base(path)
 {
     masterinfo = XMLAssembly.CreateFromFile(path);
     if (masterinfo == null)
     {
         throw new ArgumentException("Error loading masterinfo from " + path);
     }
     attributes = MasterUtils.GetAttributes(masterinfo.attributes);
 }
        public MasterProperty(string key, string propertyAccess, XMLMethods xml_methods, XMLAttributes attributes)
            : base(FormatName(key))
        {
            string[] keyparts = key.Split(new char[] { ':' }, 3);

            this.propertyType   = keyparts[1];
            this.propertyAccess = propertyAccess;

            methods = new List <CompNamed>();

            MasterUtils.PopulateMethodList(xml_methods, methods);
            this.attributes = attributes;
        }
Exemple #7
0
        public MasterEnum(XMLClass cls)
            : base(cls.name)
        {
            xml_cls = cls;

            fields = new List <CompNamed>();

            MasterUtils.PopulateMemberLists(xml_cls,
                                            null,
                                            null,
                                            null,
                                            null,
                                            fields,
                                            null);
        }
Exemple #8
0
        protected override bool CheckIfAdd(string value, XmlNode node)
        {
            if (IsMonoTODOAttribute(value))
            {
                isTodo = true;

                XmlNode pNode = node.SelectSingleNode("properties");
                if (pNode != null && pNode.ChildNodes.Count > 0 && pNode.ChildNodes [0].Attributes ["value"] != null)
                {
                    comment = pNode.ChildNodes [0].Attributes ["value"].Value;
                }
                return(false);
            }

            if (MasterUtils.IsImplementationSpecificAttribute(value))
            {
                return(false);
            }

            return(true);
        }
        public MasterInterface(XMLClass xml_cls)
            : base(FormatName(xml_cls))
        {
            this.xml_cls = xml_cls;

            interfaces   = new List <CompNamed>();
            constructors = new List <CompNamed>();
            methods      = new List <CompNamed>();
            properties   = new List <CompNamed>();
            fields       = new List <CompNamed>();
            events       = new List <CompNamed>();

            MasterUtils.PopulateMemberLists(xml_cls,
                                            interfaces,
                                            constructors,
                                            methods,
                                            properties,
                                            fields,
                                            events);

            attributes = MasterUtils.GetAttributes(xml_cls.attributes);
        }
Exemple #10
0
 public List <CompGenericParameter> GetTypeParameters()
 {
     return(MasterUtils.GetTypeParameters(genericParameters));
 }
 public override List <CompNamed> GetAttributes()
 {
     return(MasterUtils.GetAttributes(attributes));
 }
 public override List <CompParameter> GetParameters()
 {
     return(MasterUtils.GetParameters(parameters));
 }
        public MasterEnum(XMLClass cls)
            : base(cls.name)
        {
            xml_cls = cls;

            fields = new List <CompNamed>();

            MasterUtils.PopulateMemberLists(xml_cls,
                                            null,
                                            null,
                                            null,
                                            null,
                                            fields,
                                            null);

            if (fields == null || fields.Count == 0)
            {
                return;
            }

            List <MasterField> masterFields = new List <MasterField> ();

            foreach (CompNamed f in fields)
            {
                MasterField field = f as MasterField;
                if (field == null)
                {
                    continue;
                }

                masterFields.Add(field);
            }

            if (masterFields.Count == 0)
            {
                return;
            }

            masterFields.Sort((MasterField left, MasterField right) => {
                if (left == null && right == null)
                {
                    return(0);
                }

                if (left == null)
                {
                    return(1);
                }

                if (right == null)
                {
                    return(-1);
                }

                return(String.Compare(left.GetLiteralValue(), right.GetLiteralValue(), StringComparison.Ordinal));
            });

            StringBuilder sb = new StringBuilder();

            sb.Append("<b>Members:</b>\n");
            foreach (MasterField field in masterFields)
            {
                sb.AppendFormat("\t\t<i>{0}</i> = {1}\n", field.Name, field.GetLiteralValue());
            }
            ExtraInfo = sb.ToString();
        }