Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XacmlActionMatch"/> class.
 /// </summary>
 /// <param name="matchId">The match identifier.</param>
 /// <param name="attributeValue">The attribute value.</param>
 /// <param name="attributeDesignator">The attribute designator.</param>
 public XacmlActionMatch(Uri matchId, XacmlAttributeValue attributeValue, XacmlActionAttributeDesignator attributeDesignator)
     : base(matchId, attributeValue, attributeDesignator)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="XacmlActionMatch"/> class.
 /// </summary>
 /// <param name="matchId">The match identifier.</param>
 /// <param name="attributeValue">The attribute value.</param>
 /// <param name="attributeDesignator">The attribute designator.</param>
 public XacmlActionMatch(Uri matchId, XacmlAttributeValue attributeValue, XacmlActionAttributeDesignator attributeDesignator)
     : base(matchId, attributeValue, attributeDesignator) {
     Contract.Requires<ArgumentNullException>(matchId != null);
     Contract.Requires<ArgumentNullException>(attributeValue != null);
     Contract.Requires<ArgumentNullException>(attributeDesignator != null);
 }
        protected IEnumerable<string> GetActionAttributeDesignator(XacmlActionAttributeDesignator designator) {
            Contract.Requires<ArgumentNullException>(designator != null);

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

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

            return attributeBag;
        }