new public static LogicalConnectiveCollection Load(XmlReader reader) { LogicalOrCollection loc = new LogicalOrCollection(); loc.ReadXml(reader); return(loc); }
public static Term Load(XmlReader reader) { if (reader == null) { throw new ArgumentNullException("reader"); } Term evalExp = null; reader.MoveToStartElement(); if (reader.IsRequiredStartElement(AuthorizationConstants.Elements.Rule)) { Rule rule = new Rule(); rule.ReadXml(reader); evalExp = rule; } if (reader.IsRequiredStartElement(AuthorizationConstants.Elements.LogicalAnd)) { LogicalAndCollection logicalAnd = new LogicalAndCollection(); logicalAnd.ReadXml(reader); evalExp = logicalAnd; } if (reader.IsRequiredStartElement(AuthorizationConstants.Elements.LogicalOr)) { LogicalOrCollection logicalOr = new LogicalOrCollection(); logicalOr.ReadXml(reader); evalExp = logicalOr; } if (evalExp != null) { return(evalExp); } else { throw new SerializationException("Invalid evaluation expression element."); } }