bool IsSimilarConstraintExists(TwCommandConstraints constraints) { foreach (TwCommandConstraint constraint in constraints) { if (constraint.Attribute == TwCommandConstraintAttribute.Similar && constraint.Relation == TwCommandConstraintRelation.None) { return(true); } } return(false); }
bool ContainsAttribute(TwCommandConstraints constraints, TwCommandConstraintAttribute attribute) { foreach (var constraint in constraints) { if (constraint.Attribute == attribute) { return(true); } } return(false); }
TwCommandConstraints GetConstraints(string[] tokens, ref int index, ref string error) { var constraints = new TwCommandConstraints(); TwCommandConstraint constraint; while ((index < tokens.Length) && (constraint = GetConstraint(tokens, ref index, ref error)) != null) { constraints.Add(constraint); } return(constraints); }
void PackageConstraints(TwCommandConstraints constraints, Event @event) { foreach (var constraint in constraints) { var constraintBoolEvent = constraint as TwCommandConstraintBoolEvent; if (constraintBoolEvent != null) { constraintBoolEvent.EventSource = @event; } var constraintListItem = constraint as TwCommandConstraintListItem; if (constraintListItem != null) { constraintListItem.FixtureProfiles = analysisPanel.Analysis.FixtureProfiles; } } }
public TwCommand() { Fixtures = new TwCommandFixtures(); Constraints = new TwCommandConstraints(); }