I'm working in Windows Azure and have created a worker role. The application works fine; many places in the application I'm referencing Azure specific classes, such as CloudBlobContainer to save files to Azure storage. I would like to run this application in a windows service or other hosting environment with no dependencies on Azure. The classes I have created have dependencies on Azure resources, when I change the application to run in non-Azure environment, I do not want to change a lot of code.
I have use Enterprise Library Unity and Ninject as an IoC container with ASP.NET MVC and they both worked great. But I'm having problems figuring out how to use Unity with an Azure Worker Role.
I've searched the web high and low, but have not been able to find many resources to help me with my issue. Does anyone know where I can get more information on using Unity with an Azure Worker Role?
Below are a few articles I've found, but still do not provide me enough information to go forward:
Abstracting Away Azure: How to Run Outside of the Cloud
IOC for RoleEntryPoint
We used Unity in the Workers of our sample. Take a look here: http://msdn.microsoft.com/en-us/library/ff966499.aspx
in fact these samples abstract common patterns found with workers such as:
etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With