Autofac and ServiceStack - Managing Life Cycle [3]

In the [previous part](../autofac-and-servicestack-managing-life.html) I suggested storing current scope in a static property. This seems to break under higher load because the scope is shared across too many instances of the same service and after the first request it gets disposed, leaving all other requests with dependencies from the disposed scope in unknown state, i.e. closed database session. After some more digging I found a way that really works. [Read More]

ReactiveUI - Documentation

If you have not noticed yet, the ReactiveUI team has made quite significant progress writing some documentation. It can be found here.

The nice thing about this is that they also described some concepts, like the usage of Rx framework itself and the whole idea of FRP, with some links to videos and papers.

Autofac and ServiceStack - Managing Life Cycle [2]

Warning: this is not working properly, check the latest version for better solution. Whilst the approach I used in the previous post is working fine for ASP.NET based ServiceStack solutions, it does not fit for the self-hosted approach since the request handling is done differently there. To solve this issue, I tried to find ServiceStack native request/response hooks and the first thing I tried was a custom service runner with overrides for OnBeforeExecute and OnAfterExecute as described here. [Read More]

NHibernate: Execute stored procedure with return value

Most of our stored procedures return an error code using RETURN 0 statement. I was unable to find how to get this value, when executing such procedures using NHibernate session. I found this issue discussed on SO back in 2009 and nothing ever since. It might be that I my search skills are too weak :) The solution that you can find in that SO question, worked. I made some changes in it to make it more usable. [Read More]

Learn ReactiveUI

When I first looked at ReactiveUI (RxUI), I found that there is not much documentation out there about this awesome framework. Apart form the blogpost-style ebook, made by Paul Betts back in 2011 and the actual paper book from APress (this one), there were nearly no other comprehensive sources of information. And the release cycle of RxUI was so dynamic that these 2011 books looked badly outdated, compared with current development of the framework. [Read More]

Autofac and ReactiveUI 6

Today, I updated my previous helper class that replaced the standard RxUI service locator with Autofac container. ReactiveUI 6 introduced some breaking changes and I had to update the code to make it work. Basically, RxApp has no method to register a custom resolver. Instead, it always uses the ModernDependencyResolver locator from Splat. However, this locator can work with any other type of resolver that implements IMutableDependencyResolver interface. There is one new member in this interface, ServiceRegistrationCallback, which is used nowhere in RxUI6 so I didn't bother implementing it. [Read More]

Autofac and ReactiveUI

Update I published a new post about using Autofac with ReactiveUI 6. ReactiveUI uses an internal dependency resolver. Most of the cases are covered by it and it also can be used to resolve references other that ReactiveUI internal interfaces. However, if you want to use another container to inject constructor parameters or properties, you have to have your view models and views to be registered and resolved by a container. [Read More]