https://github.com/rebus-org/owino
:x: DEPRECATED :cocktail: OWIN extensions
https://github.com/rebus-org/owino
owin
Last synced: 6 months ago
JSON representation
:x: DEPRECATED :cocktail: OWIN extensions
- Host: GitHub
- URL: https://github.com/rebus-org/owino
- Owner: rebus-org
- License: other
- Created: 2016-05-17T19:40:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-02T20:44:15.000Z (almost 8 years ago)
- Last Synced: 2025-04-11T05:23:22.683Z (6 months ago)
- Topics: owin
- Language: C#
- Homepage:
- Size: 6.11 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Owino
Useful things for OWIN.
### 1. Proper disposal of things when the web application shuts down
OWIN does not have any intuitive ways of disposing things when the application shuts down.
It IS possible however, by attaching oneself to the `CancellationToken` residing under the
`host.OnAppDisposing` key in the app's properties.Here's how you do it with Owino e.g. if you are using Castle Windsor for something:
public class Startup
{
public void Configuration(IAppBuilder app)
{
var container = new WindsorContainer().Install(FromAssembly.This());// register some middlewarez, and then:
app.RegisterForDisposal(container)
// oh, good... ALWAYS dispose your IoC container after use!
}
}(in case you didn't notice: `RegisterForDisposal` is an extension method on
`IAppBuilder`)