bool ContainsAttribute(TwCommandConstraints constraints, TwCommandConstraintAttribute attribute) { foreach (var constraint in constraints) { if (constraint.Attribute == attribute) { return(true); } } return(false); }
protected string ToString(TwCommandConstraintAttribute attribute) { switch (attribute) { case TwCommandConstraintAttribute.FirstCycle: return("1st"); case TwCommandConstraintAttribute.ManuallyClassified: return("Manual"); case TwCommandConstraintAttribute.ClassifiedUsingFixtureList: return("List"); case TwCommandConstraintAttribute.ClassifiedUsingMachineLearning: return("Machine"); default: return(attribute.ToString()); } }