public ScopeConcreteIdArgConditionCopyNonLazyBinder ByInstaller(Type installerType)
        {
            Assert.That(installerType.DerivesFrom <InstallerBase>(),
                        "Invalid installer type given during bind command.  Expected type '{0}' to derive from 'Installer<>'", installerType);

            var subcontainerBindInfo = new SubContainerCreatorBindInfo();

            ProviderFunc =
                (container) => new SubContainerDependencyProvider(
                    ContractType, SubIdentifier,
                    new SubContainerCreatorByInstaller(
                        container, subcontainerBindInfo, installerType, BindInfo.Arguments), false);

            return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo));
        }
        public ScopeConcreteIdArgConditionCopyNonLazyBinder ByMethod(
#if !NET_4_6
            ModestTree.Util.
#endif
            Action <DiContainer, TParam1, TParam2, TParam3, TParam4, TParam5, TParam6> installerMethod)
        {
            var subcontainerBindInfo = new SubContainerCreatorBindInfo();

            ProviderFunc =
                (container) => new SubContainerDependencyProvider(
                    ContractType, SubIdentifier,
                    new SubContainerCreatorByMethod <TParam1, TParam2, TParam3, TParam4, TParam5, TParam6>(
                        container, subcontainerBindInfo, installerMethod), false);

            return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo));
        }
示例#3
0
        ByMethod(Action <DiContainer> installerMethod)
        {
            var subContainerBindInfo = new SubContainerCreatorBindInfo();

            SubFinalizer = new SubContainerBindingFinalizer(
                _bindInfo, _subIdentifier, _resolveAll,
                (container) => new SubContainerCreatorByMethod(container, subContainerBindInfo, installerMethod));

            return(new
#if NOT_UNITY3D
                   WithKernelScopeConcreteIdArgConditionCopyNonLazyBinder
#else
                   WithKernelDefaultParentScopeConcreteIdArgConditionCopyNonLazyBinder
#endif
                       (subContainerBindInfo, _bindInfo));
        }
示例#4
0
        ByInstaller(Type installerType)
        {
            Assert.That(installerType.DerivesFrom <InstallerBase>(),
                        "Invalid installer type given during bind command.  Expected type '{0}' to derive from 'Installer<>'", installerType);

            var subContainerBindInfo = new SubContainerCreatorBindInfo();

            SubFinalizer = new SubContainerBindingFinalizer(
                _bindInfo, _subIdentifier, _resolveAll,
                (container) => new SubContainerCreatorByInstaller(container, subContainerBindInfo, installerType));

            return(new
#if NOT_UNITY3D
                   WithKernelScopeConcreteIdArgConditionCopyNonLazyBinder
#else
                   WithKernelDefaultParentScopeConcreteIdArgConditionCopyNonLazyBinder
#endif
                       (subContainerBindInfo, _bindInfo));
        }
示例#5
0
 public WithKernelDefaultParentScopeConcreteIdArgConditionCopyNonLazyBinder(
     SubContainerCreatorBindInfo subContainerBindInfo, BindInfo bindInfo)
     : base(subContainerBindInfo, bindInfo)
 {
 }
 public DefaultParentScopeConcreteIdArgConditionCopyNonLazyBinder(
     SubContainerCreatorBindInfo subContainerBindInfo, BindInfo.BindInfo bindInfo)
     : base(bindInfo)
 {
     SubContainerCreatorBindInfo = subContainerBindInfo;
 }
示例#7
0
 public WithKernelScopeConcreteIdArgConditionCopyNonLazyBinder(
     SubContainerCreatorBindInfo subContainerBindInfo, BindInfo bindInfo)
     : base(bindInfo)
 {
     _subContainerBindInfo = subContainerBindInfo;
 }