public ConditionCopyNonLazyBinder FromResource(string resourcePath) { BindingUtil.AssertDerivesFromUnityObject(ContractType); ProviderFunc = (container) => new ResourceProvider(resourcePath, ContractType, true); return(this); }
public ConditionBinder FromResource(string resourcePath) { BindingUtil.AssertDerivesFromUnityObject(ContractType); SubFinalizer = CreateFinalizer( (container) => new ResourceProvider(resourcePath, ContractType)); return(this); }
public ScopeConcreteIdArgConditionCopyNonLazyBinder FromResources(string resourcePath) { BindingUtil.AssertDerivesFromUnityObject(ConcreteTypes); BindInfo.RequireExplicitScope = false; SubFinalizer = new ScopableBindingFinalizer( BindInfo, (_, type) => new ResourceProvider(resourcePath, type, false)); return(new ScopeConcreteIdArgConditionCopyNonLazyBinder(BindInfo)); }
public ScopeBinder FromResource(string resourcePath) { BindingUtil.AssertDerivesFromUnityObject(ConcreteTypes); SubFinalizer = new ScopableBindingFinalizer( BindInfo, SingletonTypes.ToResource, resourcePath.ToLower(), (_, type) => new ResourceProvider(resourcePath, type)); return(new ScopeBinder(BindInfo)); }