예제 #1
0
        static void Main(string[] args)
        {
            //TestTokens.Test();
            //TestTokenWriter.Test();
            //TestEntity.Test();
            //TestPresentationModels.Test();
            //TestXmlModelDefinition.Test();
            //TestFieldMetadataValidatorKey.Test();
            //TestConfiguration.Test();
            //TestCommands.Test();
            //TestEvents.Test();
            //TestDelegates.Test();
            //TestCompiler.Test();
            //TestHash.Test();
            //TestBootstrap.Test();
            //TestKeyValue.Test();
            //TestMultiLockProvider.Test();
            //TestDependency.Test();
            //TestAppServices.Test();
            //TestCloning.Test();
            //TestBehaviors.Test();
            //TestObjectSize.Test();
            //TestSharpKitCompiler.Test();
            //TestLog4net.Test();
            //TestLocalization.Test();
            //Services.Queries.TestQueries.Test();
            //TestDispatcherException.Test();
            //TestEventManager.Test();
            TestAsync.Test();

            Console.ReadKey(true);
        }
예제 #2
0
        private static async void TestWithAsync()
        {
            var config = new TimingComponentConfiguration
            {
                ServiceName           = "Rick's Service",
                IntervalInMillseconds = 2000,
                Perform = async() =>
                {
                    Console.WriteLine("Fired");
                    var t = new TestAsync();
                    await t.RunAsync();
                }
            };

            var timing = new TimingComponent.TimingComponent(config, new ConsoleLogger());

            timing.Start();
            Console.ReadLine();
        }