Пример #1
0
        static void Main(string[] args)
        {
            var root = new Root();
            root.Register(new ConsoleUiModule());

            var demo = root.Resolve().Resolve<OnionDemo>();
            demo.Demo();

            root.Release();
        }
Пример #2
0
        static void Main(string[] args)
        {
            var root = new Root();
            root.Register(new NhModule(), new DomainServiciesModule(), new ServerModule());

            var server = root.Resolve().Resolve<OnionServer>();
            server.Start();
            Console.WriteLine("Server is started...");
            Console.ReadLine();

            server.Stop();
            root.Release();
        }