public ConditionCopyNonLazyBinder FromComponentOn(Func <InjectContext, UnityEngine.GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new GetFromGameObjectGetterComponentProvider( ContractType, gameObjectGetter, true); return(this); }
public ConditionCopyNonLazyBinder FromComponentOn(UnityEngine.GameObject gameObject) { BindingUtil.AssertIsValidGameObject(gameObject); BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new GetFromGameObjectComponentProvider( ContractType, gameObject, 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 FromNewComponentOn( Func <InjectContext, UnityEngine.GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new AddToExistingGameObjectComponentProviderGetter( gameObjectGetter, container, ContractType, new List <TypeValuePair>(), BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback); return(this); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOn(Func <InjectContext, UnityEngine.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, UnityEngine.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 NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOnNewGameObject() { BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); var gameObjectInfo = new GameObjectCreationParameters(); ProviderFunc = (container) => new AddToNewGameObjectComponentProvider( container, ContractType, new List <TypeValuePair>(), gameObjectInfo, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback); return(new NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }
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)); }
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 List <TypeValuePair>(), new PrefabProvider(prefab), BindInfo.InstantiatedCallback)); return(new NameTransformScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }