コード例 #1
0
        public PrefabSingletonLazyCreator(
            DiContainer container, PrefabSingletonProviderCreator owner,
            PrefabSingletonId id)
        {
            _container = container;
            _owner     = owner;
            _id        = id;

            Assert.IsNotNull(id.Prefab);
        }
コード例 #2
0
        public PrefabSingletonLazyCreator(
            DiContainer container, PrefabSingletonProviderCreator owner,
            PrefabSingletonId id)
        {
            _container = container;
            _owner = owner;
            _id = id;

            Assert.IsNotNull(id.Prefab);
        }
コード例 #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
        }
コード例 #4
0
        public SingletonProviderCreator(
            DiContainer container, SingletonMarkRegistry markRegistry)
        {
            _standardProviderCreator = new StandardSingletonProviderCreator(container, markRegistry);

            _subContainerMethodProviderCreator    = new SubContainerSingletonProviderCreatorByMethod(container, markRegistry);
            _subContainerInstallerProviderCreator = new SubContainerSingletonProviderCreatorByInstaller(container, markRegistry);

#if !NOT_UNITY3D
            _subContainerPrefabProviderCreator         = new SubContainerSingletonProviderCreatorByPrefab(container, markRegistry);
            _subContainerPrefabResourceProviderCreator = new SubContainerSingletonProviderCreatorByPrefabResource(container, markRegistry);

            _prefabProviderCreator         = new PrefabSingletonProviderCreator(container, markRegistry);
            _prefabResourceProviderCreator = new PrefabResourceSingletonProviderCreator(container, markRegistry);
#endif
        }
コード例 #5
0
        public SingletonProviderCreator(
            DiContainer container, SingletonMarkRegistry markRegistry)
        {
            _standardProviderCreator = new StandardSingletonProviderCreator(container, markRegistry);

            _subContainerMethodProviderCreator = new SubContainerSingletonProviderCreatorByMethod(container, markRegistry);
            _subContainerInstallerProviderCreator = new SubContainerSingletonProviderCreatorByInstaller(container, markRegistry);

#if !NOT_UNITY3D
            _subContainerPrefabProviderCreator = new SubContainerSingletonProviderCreatorByPrefab(container, markRegistry);
            _subContainerPrefabResourceProviderCreator = new SubContainerSingletonProviderCreatorByPrefabResource(container, markRegistry);

            _prefabProviderCreator = new PrefabSingletonProviderCreator(container, markRegistry);
            _prefabResourceProviderCreator = new PrefabResourceSingletonProviderCreator(container, markRegistry);
#endif
        }
コード例 #6
0
        public PrefabSingletonProvider(
            PrefabSingletonId prefabId, Type componentType,
            PrefabSingletonLazyCreator lazyCreator,
            SingletonRegistry singletonRegistry,
            PrefabSingletonProviderCreator owner)
        {
            _owner = owner;
            Assert.That(componentType.DerivesFromOrEqual <Component>());

            _singletonRegistry = singletonRegistry;
            _lazyCreator       = lazyCreator;
            _componentType     = componentType;
            _prefabId          = prefabId;
            _singletonId       = new SingletonId(componentType, prefabId.ConcreteIdentifier);

            Init();
        }
コード例 #7
0
        public PrefabSingletonProvider(
            PrefabSingletonId prefabId, Type componentType,
            PrefabSingletonLazyCreator lazyCreator,
            SingletonRegistry singletonRegistry,
            PrefabSingletonProviderCreator owner)
        {
            _owner = owner;
            Assert.That(componentType.DerivesFromOrEqual<Component>());

            _singletonRegistry = singletonRegistry;
            _lazyCreator = lazyCreator;
            _componentType = componentType;
            _prefabId = prefabId;
            _singletonId = new SingletonId(componentType, prefabId.ConcreteIdentifier);

            Init();
        }