Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var container       = AutofacSetup.ConfigureDependencies();
            var gameEnvironment = container.Resolve <IGameEnvironment>();

            gameEnvironment.StartGame();
        }
Exemplo n.º 2
0
        private static void ConfigureDependencyInjection()
        {
            ContainerBuilder builder = new ContainerBuilder();

            //var config = new HubConfiguration();

            builder.RegisterControllers(typeof(MvcApplication).Assembly);
            //builder.RegisterHubs(Assembly.GetExecutingAssembly());

            IContainer container = AutofacSetup.ConfigureDependencies(builder);

            //GlobalHost.DependencyResolver = new Autofac.Integration.SignalR.AutofacDependencyResolver(container);
        }