internal ViewModelCompositionOptions(IServiceCollection services, IConfiguration configuration = null) { _configuration = configuration; Services = services; AssemblyScanner = new AssemblyScanner(); Services.AddSingleton(this); Services.AddSingleton(_compositionMetadataRegistry); ResponseSerialization = new ResponseSerializationOptions(Services); }
internal ViewModelCompositionOptions(IServiceCollection services) { Services = services; AssemblyScanner = new AssemblyScanner(); Services.AddSingleton(this); Services.AddSingleton(_compositionMetadataRegistry); #if NETCOREAPP3_1 || NET5_0 ResponseSerialization = new ResponseSerializationOptions(Services); #endif }