示例#1
0
        private static void Main()
        {
            var generator = new PassGenerator();
            var validator = new PassValidator(generator);

            Console.WriteLine("{0}", "Login:"******"{0} {1}", "Your password is:", generator.Generate(login));
            Console.WriteLine("{0}", "Login:"******"{0} {1}", "Your password is:", generator.Generate(newLogin));
                Console.WriteLine("{0}", "Login:"******"{0}", "Password:"******"{0}", "Valid password!");
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine("{0}", "Invalid password!");
                Console.ReadLine();
            }
        }
示例#2
0
 public PassValidator(PassGenerator generator)
 {
     this.Generator = generator;
 }