public ConditionCopyNonLazyBinder FromNewComponentOn(GameObject gameObject) { BindingUtil.AssertIsValidGameObject(gameObject); BindingUtil.AssertIsComponent(ContractType); BindingUtil.AssertIsNotAbstract(ContractType); ProviderFunc = (container) => new AddToExistingGameObjectComponentProvider( gameObject, container, ContractType, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback); return(this); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromNewComponentOn(GameObject gameObject) { BindingUtil.AssertIsValidGameObject(gameObject); BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (container, type) => new AddToExistingGameObjectComponentProvider( gameObject, container, type, BindInfo.Arguments, BindInfo.ConcreteIdentifier, BindInfo.InstantiatedCallback)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromComponentOn(GameObject gameObject) { BindingUtil.AssertIsValidGameObject(gameObject); BindingUtil.AssertIsComponent(ConcreteTypes); BindingUtil.AssertTypesAreNotAbstract(ConcreteTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (container, type) => new GetFromGameObjectComponentProvider( type, gameObject, true)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }