private static VariantConstraints ParseConstraints(string variant)
        {
            var variantParts = variant.Split(new[] { AndOperator }, StringSplitOptions.RemoveEmptyEntries);

            var variantConstraints = new VariantConstraints();

            foreach (var variantPart in variantParts)
            {
                var variantKeyAndValue = variantPart.Split(new[] { VariantSeparator }, StringSplitOptions.RemoveEmptyEntries);
                var variantPair        = new VariantConstraint(variantKeyAndValue[0], variantKeyAndValue[1]);
                variantConstraints.AddVariant(variantPair);
            }
            return(variantConstraints);
        }
Exemplo n.º 2
0
 public void AddVariant(VariantConstraint vc)
 {
     _variants.Add(vc);
 }