open Autofac
let _containerBuilder = new ContainerBuilder()
_containerBuilder.RegisterGeneric(typedefof<CommandObserver<_>>)
.As(typedefof<ICommandObserver<_>>);
_containerBuilder.RegisterGeneric(typedefof<PropertyProvider<_>>)
.As(typedefof<IPropertyProvider<_>>);
source
to share