asp.net - dependency injection using unity on custom session store provider -
i made custom sessionstatestore provider, dependencies not resolving. used unity di.
i googled lot problem , got useful hints, still can't right.
- the providers constructed , managed framework, , there no opportunity intercept construction provide additional dependency injection
- override initialize() method in custom provider, , dependency injection there
there's similar problem , decent solution here , here(structuremap, not unity), can't right.
please help. thanks.
providers painful things. there's no nice way address problem, practical way handle provider composition root - in other words, if entry point of application. within provider can compose of services.
if use di container (like unity) can store container instance in httpcontext , there compose object graph within provider.
Comments
Post a Comment