Why does ServiceStack's AppHostBase.Configure take a Container parameter? -
apphostbase
contains container
property (which resolves endpointhost.config.servicemanager.container
if defined), why not use instance.container
(e.g., registering dependencies, plugins, etc.) inside configure
or elsewhere inside apphost
implementations?
i note configure
public call, technically called anywhere, although appears apphostbase.init()
place in servicestack codebase so.
all configuration , registration should happen within context of apphost.configure(container)
method, after point should remain immutable (readonly) threadsafety.
the container passed in because that's application dependencies should registered on. container property should therefore treated read only why core classes iapphost
exposes iresolver.tryresolve method.
Comments
Post a Comment