gmanny/Pechkin — pull request #42 by tuespetre (2013-08-01 22:26:12+00:00)
Title: Solution for issue 12

CHANGES:

No instantiating Pechkins. Consumers will invoke Factory.Create(GlobalConfig config) to obtain an IPechkin interface. (Behind the scenes, the object consumers receive is a remoting proxy that remotes to a private AppDomain, discussed below.)

No more SynchronizedPechkin projects, synchronization is default now. Factory manages delegating calls to wkhtmltopdf to a synchronized thread. If desired, synchronization may be disabled by setting Factory.UseSynchronization = false.

Factory manages loading wkhtmltopdf in a private AppDomain and freeing wkhtmltopdf after unloading the AppDomain. When setting up the private AppDomain, it will attach (if applicable) to an IIS AppDomain's DomainUnload event to ensure that on redeploy, the wkhtmltopdf library is freed so the new IIS AppDomain will be able to load it again. Consumers may also set Factory.UseDynamicLoading = true to cause the Factory to unload its private AppDomain whenever it detects that all of its produced proxies have been disposed.