コード例 #1
0
        private static MemberExtension ParseMember(XmlNode memberNode)
        {
            MemberExtension ext = new MemberExtension();

            if (memberNode.Attributes != null)
            {
                foreach (XmlAttribute attr in memberNode.Attributes)
                {
                    if (attr.LocalName == AttrName.Name)
                    {
                        ext.Name = attr.Value;
                    }
                    else
                    {
                        ext.Attributes.Add(attr.LocalName, attr.Value);
                    }
                }
            }

            foreach (XmlNode node in memberNode.ChildNodes)
            {
                ext.Attributes.Add(ParseAttribute(node));
            }

            return(ext);
        }
コード例 #2
0
 public void Add(MemberExtension memberInfo)
 {
     if (this != _null)
     {
         _members[memberInfo.Name] = memberInfo;
     }
 }
コード例 #3
0
 private static void MergeExtensions(MemberExtension fromExt, ref MemberExtension toExt)
 {
     foreach (var attribute in fromExt.Attributes)
     {
         if (toExt.Attributes.ContainsKey(attribute.Key))
         {
             toExt.Attributes.Remove(attribute.Key);
         }
         toExt.Attributes.Add(attribute.Key, attribute.Value);
     }
 }
コード例 #4
0
        public MemberExtension this[string memberName]
        {
            get
            {
                if (this == _null)
                {
                    return(MemberExtension.Null);
                }

                MemberExtension value = (MemberExtension)_members[memberName];
                return(value ?? MemberExtension.Null);
            }
        }
コード例 #5
0
ファイル: TypeExtension.cs プロジェクト: x64/bltoolkit
        private static MemberExtension ParseMember(XElement memberNode)
        {
            var ext = new MemberExtension();

            foreach (var attr in memberNode.Attributes())
            {
                if (attr.Name.LocalName == AttrName.Name)
                {
                    ext.Name = attr.Value;
                }
                else
                {
                    ext.Attributes.Add(attr.Name.LocalName, attr.Value);
                }
            }

            foreach (var node in memberNode.Elements())
            {
                ext.Attributes.Add(ParseAttribute(node));
            }

            return(ext);
        }
コード例 #6
0
		private static MemberExtension ParseMember(XElement memberNode)
		{
			var ext = new MemberExtension();

			foreach (var attr in memberNode.Attributes())
			{
				if (attr.Name.LocalName == AttrName.Name)
					ext.Name = attr.Value;
				else
					ext.Attributes.Add(attr.Name.LocalName, attr.Value);
			}

			foreach (var node in memberNode.Elements())
				ext.Attributes.Add(ParseAttribute(node));

			return ext;
		}
コード例 #7
0
ファイル: TypeExtension.cs プロジェクト: epdumitru/mysqlib
		private static MemberExtension ParseMember(XmlNode memberNode)
		{
			MemberExtension ext = new MemberExtension();

			if (memberNode.Attributes != null)
			{
				foreach (XmlAttribute attr in memberNode.Attributes)
				{
					if (attr.LocalName == AttrName.Name)
						ext.Name = attr.Value;
					else
						ext.Attributes.Add(attr.LocalName, attr.Value);
				}
			}

			foreach (XmlNode node in memberNode.ChildNodes)
				ext.Attributes.Add(ParseAttribute(node));

			return ext;
		}