public MonoBehaviourSingletonLazyCreator( DiContainer container, MonoBehaviourSingletonProviderCreator owner, MonoBehaviourSingletonId id) { Assert.That(id.ConcreteType.DerivesFromOrEqual<Component>()); _container = container; _owner = owner; _id = id; }
public MonoBehaviourSingletonLazyCreator( DiContainer container, MonoBehaviourSingletonProviderCreator owner, MonoBehaviourSingletonId id) { Assert.That(id.ConcreteType.DerivesFromOrEqual <Component>()); _container = container; _owner = owner; _id = id; }
public SingletonProviderCreator( DiContainer container, SingletonRegistry singletonRegistry) { _typeSingletonProviderCreator = new TypeSingletonProviderCreator(container, singletonRegistry); _methodSingletonProviderCreator = new MethodSingletonProviderCreator(singletonRegistry); _instanceSingletonProviderCreator = new InstanceSingletonProviderCreator(container, singletonRegistry); _factorySingletonProviderCreator = new FactorySingletonProviderCreator(container, singletonRegistry); #if !ZEN_NOT_UNITY3D _prefabResourceSingletonProviderCreator = new PrefabResourceSingletonProviderCreator(container, singletonRegistry); _prefabSingletonProviderCreator = new PrefabSingletonProviderCreator(container, singletonRegistry); _monoBehaviourSingletonProviderCreator = new MonoBehaviourSingletonProviderCreator(container, singletonRegistry); _gameObjectSingletonProviderCreator = new GameObjectSingletonProviderCreator(container, singletonRegistry); #endif }
public MonoBehaviourSingletonProvider( MonoBehaviourSingletonId monoBehaviourId, Type componentType, MonoBehaviourSingletonLazyCreator lazyCreator, SingletonRegistry singletonRegistry, MonoBehaviourSingletonProviderCreator owner) { _owner = owner; Assert.That(componentType.DerivesFromOrEqual <Component>()); _singletonRegistry = singletonRegistry; _lazyCreator = lazyCreator; _componentType = componentType; _monoBehaviourId = monoBehaviourId; _singletonId = new SingletonId(componentType, monoBehaviourId.ConcreteIdentifier); Init(); }
public MonoBehaviourSingletonProvider( MonoBehaviourSingletonId monoBehaviourId, Type componentType, MonoBehaviourSingletonLazyCreator lazyCreator, SingletonRegistry singletonRegistry, MonoBehaviourSingletonProviderCreator owner) { _owner = owner; Assert.That(componentType.DerivesFromOrEqual<Component>()); _singletonRegistry = singletonRegistry; _lazyCreator = lazyCreator; _componentType = componentType; _monoBehaviourId = monoBehaviourId; _singletonId = new SingletonId(componentType, monoBehaviourId.ConcreteIdentifier); Init(); }