示例#1
0
        private static ExtensionList CreateTypeInfo(XDocument doc)
        {
            var list = new ExtensionList();

            foreach (var typeNode in doc.Root.Elements().Where(_ => _.Name.LocalName == NodeName.Type))
            {
                list.Add(ParseType(typeNode));
            }

            return(list);
        }
示例#2
0
        private static ExtensionList CreateTypeInfo(XmlDocument doc)
        {
            ExtensionList list = new ExtensionList();

            foreach (XmlNode typeNode in doc.DocumentElement.ChildNodes)
            {
                if (typeNode.LocalName == NodeName.Type)
                {
                    list.Add(ParseType(typeNode));
                }
            }

            return(list);
        }
 public static void MergeExtensions(ExtensionList fromExt, ref ExtensionList toExt)
 {
     foreach (var kv in fromExt)
     {
         TypeExtension toType;
         if (toExt.TryGetValue(kv.Key, out toType))
         {
             MergeExtensions(kv.Value, ref toType);
         }
         else
         {
             toExt.Add(kv.Key, kv.Value);
         }
     }
 }
示例#4
0
		private static ExtensionList CreateTypeInfo(XDocument doc)
		{
			var list = new ExtensionList();

			foreach (var typeNode in doc.Root.Elements().Where(_ => _.Name.LocalName == NodeName.Type))
				list.Add(ParseType(typeNode));

			return list;
		}
示例#5
0
		private static ExtensionList CreateTypeInfo(XmlDocument doc)
		{
			ExtensionList list = new ExtensionList();

			foreach (XmlNode typeNode in doc.DocumentElement.ChildNodes)
				if (typeNode.LocalName == NodeName.Type)
					list.Add(ParseType(typeNode));

			return list;
		}