Esempio n. 1
0
        public Policy(string filePath, XElement node, ObjectIndex references)
            : base(filePath, node, node.Attribute("PolicyId").Value, references)
        {
            if (XmlNode.Element(PolicyItem.ns + "BasePolicy")?.Element(PolicyItem.ns + "PolicyId")?.Value != null)
            {
                BasePolicy = new Reference <Policy>(this, XmlNode.Element(PolicyItem.ns + "BasePolicy")?.Element(PolicyItem.ns + "PolicyId")?.Value, references);
            }

            if (XmlNode.Element("UserJourneys") != null)
            {
                this.UserJourneys = new List <UserJourney>();
                foreach (var uj in XmlNode.Element("UserJourneys").Elements("UserJourney"))
                {
                    this.UserJourneys.Add(UserJourney.Load(this, filePath, uj, references));
                }
            }

            // RelyingParty
            this.RelyingParty = RelyingParty.Load(this, filePath, references);
            // BuildingBlocks
            this.BuildingBlocks = BuildingBlocks.Load(this, filePath, references);

            // ClaimsProviders
            if (XmlNode.Element(PolicyItem.ns + "ClaimsProviders") != null)
            {
                this.ClaimsProviders = new List <ClaimsProvider>();
                foreach (var cp in XmlNode.Element(PolicyItem.ns + "ClaimsProviders").Elements(PolicyItem.ns + "ClaimsProvider"))
                {
                    this.ClaimsProviders.Add(ClaimsProvider.Load(this, filePath, cp, references));
                }
            }
        }
        internal static OrchestrationStep Load(UserJourney journey, string path, XElement node, ObjectIndex references)
        {
            OrchestrationStep item = new OrchestrationStep(path, node, references, journey);

            // fill data

            return(item);
        }
Esempio n. 3
0
        internal static UserJourney Load(Policy policy, string path, XElement node, ObjectIndex references)
        {
            UserJourney item = new UserJourney(path, node, node.Attribute("Id").Value, references, policy);

            // fill data
            item.OrchestrationSteps = new List <OrchestrationStep>();
            foreach (var step in item.XmlNode.Element(PolicyItem.ns + "OrchestrationSteps").Elements(PolicyItem.ns + "OrchestrationStep"))
            {
                item.OrchestrationSteps.Add(OrchestrationStep.Load(item, path, step, references));
            }
            return(item);
        }