예제 #1
0
        static void Main(string[] args)
        {
            List <SampleHarness> harnesses = new List <SampleHarness>();

            // LinqSamples:
            LinqSamples linqHarness = new LinqSamples();

            harnesses.Add(linqHarness);

            // LinqSamples:
            LambdaSamples lambdaHarness = new LambdaSamples();

            harnesses.Add(lambdaHarness);

            // Linq To SQL Samples:
            LinqToSqlSamples linqToSqlHarness = new LinqToSqlSamples();

            harnesses.Add(linqToSqlHarness);

            // LinqToXmlSamples:
            LinqToXmlSamples linqToXmlHarness = new LinqToXmlSamples();

            harnesses.Add(linqToXmlHarness);

            // DataSetLinqSamples:
            DataSetLinqSamples dsLinqSamples = new DataSetLinqSamples();

            harnesses.Add(dsLinqSamples);

            // XQueryUseCases:
            XQueryUseCases xqueryHarness = new XQueryUseCases();

            harnesses.Add(xqueryHarness);

            if (args.Length >= 1 && args[0] == "/runall")
            {
                foreach (SampleHarness harness in harnesses)
                {
                    harness.RunAllSamples();
                }
            }
            else
            {
                Application.EnableVisualStyles();

                using (SampleForm form = new SampleForm("LINQ Project Sample Query Explorer", harnesses))
                {
                    form.ShowDialog();
                }
            }
        }
예제 #2
0
        static void Main()
        {
            List <SampleHarness> harnesses = new List <SampleHarness>();


            LinqSamples      linqHarness      = new LinqSamples();
            LinqToSqlSamples linqToSqlHarness = new LinqToSqlSamples();

            harnesses.Add(linqHarness);
            harnesses.Add(linqToSqlHarness);


            Application.EnableVisualStyles();

            using (SampleForm form = new SampleForm("HomeWork", harnesses))
            {
                form.ShowDialog();
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            List<SampleHarness> harnesses = new List<SampleHarness>();

            // LinqSamples:
            LinqSamples linqHarness = new LinqSamples();
            harnesses.Add(linqHarness);

            // Linq To SQL Samples:
            LinqToSqlSamples linqToSqlHarness = new LinqToSqlSamples();
            harnesses.Add(linqToSqlHarness);

            // LinqToXmlSamples:
            LinqToXmlSamples linqToXmlHarness = new LinqToXmlSamples();
            harnesses.Add(linqToXmlHarness);

            // DataSetLinqSamples:
            DataSetLinqSamples dsLinqSamples = new DataSetLinqSamples();
            harnesses.Add(dsLinqSamples);
            
            // XQueryUseCases:
            XQueryUseCases xqueryHarness = new XQueryUseCases();
            harnesses.Add(xqueryHarness);

            if (args.Length >= 1 && args[0] == "/runall") {
                foreach (SampleHarness harness in harnesses)
                {
                    harness.RunAllSamples();
                }
            }
            else {
                Application.EnableVisualStyles();
                
                using (SampleForm form = new SampleForm("LINQ Project Sample Query Explorer", harnesses))
                {
                    form.ShowDialog();
                }
            }
        }