public ConditionCopyNonLazyBinder FromComponentOn(Func <InjectContext, GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new GetFromGameObjectGetterComponentProvider( ContractType, gameObjectGetter, true); return(this); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentSibling() { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new SingleProviderBindingFinalizer( BindInfo, (container, type) => new AddToCurrentGameObjectComponentProvider( container, type, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }
public ConditionCopyNonLazyBinder FromComponentOn(GameObject gameObject) { BindingUtil.AssertIsValidGameObject(gameObject); BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new GetFromGameObjectComponentProvider( ContractType, gameObject, true); return(this); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOn(Func <InjectContext, GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (container, type) => new AddToExistingGameObjectComponentProviderGetter( gameObjectGetter, container, type, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentOn(Func <InjectContext, GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = false; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (container, type) => new GetFromGameObjectGetterComponentProvider( type, gameObjectGetter, true)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }
public ConditionCopyNonLazyBinder FromNewComponentOn( Func <InjectContext, GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new AddToExistingGameObjectComponentProviderGetter( gameObjectGetter, container, ContractType, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback); return(this); }
internal NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOnNewPrefabResource( string resourcePath, GameObjectCreationParameters gameObjectInfo) { BindingUtil.AssertIsValidResourcePath(resourcePath); BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new PrefabResourceBindingFinalizer( BindInfo, gameObjectInfo, resourcePath, (contractType, instantiator) => new InstantiateOnPrefabComponentProvider(contractType, instantiator)); return(new NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentsOn(GameObject gameObject) { BindingUtil.AssertIsValidGameObject(gameObject); BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (container, type) => new GetFromGameObjectComponentProvider( type, gameObject, false)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }
public NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOnNewGameObject() { BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); var gameObjectInfo = new GameObjectCreationParameters(); ProviderFunc = (container) => new AddToNewGameObjectComponentProvider( container, ContractType, BindInfo.Arguments, gameObjectInfo, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback); return(new NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }
internal NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOnNewGameObject( GameObjectCreationParameters gameObjectInfo) { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (container, type) => new AddToNewGameObjectComponentProvider( container, type, BindInfo.Arguments, gameObjectInfo, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback)); return(new NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }
public NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOnNewPrefab(UnityEngine.Object prefab) { BindingUtil.AssertIsValidPrefab(prefab); BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); var gameObjectInfo = new GameObjectCreationParameters(); ProviderFunc = (container) => new InstantiateOnPrefabComponentProvider( ContractType, new PrefabInstantiator( container, gameObjectInfo, ContractType, new [] { ContractType }, BindInfo.Arguments, new PrefabProvider(prefab), BindInfo.InstantiatedCallback)); return(new NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }