//[Obsolete] //public static Func<string, bool> NameVerifier //{ // get { return nameVerifier ?? defaultNameVerifier; } // set { nameVerifier = value; } //} public static void ValidateName(string name) { if (IdentifierValidator.Verify(name) == false) { throw new ArgumentException($"{name} is invalid name", nameof(name)); } }
private void ID_TextChanged(object sender, TextChangedEventArgs e) { if (this.ID.Text != string.Empty && IdentifierValidator.Verify(this.ID.Text) == false) { //this.blinker.HasError = true; } }
private static bool VerifyName(string name) { if (NameValidator.VerifyName(name) == false) { return(false); } return(IdentifierValidator.Verify(name)); }
public async Task Name_User_TestAsync() { var userItemFilter = new UserItemFilter(typeof(IUser)); var userItem = await userItemFilter.GetUserItemAsync(app); var condition = IdentifierValidator.Verify(userItem.Name); Assert.IsTrue(condition); }
public static string NextInvalidIdentifier() { string name; while (IdentifierValidator.Verify((name = NextWord())) == true) { ; } return(name); }
public static bool VerifyName(string name) { return(IdentifierValidator.Verify(name)); }