OWIN.Windsor.DependencyResolverScopeMiddleware
Creates a Windsor dependency scope per OWIN WebAPI request allowing to use a per request lifestyle component registration in a self-host environment.
Install / Use
/learn @BredStik/OWIN.Windsor.DependencyResolverScopeMiddlewareREADME
OWIN.Windsor.DependencyResolverScopeMiddleware
Creates a Windsor dependency scope per OWIN WebAPI request allowing to use a per request lifestyle component registration in a self-host environment.
Usage
- Add the "OWIN.Windsor.DependencyResolverScopeMiddleware" nuget package to your OWIN self-hosted WebAPI project.
- In your Startup.cs file, add "using OWIN.Windsor.DependencyResolverScopeMiddleware;" and configure your Windsor container.
- Configure any "per request" component using the "LifestyleScoped" lifestyle.
- Use the following line to configure you app by passing in the HttpConfiguration and the container (where app: IAppBuilder): app.UseWindsorDependencyResolverScope(config, container).UseWebApi(config);
Your scoped components will by created once per request and disposed at the end of it automatically.
If you ever need to use the dependency resolver inside a subsequent middleware, just use the "GetDependencyResolver" extension method on the IOwinContext from the "OWIN.Windsor.DependencyResolverScopeMiddleware" namespace.
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
Languages
Security Score
Audited on Jul 30, 2024
