parent
3d0f436a06
commit
9acd0f578c
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// 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.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.AspNetCore.Razor.CodeGenerators;
|
using Microsoft.AspNetCore.Razor.CodeGenerators;
|
||||||
|
|
||||||
|
|
@ -10,7 +9,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies the contracts for a Razor host that parses Razor files and generates C# code.
|
/// Specifies the contracts for a Razor host that parses Razor files and generates C# code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMvcRazorHost : IDisposable
|
public interface IMvcRazorHost
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses and generates the contents of a Razor file represented by <paramref name="inputStream"/>.
|
/// Parses and generates the contents of a Razor file represented by <paramref name="inputStream"/>.
|
||||||
|
|
|
||||||
|
|
@ -295,7 +295,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
}
|
}
|
||||||
|
|
||||||
var inheritedChunkTrees = GetInheritedChunkTrees(sourceFileName);
|
var inheritedChunkTrees = GetInheritedChunkTrees(sourceFileName);
|
||||||
|
|
||||||
return new MvcRazorParser(razorParser, inheritedChunkTrees, DefaultInheritedChunks, ModelExpressionType);
|
return new MvcRazorParser(razorParser, inheritedChunkTrees, DefaultInheritedChunks, ModelExpressionType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -345,11 +344,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
_chunkTreeCache.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
private IReadOnlyList<ChunkTree> GetInheritedChunkTrees(string sourceFileName)
|
private IReadOnlyList<ChunkTree> GetInheritedChunkTrees(string sourceFileName)
|
||||||
{
|
{
|
||||||
var inheritedChunkTrees = GetInheritedChunkTreeResults(sourceFileName)
|
var inheritedChunkTrees = GetInheritedChunkTreeResults(sourceFileName)
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Directives
|
||||||
new UsingChunk { Namespace = "AppNamespace.Model" },
|
new UsingChunk { Namespace = "AppNamespace.Model" },
|
||||||
};
|
};
|
||||||
var cache = new DefaultChunkTreeCache(fileProvider);
|
var cache = new DefaultChunkTreeCache(fileProvider);
|
||||||
using (var host = new MvcRazorHost(cache, new TagHelperDescriptorResolver(designTime: false)))
|
var host = new MvcRazorHost(cache, new TagHelperDescriptorResolver(designTime: false));
|
||||||
{
|
|
||||||
var utility = new ChunkInheritanceUtility(host, cache, defaultChunks);
|
var utility = new ChunkInheritanceUtility(host, cache, defaultChunks);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
|
|
@ -109,7 +108,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Directives
|
||||||
Assert.Equal(viewImportsPath, chunkTreeResult.FilePath);
|
Assert.Equal(viewImportsPath, chunkTreeResult.FilePath);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void GetInheritedChunks_ReturnsEmptySequenceIfNoGlobalsArePresent()
|
public void GetInheritedChunks_ReturnsEmptySequenceIfNoGlobalsArePresent()
|
||||||
|
|
@ -120,8 +118,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Directives
|
||||||
fileProvider.AddFile(@"/Views/_Layout.cshtml", string.Empty);
|
fileProvider.AddFile(@"/Views/_Layout.cshtml", string.Empty);
|
||||||
fileProvider.AddFile(@"/Views/home/_not-viewimports.cshtml", string.Empty);
|
fileProvider.AddFile(@"/Views/home/_not-viewimports.cshtml", string.Empty);
|
||||||
var cache = new DefaultChunkTreeCache(fileProvider);
|
var cache = new DefaultChunkTreeCache(fileProvider);
|
||||||
using (var host = new MvcRazorHost(cache, new TagHelperDescriptorResolver(designTime: false)))
|
var host = new MvcRazorHost(cache, new TagHelperDescriptorResolver(designTime: false));
|
||||||
{
|
|
||||||
var defaultChunks = new Chunk[]
|
var defaultChunks = new Chunk[]
|
||||||
{
|
{
|
||||||
new InjectChunk("MyTestHtmlHelper", "Html"),
|
new InjectChunk("MyTestHtmlHelper", "Html"),
|
||||||
|
|
@ -135,7 +132,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Directives
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Empty(chunkTrees);
|
Assert.Empty(chunkTrees);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void MergeInheritedChunks_MergesDefaultInheritedChunks()
|
public void MergeInheritedChunks_MergesDefaultInheritedChunks()
|
||||||
|
|
@ -145,8 +141,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Directives
|
||||||
fileProvider.AddFile(@"/Views/_ViewImports.cshtml",
|
fileProvider.AddFile(@"/Views/_ViewImports.cshtml",
|
||||||
"@inject DifferentHelper<TModel> Html");
|
"@inject DifferentHelper<TModel> Html");
|
||||||
var cache = new DefaultChunkTreeCache(fileProvider);
|
var cache = new DefaultChunkTreeCache(fileProvider);
|
||||||
using (var host = new MvcRazorHost(cache, new TagHelperDescriptorResolver(designTime: false)))
|
var host = new MvcRazorHost(cache, new TagHelperDescriptorResolver(designTime: false));
|
||||||
{
|
|
||||||
var defaultChunks = new Chunk[]
|
var defaultChunks = new Chunk[]
|
||||||
{
|
{
|
||||||
new InjectChunk("MyTestHtmlHelper", "Html"),
|
new InjectChunk("MyTestHtmlHelper", "Html"),
|
||||||
|
|
@ -185,4 +180,3 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Directives
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -56,10 +56,10 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
var rootedAppPath = $"{rootPrefix}SomeComputer/Location/Project/";
|
var rootedAppPath = $"{rootPrefix}SomeComputer/Location/Project/";
|
||||||
var rootedFilePath = $"{rootPrefix}SomeComputer/Location/Project/src/file.cshtml";
|
var rootedFilePath = $"{rootPrefix}SomeComputer/Location/Project/src/file.cshtml";
|
||||||
var chunkTreeCache = new DefaultChunkTreeCache(new TestFileProvider());
|
var chunkTreeCache = new DefaultChunkTreeCache(new TestFileProvider());
|
||||||
using (var host = new MvcRazorHost(
|
var host = new MvcRazorHost(
|
||||||
chunkTreeCache,
|
chunkTreeCache,
|
||||||
pathNormalizer: new DesignTimeRazorPathNormalizer(rootedAppPath)))
|
pathNormalizer: new DesignTimeRazorPathNormalizer(rootedAppPath));
|
||||||
{
|
|
||||||
var parser = new RazorParser(
|
var parser = new RazorParser(
|
||||||
host.CodeLanguage.CreateCodeParser(),
|
host.CodeLanguage.CreateCodeParser(),
|
||||||
host.CreateMarkupParser(),
|
host.CreateMarkupParser(),
|
||||||
|
|
@ -73,7 +73,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal("src/file.cshtml", chunkInheritanceUtility.InheritedChunkTreePagePath, StringComparer.Ordinal);
|
Assert.Equal("src/file.cshtml", chunkInheritanceUtility.InheritedChunkTreePagePath, StringComparer.Ordinal);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[MemberData(nameof(NormalizeChunkInheritanceUtilityPaths_Data))]
|
[MemberData(nameof(NormalizeChunkInheritanceUtilityPaths_Data))]
|
||||||
|
|
@ -84,10 +83,10 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
var rootedAppPath = $"{rootPrefix}SomeComputer/Location/Project/";
|
var rootedAppPath = $"{rootPrefix}SomeComputer/Location/Project/";
|
||||||
var rootedFilePath = $"{rootPrefix}SomeComputer/Location/Project/src/file.cshtml";
|
var rootedFilePath = $"{rootPrefix}SomeComputer/Location/Project/src/file.cshtml";
|
||||||
var chunkTreeCache = new DefaultChunkTreeCache(new TestFileProvider());
|
var chunkTreeCache = new DefaultChunkTreeCache(new TestFileProvider());
|
||||||
using (var host = new MvcRazorHost(
|
var host = new MvcRazorHost(
|
||||||
chunkTreeCache,
|
chunkTreeCache,
|
||||||
pathNormalizer: new DesignTimeRazorPathNormalizer(rootedAppPath)))
|
pathNormalizer: new DesignTimeRazorPathNormalizer(rootedAppPath));
|
||||||
{
|
|
||||||
var chunkInheritanceUtility = new PathValidatingChunkInheritanceUtility(host, chunkTreeCache);
|
var chunkInheritanceUtility = new PathValidatingChunkInheritanceUtility(host, chunkTreeCache);
|
||||||
var codeGeneratorContext = new CodeGeneratorContext(
|
var codeGeneratorContext = new CodeGeneratorContext(
|
||||||
new ChunkGeneratorContext(
|
new ChunkGeneratorContext(
|
||||||
|
|
@ -106,33 +105,33 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal("src/file.cshtml", chunkInheritanceUtility.InheritedChunkTreePagePath, StringComparer.Ordinal);
|
Assert.Equal("src/file.cshtml", chunkInheritanceUtility.InheritedChunkTreePagePath, StringComparer.Ordinal);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void MvcRazorHost_EnablesInstrumentationByDefault()
|
public void MvcRazorHost_EnablesInstrumentationByDefault()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHost(new DefaultChunkTreeCache(fileProvider), new TagHelperDescriptorResolver(designTime: false)))
|
var host = new MvcRazorHost(
|
||||||
{
|
new DefaultChunkTreeCache(fileProvider),
|
||||||
|
new TagHelperDescriptorResolver(designTime: false));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var instrumented = host.EnableInstrumentation;
|
var instrumented = host.EnableInstrumentation;
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.True(instrumented);
|
Assert.True(instrumented);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void MvcRazorHost_GeneratesTagHelperModelExpressionCode_DesignTime()
|
public void MvcRazorHost_GeneratesTagHelperModelExpressionCode_DesignTime()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
BuildLineMapping(
|
BuildLineMapping(
|
||||||
|
|
@ -175,7 +174,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
testName: "ModelExpressionTagHelper",
|
testName: "ModelExpressionTagHelper",
|
||||||
expectedLineMappings: expectedLineMappings);
|
expectedLineMappings: expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("Basic")]
|
[InlineData("Basic")]
|
||||||
|
|
@ -189,23 +187,22 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new TestMvcRazorHost(new DefaultChunkTreeCache(fileProvider)))
|
var host = new TestMvcRazorHost(new DefaultChunkTreeCache(fileProvider));
|
||||||
{
|
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunRuntimeTest(host, scenarioName);
|
RunRuntimeTest(host, scenarioName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void BasicVisitor_GeneratesCorrectLineMappings()
|
public void BasicVisitor_GeneratesCorrectLineMappings()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
|
|
@ -231,18 +228,17 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunDesignTimeTest(host, "Basic", expectedLineMappings);
|
RunDesignTimeTest(host, "Basic", expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void MvcRazorHost_GeneratesCorrectLineMappingsAndUsingStatementsForViewImports()
|
public void MvcRazorHost_GeneratesCorrectLineMappingsAndUsingStatementsForViewImports()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
|
|
@ -259,18 +255,17 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunDesignTimeTest(host, "_ViewImports", expectedLineMappings);
|
RunDesignTimeTest(host, "_ViewImports", expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void InjectVisitor_GeneratesCorrectLineMappings()
|
public void InjectVisitor_GeneratesCorrectLineMappings()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
|
|
@ -295,18 +290,17 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunDesignTimeTest(host, "Inject", expectedLineMappings);
|
RunDesignTimeTest(host, "Inject", expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void InjectVisitorWithModel_GeneratesCorrectLineMappings()
|
public void InjectVisitorWithModel_GeneratesCorrectLineMappings()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
|
|
@ -339,18 +333,17 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunDesignTimeTest(host, "InjectWithModel", expectedLineMappings);
|
RunDesignTimeTest(host, "InjectWithModel", expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void InjectVisitorWithSemicolon_GeneratesCorrectLineMappings()
|
public void InjectVisitorWithSemicolon_GeneratesCorrectLineMappings()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
|
|
@ -399,18 +392,16 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunDesignTimeTest(host, "InjectWithSemicolon", expectedLineMappings);
|
RunDesignTimeTest(host, "InjectWithSemicolon", expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ModelVisitor_GeneratesCorrectLineMappings()
|
public void ModelVisitor_GeneratesCorrectLineMappings()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var expectedLineMappings = new[]
|
var expectedLineMappings = new[]
|
||||||
{
|
{
|
||||||
|
|
@ -427,18 +418,17 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
// Act and Assert
|
// Act and Assert
|
||||||
RunDesignTimeTest(host, "Model", expectedLineMappings);
|
RunDesignTimeTest(host, "Model", expectedLineMappings);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ModelVisitor_GeneratesLineMappingsForLastModel_WhenMultipleModelsArePresent()
|
public void ModelVisitor_GeneratesLineMappingsForLastModel_WhenMultipleModelsArePresent()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var fileProvider = new TestFileProvider();
|
var fileProvider = new TestFileProvider();
|
||||||
using (var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
var host = new MvcRazorHostWithNormalizedNewLine(new DefaultChunkTreeCache(fileProvider))
|
||||||
{
|
{
|
||||||
DesignTimeMode = true
|
DesignTimeMode = true
|
||||||
})
|
};
|
||||||
{
|
|
||||||
host.NamespaceImports.Clear();
|
host.NamespaceImports.Clear();
|
||||||
var inputFile = "TestFiles/Input/MultipleModels.cshtml";
|
var inputFile = "TestFiles/Input/MultipleModels.cshtml";
|
||||||
var outputFile = "TestFiles/Output/DesignTime/MultipleModels.cs";
|
var outputFile = "TestFiles/Output/DesignTime/MultipleModels.cs";
|
||||||
|
|
@ -461,7 +451,6 @@ namespace Microsoft.AspNetCore.Mvc.Razor
|
||||||
Assert.Equal(expectedCode, results.GeneratedCode, ignoreLineEndingDifferences: true);
|
Assert.Equal(expectedCode, results.GeneratedCode, ignoreLineEndingDifferences: true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private static void RunRuntimeTest(
|
private static void RunRuntimeTest(
|
||||||
MvcRazorHost host,
|
MvcRazorHost host,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue