void FinalizeBindingSelf(DiContainer container)
        {
            ScopeTypes scope = GetScope();

            switch (scope)
            {
            case ScopeTypes.Transient:
            {
                RegisterProviderPerContract(
                    container,
                    (_, contractType) => new SubContainerDependencyProvider(
                        contractType, _subIdentifier, CreateContainerCreator(container), _resolveAll));
                break;
            }

            case ScopeTypes.Singleton:
            {
                ISubContainerCreator containerCreator = CreateContainerCreator(container);

                RegisterProviderPerContract(
                    container,
                    (_, contractType) =>
                    new SubContainerDependencyProvider(
                        contractType, _subIdentifier, containerCreator, _resolveAll));
                break;
            }

            default:
            {
                throw Assert.CreateException();
            }
            }
        }
 public CreatorInfo(
     string gameObjectName, string gameObjectGroupName, ISubContainerCreator creator)
 {
     GameObjectName      = gameObjectName;
     GameObjectGroupName = gameObjectGroupName;
     Creator             = creator;
 }
 // if concreteType is null we use the contract type from inject context
 public SubContainerDependencyProvider(
     Type dependencyType,
     object identifier,
     ISubContainerCreator subContainerCreator)
 {
     _subContainerCreator = subContainerCreator;
     _dependencyType      = dependencyType;
     _identifier          = identifier;
 }
 // if concreteType is null we use the contract type from inject context
 public SubContainerDependencyProvider(
     Type dependencyType,
     object identifier,
     ISubContainerCreator subContainerCreator)
 {
     _subContainerCreator = subContainerCreator;
     _dependencyType = dependencyType;
     _identifier = identifier;
 }
Ejemplo n.º 5
0
 // if concreteType is null we use the contract type from inject context
 public SubContainerDependencyProvider(
     Type dependencyType,
     object identifier,
     ISubContainerCreator subContainerCreator, bool resolveAll)
 {
     _subContainerCreator = subContainerCreator;
     _dependencyType      = dependencyType;
     _identifier          = identifier;
     _resolveAll          = resolveAll;
 }
 public SubContainerCreatorCached(ISubContainerCreator subCreator)
 {
     _subCreator = subCreator;
 }
Ejemplo n.º 7
0
 public CreatorInfo(
     GameObjectCreationParameters gameObjectBindInfo, ISubContainerCreator creator)
 {
     GameObjectCreationParameters = gameObjectBindInfo;
     Creator = creator;
 }
Ejemplo n.º 8
0
 public CreatorInfo(
     GameObjectCreationParameters creationParameters, ISubContainerCreator creator)
 {
     GameObjectCreationParameters = creationParameters;
     Creator = creator;
 }
Ejemplo n.º 9
0
 public SubContainerCreatorCached(ISubContainerCreator subCreator)
 {
     _subCreator = subCreator;
 }