24 lines
917 B
C#
24 lines
917 B
C#
// Copyright (c) .NET Foundation. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using Microsoft.AspNetCore.Blazor.Razor;
|
|
using Microsoft.AspNetCore.Razor.Language;
|
|
using Microsoft.CodeAnalysis.Razor;
|
|
|
|
namespace Microsoft.VisualStudio.LanguageServices.Blazor
|
|
{
|
|
[ExportCustomProjectEngineFactory("Blazor-0.1", SupportsSerialization = false)]
|
|
internal class BlazorProjectEngineFactory : IProjectEngineFactory
|
|
{
|
|
public RazorProjectEngine Create(RazorConfiguration configuration, RazorProjectFileSystem fileSystem, Action<RazorProjectEngineBuilder> configure)
|
|
{
|
|
return RazorProjectEngine.Create(configuration, fileSystem, b =>
|
|
{
|
|
configure?.Invoke(b);
|
|
new BlazorExtensionInitializer().Initialize(b);
|
|
});
|
|
}
|
|
}
|
|
}
|