public BusinessControllerBase SelectBusinessController(HttpRequestMessage request, ITypeListHost host, INamingConvention convention, IInjectionContainer container) { UrlParser url = new UrlParser(request.RequestUri.ToString()); Type controllerType = host.BusinessTypeList[url.BusinessClass]; var instance = container.Resolve(controllerType); return new CrowBusinessController(instance, url, convention); }
public void Install(IInjectionContainer container, IQueryStore queryStore) { container.Bind<IBusiness, DataBusiness>(); queryStore.ConnectionString = new Crow.Library.Foundation.Common.ConnectionStringInformation("Data Source=.;Initial Catalog=Test;User Id=sa;Password=Aa123456"); queryStore.Expression<IDataRepository, Data>("GetDataById").Where<int>((m, id) => m.Id == id).AddToStore(); }
/// <summary> /// Initializes a new instance of <see cref="CrowHost"/>. /// </summary> /// <param name="log">Instance of logger.</param> /// <param name="convention">Naming convention instance.</param> /// <param name="container">Dependency injection container.</param> /// <param name="configuration">Configuration helper.</param> /// <param name="host">Http host instance.</param> public CrowHost(ILog log, INamingConvention convention, IInjectionContainer container, IConfigurationHelper configuration, IHttpHost host) : base(log, convention, container, configuration, host) { }
/// <summary> /// Configures the host with default port 80. /// </summary> public static ICrowHttpHost ConfigureHost(IInjectionContainer container, string baseUrl) { var configuration = container.Resolve<IConfigurationHelper>(); var port = configuration.Get<int>(Strings.Configuration.HostingPort, Strings.Defaults.DefaultPort); var host = baseUrl; var isHttps = configuration.Get<bool>(Strings.Configuration.HostingIsHttps, false); return ConfigureHost(container, host, port, isHttps); }
/// <summary> /// Configures the host with default configuration. /// Port: 80 and baseurl : localhost /// </summary> public static ICrowHttpHost ConfigureHost(IInjectionContainer container) { var configuration = container.Resolve<IConfigurationHelper>(); var port = configuration.Get(Strings.Configuration.HostingPort, Strings.Defaults.DefaultPort); var host = configuration.Get(Strings.Configuration.HostingHostname, Strings.Defaults.DefaultHostname); var isHttps = configuration.Get(Strings.Configuration.HostingIsHttps, false); return ConfigureHost(container, host, port, isHttps); }
public void OnUnregister(IInjectionContainer container) { //Unbinds the command dispatcher and pool. container.Unbind<ICommandDispatcher>(); container.Unbind<ICommandPool>(); //Unbinds all commands, if there's any. container.Unbind<ICommand>(); }
public void OnUnregister(IInjectionContainer container) { container.afterAddBinding -= this.OnAfterAddBinding; container.bindingResolution -= this.OnBindingResolution; disposable.Clear(); updateable.Clear(); MonoBehaviour.Destroy(eventCaller); }
public void OnRegister(IInjectionContainer container) { //Binds the command dispatcher to a singleton, so every command can //receive the instance. container.Bind<ICommandDispatcher>().ToSingleton<CommandDispatcher>(); //Binds the command pool to the CommandDispatcher. var dispatcher = (CommandDispatcher)container.Resolve<ICommandDispatcher>(); container.Bind<ICommandPool>().To<CommandDispatcher>(dispatcher); }
/// <summary> /// Initializes a new instance of the <see cref="Adic.Examples.Factories.Bindings.CubeFactory"/> class. /// </summary> /// <param name="container">Container in which the factory is bounded.</param> public CubeFactory(IInjectionContainer container) { this.container = container; //To make instantiation easier, binds the "Cube" behaviour //to the "Cube" prefab. //In this example, "Cube" is not in the prefab and will be //added during resolution. this.container.Bind<Cube>().ToPrefab("07_Factory/Cube"); }
public void Install(IInjectionContainer container, IQueryStore queryStore) { container.Bind<IHttpHost, AspNetSelfHosting>(); container.Bind<ICrowHttpHandler, HttpCrowDispatcher>(); container.Bind<INamingConvention, DefaultNamingConvention>(); container.Bind<ICrow, CrowDocumentationController>(); container.Bind<ICrowHttpHost, CrowHost>(); container.Bind<IHostConfiguration, HostConfiguration>(); container.Bind<IBusinessControllerSelector, CrowBusinessControllerSelector>(); }
public void SetupBindings(IInjectionContainer container) { container //Bind the "CubeA" prefab. .Bind<Transform>().ToPrefabSingleton("06_BindingsSetup/CubeA") //Bind the "CubeB" prefab. .Bind<Transform>().ToPrefabSingleton("06_BindingsSetup/CubeB") //Bind the "CubeC" prefab. .Bind<Transform>().ToPrefabSingleton("06_BindingsSetup/CubeC"); }
/// <summary> /// Configures the host with the given baseurl and port. /// </summary> public static ICrowHttpHost ConfigureHost(IInjectionContainer container, string baseUrl, int port, bool isHttps = false) { var host = container.Resolve<ICrowHttpHost>(); var configuration = container.Resolve<IHostConfiguration>(); configuration.BaseUrl = baseUrl; configuration.IsHttps = isHttps; configuration.Port = port; host.Configure(configuration); return host; }
/// <summary> /// 在容器中绑定一个以指定类型为值,ICommand 为 type 的 binding. /// 执行后,可调用 PoolCommands 方法来储存所有 command 到对象池. /// RegisterCommands 方法用于使 command 准备进入对象池. /// </summary> public static IInjectionContainer RegisterCommand(this IInjectionContainer container, Type type) { if (!type.IsClass && type.IsAssignableFrom(typeof(ICommand))) { throw new Exceptions(Exceptions.TYPE_NOT_A_COMMAND); } container.Bind <ICommand>().To(type); return(container); }
/// <summary> /// 注销容器 /// </summary> public void OnUnregister(IInjectionContainer container) { // 取消 AOT 委托 container.afterAddBinding -= this.OnAfterAddBinding; container.afterInstantiate -= this.OnBindingResolution; // 释放 list 并销毁组件 disposable.Clear(); updateable.Clear(); MonoBehaviour.Destroy(eventBehaviour); }
public void OnRegister(IInjectionContainer container) { // 创建一条 CommandDispatcher 实例 CommandDispatcher dispatcher = new CommandDispatcher(container); // 将实例绑定到绑定一个单例的 ICommandDispatcher binding container.BindSingleton <ICommandDispatcher>().To(dispatcher); // 再将实例绑定到一个 ICommandPool binding,此时 container 中将有两条 binding // 都为单例类型,且值都为 dispatcher,只有类型不同 container.BindSingleton <ICommandPool>().To(dispatcher); }
public void Install(IInjectionContainer container, IQueryStore queryStore) { string provider = "System.Data.SqlClient"; string connectionString = "Data Source=.;Initial Catalog=Test;User Id=sa;Password=Aa123456"; queryStore.ConnectionString = new ConnectionStringInformation(connectionString, provider); queryStore.Expression<IDataRepository, Data>("LoadDataById") .Select() .Where<int>((data, id) => data.Id == id) .OrderBy((d) => d.Id) .AddToStore(); container.Bind<IDataBusiness, DataBusinessClass>(); }
static void Main(string[] args) { var bootstrapper = new UnityBootstrapper(); IInjectionContainer container = bootstrapper.GetContainer(); var mgr = new GenericManager(container); Console.WriteLine(mgr.GetOutput1()); Console.WriteLine(mgr.GetOutput2()); Console.WriteLine(mgr.GetOutput3()); Console.Read(); }
public Application(IInjectionContainer container) { this.container = container; RegisterViewModels(); RegisterServices(); Initialize(); DisplayRootView <MasterView>(); //DisplayRootViewFor<ProjectListViewModel>(); }
/// <summary> /// Initializes a new instance of the <see cref="Adic.CommandDispatcher"/> class. /// </summary> /// <param name="container">Dependency injection container that created the command dispatcher.</param> public CommandDispatcher(IInjectionContainer container) { this.commands = new Dictionary <Type, object>(); this.container = container; this.commandsToRegister = new List <Type>(); this.eventCallerExtension = this.container.GetExtension <EventCallerContainerExtension>(); if (eventCallerExtension == null) { this.container.RegisterExtension <EventCallerContainerExtension>(); this.eventCallerExtension = this.container.GetExtension <EventCallerContainerExtension>(); } }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); IIocBootstrapper bootstrapper = new UnityBootstrapper(); IInjectionContainer container = bootstrapper.GetContainer(); DependencyResolver.SetResolver(new IocDependencyResolver(container)); }
/// <summary> /// Initializes a new instance of <see cref="CrowBusinessHandler"/>. /// </summary> public CrowBusinessHandler(ITypeListHost host, INamingConvention convention, IInjectionContainer container) { _host = host; _host.ThrowIfNull("host"); _convention = convention; _convention.ThrowIfNull("convention"); _container = container; _container.ThrowIfNull("container"); }
/// <summary> /// Installs the crow components. /// </summary> /// <param name="container"></param> /// <param name="queryStore"></param> public void Install(IInjectionContainer container, IQueryStore queryStore) { container.Bind<ILog, DefaultLogger>(); container.Bind<IFileOperations, FSFileOperations>(); container.Bind<IConfigurationHelper, ApplicationConfigurationHelper>(); container.Bind<IMessagingService, DebugMessagesService>(); container.Bind<IAccountService, UnsafeAccountService>(); container.Bind<IDialectProvider, SqlDialectProvider>(); container.Bind<ICacheManager, InMemoryCacheManager>(); container.Bind<ITemplateEngine, PoorMansTemplating>(); container.Bind<IAssemblyLoader, FileAssemblyLoader>(); container.Bind<IItemManager, ThreadItemManager>(); }
public void SetupBindings(IInjectionContainer container) { container .Bind <CubeRotationSpeed>().To(new CubeRotationSpeed(0.5f)).When( context => context.parentInstance is MonoBehaviour && ((MonoBehaviour)context.parentInstance).name.Contains("CubeA")) .Bind <CubeRotationSpeed>().To(new CubeRotationSpeed(2.0f)).When( context => context.parentInstance is MonoBehaviour && ((MonoBehaviour)context.parentInstance).name.Contains("CubeB")) .Bind <CubeRotationSpeed>().To(new CubeRotationSpeed(4.5f)).When( context => context.parentInstance is MonoBehaviour && ((MonoBehaviour)context.parentInstance).name.Contains("CubeC")); }
public void TestMethod1() { var bootstrapper = new UnityBootstrapper(); IInjectionContainer container = bootstrapper.GetContainer(); var mgr = new GenericManager(container); string val1 = mgr.GetOutput1(); string val2 = mgr.GetOutput2(); string val3 = mgr.GetOutput3(); Assert.AreEqual(val1, new MockClass1().Val); Assert.AreEqual(val2, new MockClass2().Val); Assert.AreEqual(val3, new MockClass3().Val); }
public void OnRegister(IInjectionContainer container) { this.CreateBehaviour(container.identifier); // Check whether a binding for the ICommandDispatcher exists. if (container.ContainsBindingFor <ICommandDispatcher>()) { var dispatcher = container.Resolve <ICommandDispatcher>(); BindUnityExtension(disposable, dispatcher); } container.afterAddBinding += this.OnAfterAddBinding; container.bindingResolution += this.OnBindingResolution; }
public void SetupBindings(IInjectionContainer container) { container //Bind the rotation data for "CubeA". .Bind<CubeRotationSpeed>().To(new CubeRotationSpeed(0.5f)).When( context => context.parentInstance is MonoBehaviour && ((MonoBehaviour)context.parentInstance).name.Contains("CubeA")) //Bind the rotation data for "CubeB". .Bind<CubeRotationSpeed>().To(new CubeRotationSpeed(2.0f)).When( context => context.parentInstance is MonoBehaviour && ((MonoBehaviour)context.parentInstance).name.Contains("CubeB")) //Bind the rotation data for "CubeC". .Bind<CubeRotationSpeed>().To(new CubeRotationSpeed(4.5f)).When( context => context.parentInstance is MonoBehaviour && ((MonoBehaviour)context.parentInstance).name.Contains("CubeC")); }
public void TestInitialize() { // mock: _traceConfig = new TraceConfig { TraceBehavior = TraceStaticBehavior.AddListenerToStaticAccessAndRemoveDefaultTracer, PageSize = 1000, MaximumTimeForFlush = TimeSpan.FromSeconds(5) }; // instance de test: _container = new InjectionContainerSimpleInjector(); // enregistre le type de la classe de test _container.Register <IClassVoidTest, ClassVoidTest>(LifeTime.Singleton); }
public void OnRegister(IInjectionContainer container) { //Adds the container to the disposable list. disposable.Add(container); //Checks whether a binding for the ICommandDispatcher exists. if (container.ContainsBindingFor<ICommandDispatcher>()) { var dispatcher = container.Resolve<ICommandDispatcher>(); if (dispatcher is IDisposable) { disposable.Add((IDisposable)dispatcher); } } container.afterAddBinding += this.OnAfterAddBinding; container.bindingResolution += this.OnBindingResolution; }
/// <summary> /// 为指定命名空间中实现了 IBindingsSetup 接口的类型在容器中实例化并注入,再按优先级排序,最后按 /// 顺序执行它们自身所实现的 SetupBindings 方法 /// </summary> public static IInjectionContainer SetupBindings(this IInjectionContainer container, string namespaceName, bool includeChildren) { // 获取指定命名空间中实现了 IBindingsSetup 接口的类型数组 var setups = TypeUtils.GetAssignableTypes( typeof(IBindingsSetup), namespaceName, includeChildren); // 新建一个和获取到的类型数组同等长度的内部类数组 var prioritizedSetups = new PrioritizedSetup[setups.Length]; for (var i = 0; i < setups.Length; i++) { // 使用指定容器获取类型的经过注入后的类型实例 var setup = (IBindingsSetup)container.Resolve(setups[i]); var attributes = setup.GetType().GetCustomAttributes(typeof(Priority), true); // 如果获取到了[Priority]特性,就将类型的实例和其优先级数字新建为一个新的内部类加入数组 if (attributes.Length > 0) { var bindingPriority = attributes[0] as Priority; prioritizedSetups[i] = new PrioritizedSetup() { setup = setup, priority = bindingPriority.priority }; } else { // 如果没有获取到,就用实例和优先级数字0来新建一个内部类加入数组 prioritizedSetups[i] = new PrioritizedSetup() { setup = setup, priority = 0 }; } } // 对数组进行排序 Array.Sort(prioritizedSetups); // 逐一执行 setup 对象所实现的 SetupBindings 方法 for (var setupIndex = 0; setupIndex < prioritizedSetups.Length; setupIndex++) { prioritizedSetups[setupIndex].setup.SetupBindings(container); } return(container); }
/// <summary> /// Determines if the object is a singleton in a given container. /// </summary> /// <param name="obj">Target object to check.</param> /// <param name="container">Container to check for bindings.</param> /// <returns><c>true</c> if is singleton on container the specified obj container; otherwise, <c>false</c>.</returns> public static bool IsSingletonOnContainer(object obj, IInjectionContainer container) { var isSingleton = false; var bindings = container.GetBindingsFor(obj.GetType()); if (bindings == null) return false; for (var index = 0; index < bindings.Count; index++) { var binding = bindings[index]; if (binding.value == obj) { isSingleton = true; } } return isSingleton; }
public static RouteBase MapBusiness(this RouteCollection routes, string url, IInjectionContainer container) { INamingConvention convention = container.Resolve<INamingConvention>(); BusinessInvoker invoker = new BusinessInvoker(AspNetRoutedHost.HostList, convention, container); string routeUrl = url; if (!routeUrl.EndsWith("/")) { routeUrl += "/{*operation}"; } routeUrl = routeUrl.TrimStart('~').TrimStart('/'); var route = new Route(routeUrl, new CrowRouteHandler(invoker)); routes.Add("Crow", route); return route; }
/// <summary> /// Register all commands from a given namespace. /// </summary> /// <param name="container">The container in which the command will be registered.</param> /// <param name="includeChildren">Indicates whether child namespaces should be included.</param> /// <param name="namespaceName">Namespace name.</param> /// <returns>The injection container for chaining.</returns> public static IInjectionContainer RegisterCommands(this IInjectionContainer container, string namespaceName, bool includeChildren) { var commands = TypeUtils.GetAssignableTypes(typeof(ICommand), namespaceName, includeChildren); if (commands.Length > 0) { var pool = container.Resolve <ICommandPool>(); for (var cmdIndex = 0; cmdIndex < commands.Length; cmdIndex++) { pool.AddCommand(commands[cmdIndex]); } } return(container); }
public void OnRegister(IInjectionContainer container) { //Adds the container to the disposable list. disposable.Add(container); //Checks whether a binding for the ICommandDispatcher exists. if (container.ContainsBindingFor <ICommandDispatcher>()) { var dispatcher = container.Resolve <ICommandDispatcher>(); if (dispatcher is IDisposable) { disposable.Add((IDisposable)dispatcher); } } container.afterAddBinding += this.OnAfterAddBinding; container.bindingResolution += this.OnBindingResolution; }
/// <summary> /// 整理储存所有容器 /// </summary> virtual protected void ContainersStoring(IInjectionContainer container) { if (container.id != null) { if (!containersDic.ContainsKey(container.id)) { containersDic[container.id] = container; } else { throw new Exceptions(Exceptions.SAME_OBJECT); } } else { containersDic[ContainerNullId.Null] = container; } }
public void OnUnregister(IInjectionContainer container) { container.afterAddBinding -= this.OnAfterAddBinding; container.bindingResolution -= this.OnBindingResolution; if (behaviour != null && behaviour.gameObject != null) { MonoBehaviour.DestroyImmediate(behaviour.gameObject); } behaviour = null; disposable.Clear(); updateable.Clear(); lateUpdateable.Clear(); fixedUpdateable.Clear(); focusable.Clear(); pausable.Clear(); quitable.Clear(); }
/// <summary> /// Setups bindings in the container from a given <paramref name="namespace"/>. /// </summary> /// <param name="container">Container in which the bindings will be setup.</param> /// <param name="namespaceName">Namespace name.</param> /// <param name="includeChildren">Indicates whether child namespaces should be included.</param> /// <param name="setup">The bindings setup.</param> /// <returns>The injection container for chaining.</returns> public static IInjectionContainer SetupBindings(this IInjectionContainer container, string namespaceName, bool includeChildren) { var setups = TypeUtils.GetAssignableTypes( typeof(IBindingsSetup), namespaceName, includeChildren); var prioritizedSetups = new PrioritizedBindingSetup[setups.Length]; //Adds setups to "priority" with priority definitions. for (var setupIndex = 0; setupIndex < setups.Length; setupIndex++) { var setup = (IBindingsSetup)container.Resolve(setups[setupIndex]); var attributes = setup.GetType().GetCustomAttributes(typeof(BindingPriority), true); if (attributes.Length > 0) { var bindindPriority = attributes[0] as BindingPriority; prioritizedSetups[setupIndex] = new PrioritizedBindingSetup() { setup = setup, priority = bindindPriority.priority }; } else { //If the binding has no priority, saves it with priority 0. prioritizedSetups[setupIndex] = new PrioritizedBindingSetup() { setup = setup, priority = 0 }; } } //Orders the priority list and executes the setups. prioritizedSetups = prioritizedSetups.OrderByDescending(setup => setup.priority).ToArray(); for (var setupIndex = 0; setupIndex < prioritizedSetups.Length; setupIndex++) { prioritizedSetups[setupIndex].setup.SetupBindings(container); } return(container); }
protected void Application_Start() { _container = new InjectionContainer(); // register some MVC objects required for configuration _container.Register(GlobalFilters.Filters); _container.Register(RouteTable.Routes); _container.Register(BundleTable.Bundles); _container.Register(GlobalConfiguration.Configuration); _container.Register(GlobalHost.ConnectionManager); // AreaRegistration.RegisterAllAreas(); // let all configurable items, configure themselfs. var configurables = _container.GetExportedValues<IStartupConfiguration>(); foreach (IStartupConfiguration configurable in configurables) configurable.Configure(); GlobalConfiguration.Configuration.EnsureInitialized(); }
public void Init() { this.injector = new InjectionContainer(); this.binder = this.injector as IBinder; //Binds some objects to use on tests. binder.Bind<IMockInterface>().To<MockIClassWithAttributes>(); binder.Bind<MockIClassWithoutAttributes>().ToSingleton().As("singleton"); binder.Bind<MockIClass>().ToSingleton(); this.containerIdentifierTests = new InjectionContainer(); var mockClass1 = new MockIClass() { property1 = "MockClass1" }; var mockClass2 = new MockIClassWithoutAttributes() { property1 = "MockClass2" }; var mockClass3 = new MockIClassWithAttributes() { property1 = "MockClass3" }; this.containerIdentifierTests.Bind<MockIClass>().To(mockClass1).As(TestIdentifier.MockClass); this.containerIdentifierTests.Bind<MockIClassWithoutAttributes>().To(mockClass2).As(TestIdentifier.MockClass); this.containerIdentifierTests.Bind<MockIClassWithAttributes>().To(mockClass3).As(TestIdentifier.MockClass); this.containerIdentifierTests.Bind<IMockInterface>().To(mockClass1).As(TestIdentifier.MockClass1); this.containerIdentifierTests.Bind<IMockInterface>().To(mockClass2).As(TestIdentifier.MockClass2); this.containerIdentifierTests.Bind<IMockInterface>().To(mockClass3).As(TestIdentifier.MockClass3); this.containerIdentifierTests.Bind<IMockInterface>().To<MockIClass>().As(TestIdentifier.MockClassSingle); }
protected override void Configure() { winContainer = new WinRTContainer(); container = new SimpleInjectionContainer(winContainer); winContainer.RegisterWinRTServices(); container. Singleton <Application>(); RegisterServices().ContinueWith(result => { Coroutine.Completed += (s, e) => { if (e.Error == null) { return; } Debug.Write(e.Error.Message); }; }); }
/// <summary> /// Register all commands from a given namespace. /// /// After registration, all commands are pooled. /// </summary> /// <param name="container">The container in which the command will be registered.</param> /// <param name="includeChildren">Indicates whether child namespaces should be included.</param> /// <param name="namespaceName">Namespace name.</param> /// <returns>The injection container for chaining.</returns> public static IInjectionContainer RegisterCommands(this IInjectionContainer container, string namespaceName, bool includeChildren) { var commands = TypeUtils.GetAssignableTypesInNamespace(typeof(ICommand), namespaceName, includeChildren); if (commands.Length > 0) { for (var cmdIndex = 0; cmdIndex < commands.Length; cmdIndex++) { var commandType = commands[cmdIndex]; if (!commandType.IsAbstract) { container.Bind <ICommand>().To(commandType); } } PoolCommands(container); } return(container); }
/// <summary> /// 注册容器 /// </summary> public void OnRegister(IInjectionContainer container) { // 将容器添加到 IDisposable list. disposable.Add(container); // 如果容器中含有 ICommandDispatcher 类型的 binding,且它实现了 IDisposable 接口 // 就获取它的 ICommandDispatcher 类型实例并将其也添加到 IDisposable list var commandDispatches = container.GetTypes <ICommandDispatcher>(); if (commandDispatches != null && commandDispatches.Count != 0) { var dispatcher = container.Resolve <ICommandDispatcher>(); if (dispatcher is IDisposable) { disposable.Add((IDisposable)dispatcher); } } // 添加 AOT 委托 container.afterAddBinding += this.OnAfterAddBinding; container.afterInstantiate += this.OnBindingResolution; }
public void Install(IInjectionContainer container, IQueryStore queryStore) { _isInstalled = true; installerstack.Push("Child"); }
public void Init(IInjectionContainer container) { // Does nothing. }
public IocDependencyResolver(IInjectionContainer container) { _container = container; }
public void Install(IInjectionContainer container, IQueryStore queryStore) { installerstack.Push("Parent"); }
public void OnUnregister(IInjectionContainer container) { container.beforeAddBinding -= this.OnBeforeAddBinding; container.bindingEvaluation -= this.OnBindingEvaluation; }
public InjectionControllerFactory(IInjectionContainer container) { Contract.Requires<ArgumentNullException>(container != null); _container = container; }
public BusinessInvoker(ITypeListHost host, INamingConvention convention, IInjectionContainer container) { _host = host; _convention = convention; _container = container; }
public static RouteBase MapBusiness(this RouteCollection routes, IInjectionContainer container) { return MapBusiness(routes, "~/crow", container); }
public void Install(IInjectionContainer container, IQueryStore queryStore) { container.Bind<ITestBusiness, TestBusiness>(); }
public void Install(IInjectionContainer container, IQueryStore queryStore) { container.Bind<IFakeUserBusiness, FakeUserBusiness>(); }
public void SetupBindings(IInjectionContainer container) { //Bind "GameObject" to the "CubeFactory". container.Bind<GameObject>().ToFactory<CubeFactory>(); }