示例#1
0
 public static void FromXml(System.IO.Stream stream, PackageMatchDelegate callback)
 {
     System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader(stream);
     FromXml(reader, callback);
     reader.Close();
     stream.Close();
 }
示例#2
0
        private static void FromXml(System.Xml.XmlTextReader reader, PackageMatchDelegate callback)
        {
            reader.MoveToContent();

            while (reader.Read())
            {
                if (reader.NodeType == System.Xml.XmlNodeType.Element && reader.LocalName == "match")
                {
                    PackageMatch match = ParseMatch(reader);

                    if (!callback(match))
                    {
                        break;
                    }
                }
            }

            reader.Close();
        }
示例#3
0
 public static void FromXml (System.IO.Stream stream, PackageMatchDelegate callback)
 {
     System.Xml.XmlTextReader reader = new System.Xml.XmlTextReader (stream);
     FromXml (reader, callback);
     reader.Close ();
     stream.Close ();
 }
示例#4
0
    private static void FromXml (System.Xml.XmlTextReader reader, PackageMatchDelegate callback)
    {
        reader.MoveToContent ();

        while (reader.Read ()) {
            if (reader.NodeType == System.Xml.XmlNodeType.Element && reader.LocalName == "match") {
                PackageMatch match = ParseMatch (reader);

                if (!callback (match))
                    break;
            }
        }

        reader.Close ();
    }