public IBindingScopeOnResolve AsTransient() { Resolution = BindingResolution.AsTransient; var currentBinding = _container.CurrentBinding; _container.ThrowIfHasNoPendingBinding(); _container.CurrentBinding = null; _container.Bind(BindingHelper.CreateIFactoryType(ServiceType)).ToConstant(BindingHelper.CreateFactoryObject(ImplementationType, _container)).AsCached().OnRequest(); _container.ThrowIfHasPendingBinding(); _container.CurrentBinding = currentBinding; return(this); }
public IBindingScope AsCached() { Resolution = BindingResolution.AsCached; return(this); }