/// <summary> /// Constrains the string so that it must end 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 end with.</param> /// <returns>A dummy argument value.</returns> public static string EndsWith(this IArgumentConstraintManager <string> manager, string value) { Guard.AgainstNull(manager, nameof(manager)); Guard.AgainstNull(value, nameof(value)); return(manager.EndsWith(value, StringComparison.Ordinal)); }
protected override void CreateConstraint(IArgumentConstraintManager <string> scope) { scope.EndsWith("table"); }