protected PC.SCRelationObjectCollection ToNormalRelation(PC.SCParentsRelationObjectCollection src) { PC.SCRelationObjectCollection result = null; if (src != null) { result = new PC.SCRelationObjectCollection(); result.CopyFrom(src); } return result; }
protected PC.SCRelationObjectCollection ToNormalRelation(PC.SCParentsRelationObjectCollection src) { PC.SCRelationObjectCollection result = null; if (src != null) { result = new PC.SCRelationObjectCollection(); result.CopyFrom(src); } return(result); }
protected PC.SCRelationObjectCollection FilterChildren(PC.SCChildrenRelationObjectCollection src, string[] ids) { PC.SCRelationObjectCollection result = null; if (src != null) { result = new PC.SCRelationObjectCollection(); foreach (string key in ids) { result.Add(src[key]); } } return result; }
protected PC.SCRelationObjectCollection FilterChildren(PC.SCChildrenRelationObjectCollection src, string[] ids) { PC.SCRelationObjectCollection result = null; if (src != null) { result = new PC.SCRelationObjectCollection(); foreach (string key in ids) { result.Add(src[key]); } } return(result); }
public void Load(System.IO.TextReader input) { int count; var xmlDoc = new System.Xml.XmlDocument(); xmlDoc.Load(input); SchemaObjectXmlImporter importer = new SchemaObjectXmlImporter(); var nodeContext = xmlDoc.SelectSingleNode("/sc/context"); if (nodeContext != null) { var attrTime = nodeContext.Attributes["timeContext"]; if (attrTime != null && attrTime.Specified) { this.timeContext = System.Xml.XmlConvert.ToDateTime(attrTime.Value, System.Xml.XmlDateTimeSerializationMode.Local); } var scope = nodeContext.Attributes["scope"]; if (scope != null && scope.Specified) { this.Scope = scope.Value; } } var nodeObjects = xmlDoc.SelectNodes("/sc/objects/Object"); this.objects = null; count = nodeObjects.Count; if (count > 0) { this.objects = new SchemaObjectCollection(); for (int i = 0; i < count; i++) { var xml = nodeObjects[i].OuterXml; var schemaType = nodeObjects[i].Attributes["SchemaType"].Value; this.objects.Add(importer.XmlToObject(xml, schemaType)); } } nodeObjects = xmlDoc.SelectNodes("/sc/relations/Object"); this.relations = null; count = nodeObjects.Count; if (count > 0) { this.relations = new SCRelationObjectCollection(); for (int i = 0; i < count; i++) { var xml = nodeObjects[i].OuterXml; var schemaType = nodeObjects[i].Attributes["SchemaType"].Value; this.relations.Add((SCRelationObject)importer.XmlToObject(xml, schemaType)); } } nodeObjects = xmlDoc.SelectNodes("/sc/membership/Object"); this.membership = null; count = nodeObjects.Count; if (count > 0) { this.membership = new SCMemberRelationCollection(); for (int i = 0; i < count; i++) { var xml = nodeObjects[i].OuterXml; var schemaType = nodeObjects[i].Attributes["SchemaType"].Value; this.membership.Add((SCSimpleRelationBase)importer.XmlToObject(xml, schemaType)); } } nodeObjects = xmlDoc.SelectNodes("/sc/conditions/condition"); this.conditions = null; count = nodeObjects.Count; if (count > 0) { this.conditions = new MCS.Library.SOA.DataObjects.Security.Conditions.SCConditionCollection(); for (int i = 0; i < count; i++) { var xml = nodeObjects[i]; var condition = LoadCondition(xml); this.conditions.Add(condition); } } nodeObjects = xmlDoc.SelectNodes("/sc/acls/acl"); this.acls = null; count = nodeObjects.Count; if (count > 0) { this.acls = new SCAclContainerCollection(); for (int i = 0; i < count; i++) { var xml = nodeObjects[i]; var acl = LoadAcl(xml); this.acls.Add(acl); } } }
public ListDebuggerView(SCRelationObjectCollection collection) { this.collection = collection; }