예제 #1
0
 public StringPropertyQuery(XmlNode node)
     : base(node)
 {
     this.caseSensitive = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "casesensitive"));
     this.query         = Helpers.GetXmlAttribute(node, "query");
     this.type          = (PropertyQueryType)Enum.Parse(typeof(PropertyQueryType), Helpers.GetXmlAttribute(node, "type"));
 }
예제 #2
0
 public EnumPropertyQuery(XmlNode node)
     : base(node)
 {
     // Special case: "Type is SR" in legacy searches is now interpreted as
     // "Type is Remote SR". (The "type is" filter can't search for multiple types).
     if (typeof(T) == typeof(ObjectTypes) && Helpers.GetXmlAttribute(node, "query") == "SR")
     {
         this.query = (T)Enum.Parse(typeof(T), "RemoteSR");
     }
     else
     {
         this.query = (T)Enum.Parse(typeof(T), Helpers.GetXmlAttribute(node, "query"));
     }
     this.equals = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "equals"));
 }
예제 #3
0
        public XenModelObjectPropertyQuery(XmlNode node)
            : base(node)
        {
            XmlAttribute uuid_node = node.Attributes["uuid"];

            if (uuid_node == null)
            {
                // Just for backwards compat.
                query = XenConnection.FindByRef(new XenRef <T>(Helpers.GetXmlAttribute(node, "query")));
            }
            else
            {
                query = XenConnection.FindByUUIDXenObject <T>(uuid_node.Value);
            }
            equals = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "equals"));
        }
예제 #4
0
 public ValuePropertyQuery(XmlNode node)
     : base(node)
 {
     this.query  = Helpers.GetXmlAttribute(node, "query");
     this.equals = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "equals"));
 }
예제 #5
0
 public NullQuery(XmlNode node)
     : base(node, false)
 {
     this.query = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "query"));
 }
예제 #6
0
 public ListEmptyQuery(XmlNode node)
     : base(node)
 {
     this.empty = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "empty"));
 }
예제 #7
0
 protected ListContainsQuery(XmlNode node)
     : base(node)
 {
     this.contains = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "contains"));
 }
예제 #8
0
 public Sort(XmlNode node)
     : this(node.Attributes["column"].Value, SearchMarshalling.ParseBool(node.Attributes["ascending"].Value))
 {
 }