예제 #1
0
        //[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));
            }
        }
예제 #2
0
 private void ID_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (this.ID.Text != string.Empty && IdentifierValidator.Verify(this.ID.Text) == false)
     {
         //this.blinker.HasError = true;
     }
 }
예제 #3
0
 private static bool VerifyName(string name)
 {
     if (NameValidator.VerifyName(name) == false)
     {
         return(false);
     }
     return(IdentifierValidator.Verify(name));
 }
예제 #4
0
        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);
        }
예제 #5
0
        public static string NextInvalidIdentifier()
        {
            string name;

            while (IdentifierValidator.Verify((name = NextWord())) == true)
            {
                ;
            }
            return(name);
        }
예제 #6
0
 public static bool VerifyName(string name)
 {
     return(IdentifierValidator.Verify(name));
 }