Ejemplo n.º 1
0
        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 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;
        }
Ejemplo n.º 3
0
        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;
        }