Esempio n. 1
0
            internal IEnumerable <IEnumerable <XmlElement> > NormalizePolicy(IEnumerable <XmlElement> policyAssertions)
            {
                IEnumerable <IEnumerable <XmlElement> > target = s_emptyEmpty;
                YieldLimiter yieldLimiter = new YieldLimiter(_metadataImporter.Quotas.MaxYields, _metadataImporter);

                foreach (XmlElement child in policyAssertions)
                {
                    IEnumerable <IEnumerable <XmlElement> > childPolicy = ReadNode(child, child, yieldLimiter);
                    target = PolicyHelper.CrossProduct <XmlElement>(target, childPolicy, yieldLimiter);
                }

                return(target);
            }
Esempio n. 2
0
            private IEnumerable <IEnumerable <XmlElement> > ReadNode_PolicyOrAll(XmlElement element, XmlElement contextAssertion, YieldLimiter yieldLimiter)
            {
                IEnumerable <IEnumerable <XmlElement> > target = s_emptyEmpty;

                foreach (XmlNode child in element.ChildNodes)
                {
                    if (child.NodeType == XmlNodeType.Element)
                    {
                        IEnumerable <IEnumerable <XmlElement> > childPolicy = ReadNode(child, contextAssertion, yieldLimiter);
                        target = PolicyHelper.CrossProduct <XmlElement>(target, childPolicy, yieldLimiter);
                    }
                }
                return(target);
            }