/// <summary> /// Constrains the string so that it must start with the specified value, /// using the <see cref="StringComparison.Ordinal" /> comparison type. /// </summary> /// <param name="manager">The constraint manager to match the constraint.</param> /// <param name="value">The value the string should start with.</param> /// <returns>A dummy argument value.</returns> public static string StartsWith(this IArgumentConstraintManager <string> manager, string value) { return(manager.StartsWith(value, StringComparison.Ordinal)); }
protected override void CreateConstraint(IArgumentConstraintManager <string> scope) { scope.StartsWith("abc"); }