Exemplo n.º 1
0
		static void Main(string[] args)
		{
			List<SampleHarness> harnesses = new List<SampleHarness>();

			
			LinqSamples linqHarness = new LinqSamples();
			harnesses.Add(linqHarness);
						
			Application.EnableVisualStyles();
				
			using (SampleForm form = new SampleForm("HomeWork - Mihail Romanov", harnesses))
			{
				form.ShowDialog();
			}
		}
Exemplo n.º 2
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();
                }
            }
        }