// Note that this isn't necessary to call since it's the default public ConditionCopyNonLazyBinder FromNew() { BindingUtil.AssertIsNotComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); return(this); }
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 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 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)); }
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)); }