Handling of Idisposable
Options
We use rabbitmq alot and would like to wrap it with reactive extensions in linqpad, but then we end up having to take care of disposing the connection, is there a hook somewhere or some way I can make sure that when i stop or start my query that it will cleanup? Something like:
Util.RegisterDisposable(disposable)
And then combine it with Util.KeepRunning.
I've read somewhere that linqpad keep the datacontext until restart of the query, and im fine with that behavior
Util.RegisterDisposable(disposable)
And then combine it with Util.KeepRunning.
I've read somewhere that linqpad keep the datacontext until restart of the query, and im fine with that behavior
Comments
-
The Util class exposes a Cleanup event that fires just before the query re-starts or closes:
Util.Cleanup += (sender, args) => foo.Dispose();
Does this help?