static void Main(string[] args) { var container = AutofacSetup.ConfigureDependencies(); var gameEnvironment = container.Resolve <IGameEnvironment>(); gameEnvironment.StartGame(); }
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); }