示例#1
0
        private string[] ValidateEmail()
        {
            // Creating entity to be validated
            var per = new Person {
                Email = textBox1.Text
            };

            var runParameter = new RunParameter("check email", per);

            // Calling into engine for validation
            var result = _validator.Run(runParameter);

            // we select only text here to display in the UI
            // In a real application you can do more interesting stuff with notifications
            return(result.Context.Notifications.Default.Notices.Select(x => x.Message).ToArray());
        }
 public void Run(object jobParameters, RunParameter runParameters)
 {
     Console.WriteLine("Got the params {0} and {1}", jobParameters, runParameters);
 }