public PrefabResourceSingletonLazyCreator(
            DiContainer container, PrefabResourceSingletonProviderCreator owner,
            PrefabResourceSingletonId id)
        {
            _container = container;
            _owner = owner;
            _id = id;

            Assert.IsNotNull(id.ResourcePath);
        }
        public PrefabResourceSingletonLazyCreator(
            DiContainer container, PrefabResourceSingletonProviderCreator owner,
            PrefabResourceSingletonId id)
        {
            _container = container;
            _owner     = owner;
            _id        = id;

            Assert.IsNotNull(id.ResourcePath);
        }
Exemplo n.º 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
        }
Exemplo n.º 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
        }
Exemplo n.º 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
        }
        public PrefabResourceSingletonProvider(
            PrefabResourceSingletonId resourceId, Type componentType,
            PrefabResourceSingletonLazyCreator lazyCreator,
            SingletonRegistry singletonRegistry,
            PrefabResourceSingletonProviderCreator owner)
        {
            _owner = owner;
            Assert.That(componentType.DerivesFromOrEqual <Component>());

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

            Init();
        }
        public PrefabResourceSingletonProvider(
            PrefabResourceSingletonId resourceId, Type componentType,
            PrefabResourceSingletonLazyCreator lazyCreator,
            SingletonRegistry singletonRegistry,
            PrefabResourceSingletonProviderCreator owner)
        {
            _owner = owner;
            Assert.That(componentType.DerivesFromOrEqual<Component>());

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

            Init();
        }