aspnetcore/AspNetCoreSdkTests/Templates/RazorApplicationBaseTemplat...

31 lines
1.3 KiB
C#

using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace AspNetCoreSdkTests.Templates
{
public abstract class RazorApplicationBaseTemplate : RazorBaseTemplate
{
protected abstract string RazorPath { get; }
public override string OutputPath { get; } = Path.Combine("Debug", "netcoreapp2.1");
public override TemplateType Type => TemplateType.Application;
public override IEnumerable<string> ExpectedObjFilesAfterBuild => Enumerable.Concat(base.ExpectedObjFilesAfterBuild, new[]
{
Path.Combine("Razor", RazorPath, "_ViewImports.g.cshtml.cs"),
Path.Combine("Razor", RazorPath, "_ViewStart.g.cshtml.cs"),
Path.Combine("Razor", RazorPath, "Shared", "_CookieConsentPartial.g.cshtml.cs"),
Path.Combine("Razor", RazorPath, "Shared", "_Layout.g.cshtml.cs"),
Path.Combine("Razor", RazorPath, "Shared", "_ValidationScriptsPartial.g.cshtml.cs"),
}.Select(p => Path.Combine(OutputPath, p)));
public override IEnumerable<string> ExpectedBinFilesAfterBuild => Enumerable.Concat(base.ExpectedBinFilesAfterBuild, new[]
{
$"{Name}.runtimeconfig.dev.json",
$"{Name}.runtimeconfig.json",
}.Select(p => Path.Combine(OutputPath, p)));
}
}