Esempio n. 1
0
        static void Main(string[] args)
        {
            var daemon = new Daemon <RitualInit, RitualComplete>(100, response => _done = true);

            daemon.ResolverCache.FlowResolver.RegisterFlowType <RitualInitFlow>();
            daemon.ResolverCache.FlowResolver.RegisterFlowType <SacrificeFlow>();
            daemon.ResolverCache.FlowResolver.RegisterFlowType <RitualResultFlow>();
            daemon.ResolverCache.FactoryResolver.RegisterFactory(typeof(ConsoleAccessorFactory));

            daemon.Invoke(new RitualInit());

            while (!_done)
            {
                Thread.Sleep(200);
            }
        }