Вопрос
How would I convert the existing C# code
_containerBuilder = new ContainerBuilder();
_containerBuilder.RegisterGeneric(typeof(CommandObserver<>)).As(typeof(ICommandObserver<>));
_containerBuilder.RegisterGeneric(typeof(PropertyProvider<>)).As(typeof(IPropertyProvider<>));
into F#?
Решение
open Autofac
let _containerBuilder = new ContainerBuilder()
_containerBuilder.RegisterGeneric(typedefof<CommandObserver<_>>)
.As(typedefof<ICommandObserver<_>>);
_containerBuilder.RegisterGeneric(typedefof<PropertyProvider<_>>)
.As(typedefof<IPropertyProvider<_>>);
Не связан с StackOverflow