Can I confirm what happens when you use a dependency that is registered for ReuseScope.Request
, but it is resolved in the AppHost.Configure()
method during configuration?
For example:
public override void Configure(Container container)
{
base.Configure(container);
container.Register<MyClass, IMyClass>.ReuseWithin(ReuseScope.Request);
...
var a = container.Resolve<IMyClass>();
a.DoSomething();
}
Is it right to assume that if it is resolved outside an IRequest
then instancing falls back to ReuseScope.None
? i.e. transient i.e. a new instance every call to Resolve<T>()
?