public ConditionCopyNonLazyBinder FromScriptableObjectResource(string resourcePath) { BindingUtil.AssertIsValidResourcePath(resourcePath); BindingUtil.AssertIsInterfaceOrScriptableObject(ContractType); ProviderFunc = (container) => new ScriptableObjectResourceProvider( resourcePath, ContractType, container, null, new List <TypeValuePair>(), false); return(this); }
ScopeArgConditionCopyNonLazyBinder FromScriptableObjectResourceInternal( string resourcePath, bool createNew) { BindingUtil.AssertIsValidResourcePath(resourcePath); BindingUtil.AssertIsInterfaceOrScriptableObject(AllParentTypes); BindInfo.RequireExplicitScope = true; SubFinalizer = new ScopableBindingFinalizer( BindInfo, createNew ? SingletonTypes.FromNewScriptableObjectResource : SingletonTypes.FromScriptableObjectResource, resourcePath.ToLower(), (container, type) => new ScriptableObjectResourceProvider( resourcePath, type, container, BindInfo.ConcreteIdentifier, BindInfo.Arguments, createNew)); return(new ScopeArgConditionCopyNonLazyBinder(BindInfo)); }