コード例 #1
0
        protected IEnumerable<string> GetEnvironmentAttributeDesignator(XacmlEnvironmentAttributeDesignator designator) {
            Contract.Requires<ArgumentNullException>(designator != null);

            IEnumerable<string> attributeBag = this.pip.GetEnvironmentAttributeDesignatorValues(
                    designator.AttributeId,
                    designator.DataType,
                    designator.Issuer
                    );

            if (!attributeBag.Any()) {
                if (designator.MustBePresent.HasValue && designator.MustBePresent.Value) {
                    // return "Indeterminate”
                    return null;
                }
            }

            return attributeBag;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XacmlEnvironmentMatch"/> class.
 /// </summary>
 /// <param name="matchId">The match identifier.</param>
 /// <param name="attributeValue">The attribute value.</param>
 /// <param name="attributeDesignator">The attribute designator.</param>
 public XacmlEnvironmentMatch(Uri matchId, XacmlAttributeValue attributeValue, XacmlEnvironmentAttributeDesignator attributeDesignator)
     : base(matchId, attributeValue, attributeDesignator) {
     Contract.Requires<ArgumentNullException>(matchId != null);
     Contract.Requires<ArgumentNullException>(attributeValue != null);
     Contract.Requires<ArgumentNullException>(attributeDesignator != null);
 }