예제 #1
0
        protected IEnumerable<string> GetSubjectAttributeDesignator(XacmlSubjectAttributeDesignator designator) {
            Contract.Requires<ArgumentNullException>(designator != null);

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

            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="XacmlSubjectMatch"/> class.
 /// </summary>
 /// <param name="matchId">The match identifier.</param>
 /// <param name="attributeValue">The attribute value.</param>
 /// <param name="attributeDesignator">The attribute designator.</param>
 public XacmlSubjectMatch(Uri matchId, XacmlAttributeValue attributeValue, XacmlSubjectAttributeDesignator attributeDesignator)
     : base(matchId, attributeValue, attributeDesignator) {
     Contract.Requires<ArgumentNullException>(matchId != null);
     Contract.Requires<ArgumentNullException>(attributeValue != null);
     Contract.Requires<ArgumentNullException>(attributeDesignator != null);
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XacmlSubjectMatch"/> class.
 /// </summary>
 /// <param name="matchId">The match identifier.</param>
 /// <param name="attributeValue">The attribute value.</param>
 /// <param name="attributeDesignator">The attribute designator.</param>
 public XacmlSubjectMatch(Uri matchId, XacmlAttributeValue attributeValue, XacmlSubjectAttributeDesignator attributeDesignator)
     : base(matchId, attributeValue, attributeDesignator)
 {
 }