public void Dispose() { policyOnly = null; current = null; root = null; if (stack != null) { stack.Clear(); } stack = null; }
internal PolicyExpressionPolicyEnumerator(IPolicyExpressionRoot root) { this.root = root; if (root.IsPolicyOnly) { policyOnly = (IPolicyOnlyExpression)root.Expression; } else { stack = new Stack <IPolicyExpression>(); var exp = (IPolicyExpressionWithOperator)root.Expression; stack.Push(exp.Right); stack.Push(exp.Left); } }
public void Combine(IPolicyExpressionRoot right, PolicyOperator @operator) { if (right == null) { throw new ArgumentNullException(nameof(right)); } PolicyExpressionWithOperator exp = new PolicyExpressionWithOperator(@operator, expression, right.Expression); if (isPolicyOnly) { isPolicyOnly = false; policyName = null; } expression = exp; result = exp.Result; }