I wold like the unity framework to resolve a static class "MyStaticObject" specified in my config file. As my class is static, I am getting an error "The type StaticObject does not have an accessible constructor."
My config file looks as below:
<unity>
<typeAliases>
<typeAlias alias="singleton" type="Microsoft.Practices.Unity.ContainerControlledLifetimeManager, Microsoft.Practices.Unity" />
<typeAlias alias="StaticObject" type="MyStaticAssembly.MyStaticObject, MyStaticAssembly, Version=1.0.0.0" />
<typeAlias alias="staticobject" type="MyStaticAssembly.MyStaticObject, MyStaticAssembly" />
</typeAliases>
<containers>
<container>
<types>
<type type="StaticObject" mapTo="staticobject" name="My Static Object">
<lifetime type="singleton"/>
</type>
</types>
</container>
</containers>
</unity>
I would highly appreciate any help.