예제 #1
0
        public InstanceSingletonLazyCreator(
            SingletonId id, InstanceSingletonProviderCreator owner,
            DiContainer container, object instance)
        {
            Assert.That(instance != null || container.IsValidating);

            _owner    = owner;
            _id       = id;
            _instance = instance;
        }
예제 #2
0
        public InstanceSingletonLazyCreator(
            SingletonId id, InstanceSingletonProviderCreator owner,
            DiContainer container, object instance)
        {
            Assert.That(instance != null || container.IsValidating);

            _owner = owner;
            _id = id;
            _instance = instance;
        }
예제 #3
0
        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
        }