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")); }
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")); }
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")); }
public ValuePropertyQuery(XmlNode node) : base(node) { this.query = Helpers.GetXmlAttribute(node, "query"); this.equals = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "equals")); }
public NullQuery(XmlNode node) : base(node, false) { this.query = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "query")); }
public ListEmptyQuery(XmlNode node) : base(node) { this.empty = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "empty")); }
protected ListContainsQuery(XmlNode node) : base(node) { this.contains = SearchMarshalling.ParseBool(Helpers.GetXmlAttribute(node, "contains")); }
public Sort(XmlNode node) : this(node.Attributes["column"].Value, SearchMarshalling.ParseBool(node.Attributes["ascending"].Value)) { }