我对Unity或StructureMap不是很熟悉。您如何将以下StructureMap注册示例转换为Unity注册语法?
public class ConfigurationRegistry : Registry
{
public ConfigurationRegistry()
{
ForRequestedType<ConfigurationStore>()
.CacheBy(InstanceScope.Singleton)
.TheDefault.Is.OfConcreteType<ConfigurationStore>()
.CtorDependency<IEnumerable<IObjectMapper>>().Is(expr => expr.ConstructedBy(MapperRegistry.AllMappers));
ForRequestedType<IConfigurationProvider>()
.TheDefault.Is.ConstructedBy(ctx => ctx.GetInstance<ConfigurationStore>());
ForRequestedType<IConfiguration>()
.TheDefault.Is.ConstructedBy(ctx => ctx.GetInstance<ConfigurationStore>());
ForRequestedType<IMappingEngine>().TheDefaultIsConcreteType<MappingEngine>();
ForRequestedType<ITypeMapFactory>().TheDefaultIsConcreteType<TypeMapFactory>();
}
}