/// <summary> /// Match the target of this policy. /// </summary> /// <param name="context">The evaluation context instance.</param> /// <returns>The retult evaluation of the policy target.</returns> public TargetEvaluationValue Match(EvaluationContext context) { if (context == null) { throw new ArgumentNullException("context"); } var targetEvaluationValue = TargetEvaluationValue.Indeterminate; context.Trace("Evaluating Target..."); context.AddIndent(); try { // Evaluate the policy target targetEvaluationValue = TargetEvaluationValue.Match; if (_target != null) { targetEvaluationValue = _target.Evaluate(context); } return(targetEvaluationValue); } finally { context.TraceContextValues(); context.RemoveIndent(); context.Trace("Target: {0}", targetEvaluationValue); } }
/// <summary> /// Match the target of this policy set. /// </summary> /// <param name="context">The evaluation context instance.</param> /// <returns>The retult evaluation of the policy set target.</returns> public TargetEvaluationValue Match(EvaluationContext context) { if (context == null) { throw new ArgumentNullException("context"); } // Evaluate the policy target var targetEvaluationValue = TargetEvaluationValue.Match; if (_target != null) { targetEvaluationValue = _target.Evaluate(context); context.TraceContextValues(); } return(targetEvaluationValue); }