Beispiel #1
0
 public Constraint(Facette constraintSource, Facette constraintTarget, ConstraintGuard guard, List <object> valuesToConstrainTo)
 {
     this.guard               = guard;
     this.constraintSource    = constraintSource;
     this.valuesToConstrainTo = valuesToConstrainTo;
     this.constraintTarget    = constraintTarget;
 }
Beispiel #2
0
 public bool ValueSetFullfillsConstraint(Facette sourceFacette, List <object> valueSet)
 {
     if (sourceFacette != constraintTarget)
     {
         return(true);
     }
     return(valueSet.All(x => valuesToConstrainTo.Contains(x)));
 }
Beispiel #3
0
        public bool IsActive(Facette theFacette, BitArray val)
        {
            if (theFacette != constraintSource)
            {
                return(false);
            }
            var activeValues = constraintSource.GetValues(val);

            return(guard(activeValues));
        }
Beispiel #4
0
 public virtual void AddFacette(Facette fac)
 {
     logger.Info("Added Facette " + fac + " to test environemnt");
     allFacettes.Add(fac.Name, fac);
 }
Beispiel #5
0
 public void PushValueset(Facette f, BitArray v)
 {
     allBindings.Add(new KeyValuePair <Facette, BitArray>(f, v));
 }
Beispiel #6
0
 internal bool ConstrainsFacette(Facette theFacette)
 {
     return(theFacette == constraintTarget);
 }