using Autofac;
using Autofac.Features.Metadata;
using Chernobyl.App.Layout;
using Chernobyl.Config;
using Chernobyl.Creation;
namespace Chernobyl.App.Creation
{
///
/// Injects creation services.
///
public class Module : Autofac.Module
{
///
protected override void Load(ContainerBuilder builder)
{
// Create a view model for every content factory so that we can use the factory from the UI.
builder.RegisterAdapter, FactoryMetadata>, FactoryViewModel>(
cmd => new FactoryViewModel(cmd.Value, cmd.Metadata.CreationName))
.Named