LoadData() public method

public LoadData ( XmlNode node ) : void
node System.Xml.XmlNode
return void
コード例 #1
0
        protected override void LoadExtraData(string name, XmlNode node)
        {
            XmlAttribute xatt = node.Attributes ["returntype"];

            if (xatt != null)
            {
                if (returnTypes == null)
                {
                    returnTypes = new Hashtable();
                }

                returnTypes [name] = xatt.Value;
            }

            SignatureFlags flags = SignatureFlags.None;

            if (((XmlElement)node).GetAttribute("abstract") == "true")
            {
                flags |= SignatureFlags.Abstract;
            }
            if (((XmlElement)node).GetAttribute("static") == "true")
            {
                flags |= SignatureFlags.Static;
            }
            if (((XmlElement)node).GetAttribute("virtual") == "true")
            {
                flags |= SignatureFlags.Virtual;
            }
            if (((XmlElement)node).GetAttribute("final") == "true")
            {
                flags |= SignatureFlags.Final;
            }
            if (flags != SignatureFlags.None)
            {
                if (signatureFlags == null)
                {
                    signatureFlags = new Hashtable();
                }
                signatureFlags [name] = flags;
            }

            XmlNode parametersNode = node.SelectSingleNode("parameters");

            if (parametersNode != null)
            {
                if (parameters == null)
                {
                    parameters = new Hashtable();
                }

                XMLParameters parms = new XMLParameters();
                parms.LoadData(parametersNode);

                parameters[name] = parms;
            }

            XmlNode genericNode = node.SelectSingleNode("generic-parameters");

            if (genericNode != null)
            {
                if (genericParameters == null)
                {
                    genericParameters = new Hashtable();
                }

                XMLGenericParameters gparams = new XMLGenericParameters();
                gparams.LoadData(genericNode);
                genericParameters [name] = gparams;
            }

            base.LoadExtraData(name, node);
        }
コード例 #2
0
ファイル: Masterinfo.cs プロジェクト: nolanlum/mono-tools
		protected override void LoadExtraData (string name, XmlNode node)
		{
			XmlAttribute xatt = node.Attributes ["returntype"];
			if (xatt != null) {
				if (returnTypes == null)
					returnTypes = new Hashtable ();

				returnTypes [name] = xatt.Value;
			}

			SignatureFlags flags = SignatureFlags.None;
			if (((XmlElement) node).GetAttribute ("abstract") == "true")
				flags |= SignatureFlags.Abstract;
			if (((XmlElement) node).GetAttribute ("static") == "true")
				flags |= SignatureFlags.Static;
			if (((XmlElement) node).GetAttribute ("virtual") == "true")
				flags |= SignatureFlags.Virtual;
			if (((XmlElement) node).GetAttribute ("final") == "true")
				flags |= SignatureFlags.Final;
			if (flags != SignatureFlags.None) {
				if (signatureFlags == null)
					signatureFlags = new Hashtable ();
				signatureFlags [name] = flags;
			}

			XmlNode parametersNode = node.SelectSingleNode ("parameters");
			if (parametersNode != null) {
				if (parameters == null)
					parameters = new Hashtable ();

				XMLParameters parms = new XMLParameters ();
				parms.LoadData (parametersNode);

				parameters[name] = parms;
			}

			XmlNode genericNode = node.SelectSingleNode ("generic-parameters");
			if (genericNode != null) {
				if (genericParameters == null)
					genericParameters = new Hashtable ();

				XMLGenericParameters gparams = new XMLGenericParameters ();
				gparams.LoadData (genericNode);
				genericParameters [name] = gparams;
			}

			base.LoadExtraData (name, node);
		}