Esempio n. 1
0
        static void Main()
        {
            Activity wf1 = new CreateState
            {
                Name = "California"
            };

            ValidationResults results = ActivityValidationServices.Validate(wf1);

            Console.WriteLine("WF1:");
            PrintResults(results);

            Activity wf2 = new CreateCountry
            {
                Name   = "Mexico",
                States =
                {
                    new CreateCity
                    {
                        Name = "Monterrey"
                    }
                }
            };

            results = ActivityValidationServices.Validate(wf2);
            Console.WriteLine("WF2:");
            PrintResults(results);

            Activity wf3 = new CreateCountry
            {
                Name   = "USA",
                States =
                {
                    new CreateState
                    {
                        Name   = "Texas",
                        Cities =
                        {
                            new CreateCity
                            {
                                Name = "Houston"
                            }
                        }
                    }
                }
            };

            results = ActivityValidationServices.Validate(wf3);
            Console.WriteLine("WF3:");
            PrintResults(results);
        }
Esempio n. 2
0
        static void Main()
        {
            Activity wf1 = new CreateState
            {
                Name = "California"
            };

            ValidationResults results = ActivityValidationServices.Validate(wf1);
            Console.WriteLine("WF1:");
            PrintResults(results);

            Activity wf2 = new CreateCountry
            {
                Name = "Mexico",
                States =
                {
                    new CreateCity
                    {
                        Name = "Monterrey"
                    }
                }
            };

            results = ActivityValidationServices.Validate(wf2);
            Console.WriteLine("WF2:");
            PrintResults(results);

            Activity wf3 = new CreateCountry
            {
                Name = "USA",
                States =
                {
                    new CreateState
                    {
                        Name = "Texas",
                        Cities =
                        {
                            new CreateCity
                            {
                                Name = "Houston"
                            }
                        }
                    }
                }
            };
            results = ActivityValidationServices.Validate(wf3);
            Console.WriteLine("WF3:");
            PrintResults(results);
        }