コード例 #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
ファイル: XacmlSubjectMatch.cs プロジェクト: ybohan/abc.xacml
 /// <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)
 {
 }