parent
f2af02b1cb
commit
8623946784
|
|
@ -11,6 +11,7 @@ using Microsoft.AspNet.Mvc.Razor.Directives;
|
||||||
using Microsoft.AspNet.Mvc.Razor.Internal;
|
using Microsoft.AspNet.Mvc.Razor.Internal;
|
||||||
using Microsoft.AspNet.Mvc.Rendering;
|
using Microsoft.AspNet.Mvc.Rendering;
|
||||||
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
|
using Microsoft.AspNet.Razor.Runtime.TagHelpers;
|
||||||
|
using Microsoft.Dnx.Compilation;
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
using Microsoft.Extensions.OptionsModel;
|
using Microsoft.Extensions.OptionsModel;
|
||||||
|
|
@ -117,6 +118,12 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||||
// Internal for testing.
|
// Internal for testing.
|
||||||
internal static void AddRazorViewEngineServices(IServiceCollection services)
|
internal static void AddRazorViewEngineServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
|
if (CompilationServices.Default != null)
|
||||||
|
{
|
||||||
|
services.TryAdd(ServiceDescriptor.Instance(CompilationServices.Default.LibraryExporter));
|
||||||
|
services.TryAdd(ServiceDescriptor.Instance(CompilationServices.Default.CompilerOptionsProvider));
|
||||||
|
}
|
||||||
|
|
||||||
services.TryAddEnumerable(
|
services.TryAddEnumerable(
|
||||||
ServiceDescriptor.Transient<IConfigureOptions<MvcViewOptions>, MvcRazorMvcViewOptionsSetup>());
|
ServiceDescriptor.Transient<IConfigureOptions<MvcViewOptions>, MvcRazorMvcViewOptionsSetup>());
|
||||||
services.TryAddEnumerable(
|
services.TryAddEnumerable(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue