Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            var container = new Container();
            var dependencyResolver = new SimpleInjectorDependencyResolver(container);

            container.Register<ILogger, ConsoleLogger>();

            var helper = new ExampleConsoleApp(dependencyResolver);
            helper.Run(MainAsync);
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            var dependencyResolver = GetSimpleInjectorDependencyResolver();

            // or use your IoC container of choice:
            //var dependencyResolver = GetAutofacDependencyResolver();
            //var dependencyResolver = GetCastleWindsorDependencyResolver();
            //var dependencyResolver = GetUnityDependencyResolver();
            //var dependencyResolver = GetNinjectDependencyResolver();

            // This helper is used because this example is not run as a service. You do not
            // need it in your own applications.
            var helper = new ExampleConsoleApp(dependencyResolver);

            helper.Run(MainAsync);
        }