Exemple #1
0
 /// <summary>
 /// Reduce produces a constraint from the operator and 
 /// any arguments. It takes the arguments from the constraint 
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 /// <param name="stack"></param>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     if (RightContext == null || RightContext is BinaryOperator)
         stack.Push(new ExactCountConstraint(expectedCount));
     else
         stack.Push(new ExactCountConstraint(expectedCount, stack.Pop()));
 }
Exemple #2
0
 /// <summary>
 /// Reduce produces a constraint from the operator and 
 /// any arguments. It takes the arguments from the constraint 
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     if (RightContext == null || RightContext is BinaryOperator)
         stack.Push(new AttributeExistsConstraint(type));
     else
         stack.Push(new AttributeConstraint(type, stack.Pop()));
 }
		public override void Reduce(ConstraintBuilder.ConstraintStack stack)
		{
			if (RightContext == null || RightContext is BinaryOperator)
				stack.Push(new HasValueConstraint());
			else
				stack.Push(new ValueConstraint(stack.Pop()));
		}
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintStack"/> class.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public ConstraintStack(ConstraintBuilder builder)
 {
     this.builder = builder;
 }
 /// <summary>
 /// Sets the ConstraintBuilder holding this constraint
 /// </summary>
 internal void SetBuilder(ConstraintBuilder builder)
 {
     this.builder = builder;
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OperatorStack"/> class.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public OperatorStack(ConstraintBuilder builder)
 {
 }
 /// <summary>
 /// Reduce produces a constraint from the operator and 
 /// any arguments. It takes the arguments from the constraint 
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 /// <param name="stack"></param>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     if (RightContext == null || RightContext is BinaryOperator)
         stack.Push(new PropertyExistsConstraint(name));
     else
         stack.Push(new PropertyConstraint(name, stack.Pop()));
 }
 /// <summary>
 /// Reduce produces a constraint from the operator and 
 /// any arguments. It takes the arguments from the constraint 
 /// stack and pushes the resulting constraint on it.
 /// </summary>
 /// <param name="stack"></param>
 public override void Reduce(ConstraintBuilder.ConstraintStack stack)
 {
     Constraint right = stack.Pop();
     Constraint left = stack.Pop();
     stack.Push(ApplyOperator(left, right));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintExpression"/>
 /// class passing in a ConstraintBuilder, which may be pre-populated.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public ConstraintExpression(ConstraintBuilder builder)
     : base(builder)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:OperatorStack"/> class.
 /// </summary>
 /// <param name="builder">The ConstraintBuilder using this stack.</param>
 public OperatorStack(ConstraintBuilder builder)
 {
 }
Exemple #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConstraintExpression"/>
 /// class passing in a ConstraintBuilder, which may be pre-populated.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public ConstraintExpression(ConstraintBuilder builder)
 {
     Guard.ArgumentNotNull(builder, nameof(builder));
     this.builder = builder;
 }
Exemple #12
0
 /// <summary>
 /// Sets the ConstraintBuilder holding this constraint
 /// </summary>
 internal void SetBuilder(ConstraintBuilder builder)
 {
     this.builder = builder;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintExpressionBase"/> 
 /// class passing in a ConstraintBuilder, which may be pre-populated.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public ConstraintExpressionBase(ConstraintBuilder builder)
 {
     this.builder = builder;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintExpression"/> 
 /// class passing in a ConstraintBuilder, which may be pre-populated.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public ConstraintExpression(ConstraintBuilder builder)
     : base( builder ) { }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintExpressionBase"/> class.
 /// </summary>
 public ConstraintExpressionBase()
 {
     this.builder = new ConstraintBuilder();
 }
Exemple #16
0
 /// <summary>
 /// Create a new instance of ResolvableConstraintExpression,
 /// passing in a pre-populated ConstraintBuilder.
 /// </summary>
 public ResolvableConstraintExpression(ConstraintBuilder builder)
     : base(builder)
 {
 }
 public RunlistConstraint()
 {
     this.builder = new ConstraintBuilder();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintExpression"/> class.
 /// </summary>
 public ConstraintExpression()
 {
     this.builder = new ConstraintBuilder();
 }
		/// <summary>
		/// Reduce produces a constraint from the operator and 
		/// any arguments. It takes the arguments from the constraint 
		/// stack and pushes the resulting constraint on it.
		/// </summary>
		/// <param name="stack"></param>
		public abstract void Reduce(ConstraintBuilder.ConstraintStack stack);
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintExpression"/>
 /// class passing in a ConstraintBuilder, which may be pre-populated.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public ConstraintExpression(ConstraintBuilder builder)
 {
     this.builder = builder;
 }
		/// <summary>
		/// Reduce produces a constraint from the operator and 
		/// any arguments. It takes the arguments from the constraint 
		/// stack and pushes the resulting constraint on it.
		/// </summary>
		/// <param name="stack"></param>
		public override void Reduce(ConstraintBuilder.ConstraintStack stack)
        {
            stack.Push(ApplyPrefix(stack.Pop()));
        }
 /// <summary>
 /// Create a new instance of ResolvableConstraintExpression,
 /// passing in a pre-populated ConstraintBuilder.
 /// </summary>
 public ResolvableConstraintExpression(ConstraintBuilder builder)
     : base(builder) { }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConstraintStack"/> class.
 /// </summary>
 /// <param name="builder">The ConstraintBuilder using this stack.</param>
 public ConstraintStack(ConstraintBuilder builder)
 {
     this.builder = builder;
 }