// This is the default if nothing else is called public ScopeArgConditionCopyNonLazyBinder FromNew() { BindingUtil.AssertTypesAreNotComponents(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); return(this); }
public ArgConditionCopyNonLazyBinder FromNewComponentSibling() { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new SingleProviderBindingFinalizer( BindInfo, (container, type) => new AddToCurrentGameObjectComponentProvider( container, type, BindInfo.ConcreteIdentifier, BindInfo.Arguments)); return(new ArgConditionCopyNonLazyBinder(BindInfo)); }
public ScopeArgConditionCopyNonLazyBinder FromNewComponentOn(Func <InjectContext, GameObject> gameObjectGetter) { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, SingletonTypes.FromComponentGameObject, gameObjectGetter, (container, type) => new AddToExistingGameObjectComponentProviderGetter( gameObjectGetter, container, type, BindInfo.ConcreteIdentifier, BindInfo.Arguments)); return(new ScopeArgConditionCopyNonLazyBinder(BindInfo)); }
internal NameTransformScopeArgConditionCopyNonLazyBinder FromNewComponentOnNewPrefab( UnityEngine.Object prefab, GameObjectCreationParameters gameObjectInfo) { BindingUtil.AssertIsValidPrefab(prefab); BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new PrefabBindingFinalizer( BindInfo, gameObjectInfo, prefab, (contractType, instantiator) => new InstantiateOnPrefabComponentProvider(contractType, instantiator)); return(new NameTransformScopeArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }
internal NameTransformScopeArgConditionCopyNonLazyBinder FromNewComponentOnNewGameObject( GameObjectCreationParameters gameObjectInfo) { BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, SingletonTypes.FromGameObject, gameObjectInfo, (container, type) => new AddToNewGameObjectComponentProvider( container, type, BindInfo.ConcreteIdentifier, BindInfo.Arguments, gameObjectInfo)); return(new NameTransformScopeArgConditionCopyNonLazyBinder(BindInfo, gameObjectInfo)); }