Using Unity in Windows Azure made simple. Ever considered moving to Windows Azure, but didn't know how to inject setting from your Service Configuration file? Just reference this project and you will be able to inject Azure Storage Account Connection
Strings & Local Storage Paths
Just download the NuGet packed version at:
Or from NuGet power shell:
Inspired by Neovolve Toolkit (http://neovolve.codeplex.com/
), which includes a Unity extension to support appSettings/ConnectionStrings values in DI.
This project is created to simplify cloud adoption amongst Unity users. Now you can easily add Azure configuration setting values as dependencies. You can also find this project on NuGet, so your fresh new AzureSettingsInjecotr is two clicks away.
Currently supported configuration types are:
- LocalStorage - will inject the root path for the referenced local storage element
- ConfigSetting - will inject the string value from the corresponding Setting element
- ConnectionString - will inject the connection string ( Azure Storage connection string) from the corresponding Setting element
Corresponding to the related
Azure Service Definition
Adding package reference via NuGet will automatically add Unity dependencies and modify your app.config / web.config with appropriate registration of the Extension.
Here is simple app.config file using both LocalStorage and ConfigSetting injection:
<sectionExtension type="Unity.AzureSetting.Injector.SectionExtensionInitiator, UASI"/>
<register type="IStorageHelper" mapTo="StorageHelper">
<lifetime type="singleton" />
<azureSetting key="LocalStore" type="LocalStorage" />