");
string actual = await template.RunAsync(new
{
@@ -105,7 +105,7 @@ public async Task TestCompileAndRun_InAttributeVariablesAsync()
public void TestCompileAndRun_HtmlAttribute()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile("
Hello
");
+ IRazorEngineCompiledTemplate
template = razorEngine.Compile("Hello
");
string actual = template.Run(new
{
@@ -119,7 +119,7 @@ public void TestCompileAndRun_HtmlAttribute()
public async Task TestCompileAndRun_HtmlAttributeAsync()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello
");
+ IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello
");
string actual = await template.RunAsync(new
{
@@ -133,7 +133,7 @@ public async Task TestCompileAndRun_HtmlAttributeAsync()
public void TestCompileAndRun_DynamicModel_Plain()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @Model.Name");
+ IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @Model.Name");
string actual = template.Run(new
{
@@ -147,7 +147,7 @@ public void TestCompileAndRun_DynamicModel_Plain()
public async Task TestCompileAndRun_DynamicModel_PlainAsync()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello @Model.Name");
+ IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello @Model.Name");
string actual = await template.RunAsync(new
{
@@ -218,7 +218,7 @@ public void TestCompileAndRun_NullablePropertyWithValue()
DateTime? dateTime = DateTime.Now;
- IRazorEngineCompiledTemplate template = razorEngine.Compile("DateTime: @Model.DateTime.Value.ToString()");
+ IRazorEngineCompiledTemplate template = razorEngine.Compile("DateTime: @Model.DateTime.Value.ToString()");
string actual = template.Run(instance => instance.Model = new TestModel()
{
@@ -235,7 +235,7 @@ public void TestCompileAndRun_NullablePropertyWithoutValue()
DateTime? dateTime = null;
- IRazorEngineCompiledTemplate template = razorEngine.Compile("DateTime: @Model.DateTime");
+ IRazorEngineCompiledTemplate template = razorEngine.Compile("DateTime: @Model.DateTime");
string actual = template.Run(instance => instance.Model = new TestModel()
{
@@ -459,7 +459,7 @@ void RecursionTest(int level)
public void TestCompileAndRun_TypedModel1()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @A @B @(A + B) @C @Decorator(\"777\")");
+ IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @A @B @(A + B) @C @Decorator(\"777\")");
string actual = template.Run(instance =>
{
@@ -475,7 +475,7 @@ public void TestCompileAndRun_TypedModel1()
public async Task TestCompileAndRun_TypedModel1Async()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello @A @B @(A + B) @C @Decorator(\"777\")");
+ IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello @A @B @(A + B) @C @Decorator(\"777\")");
string actual = await template.RunAsync(instance =>
{
@@ -491,7 +491,7 @@ public async Task TestCompileAndRun_TypedModel1Async()
public void TestCompileAndRun_TypedModel2()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @Model.Decorator(Model.C)");
+ IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @Model.Decorator(Model.C)");
string actual = template.Run(instance =>
{
@@ -513,7 +513,7 @@ Hello @Model.Decorator(Model.C)
";
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate> template = razorEngine.Compile>(templateText);
+ IRazorEngineCompiledTemplate, string> template = razorEngine.Compile>(templateText);
string actual = template.Run(instance =>
{
@@ -530,7 +530,7 @@ Hello @Model.Decorator(Model.C)
public async Task TestCompileAndRun_TypedModel2Async()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello @Model.Decorator(Model.C)");
+ IRazorEngineCompiledTemplate template = await razorEngine.CompileAsync("Hello @Model.Decorator(Model.C)");
string actual = await template.RunAsync(instance =>
{
@@ -547,7 +547,7 @@ public async Task TestCompileAndRun_TypedModel2Async()
public void TestCompileAndRun_AnonymousModelWithArrayOfObjects()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile(
+ IRazorEngineCompiledTemplate template = razorEngine.Compile(
@"
@foreach (var item in Model.Numbers.OrderByDescending(x => x))
{
@@ -575,7 +575,7 @@ public void TestCompileAndRun_AnonymousModelWithArrayOfObjects()
public void TestCompileAndRun_StronglyTypedModelLinq()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile(
+ IRazorEngineCompiledTemplate template = razorEngine.Compile(
@"
@foreach (var item in Model.Numbers.OrderByDescending(x => x))
{
@@ -602,7 +602,7 @@ public void TestCompileAndRun_StronglyTypedModelLinq()
public void TestCompileAndRun_DynamicModelLinq()
{
RazorEngine razorEngine = new RazorEngine();
- IRazorEngineCompiledTemplate template = razorEngine.Compile(
+ IRazorEngineCompiledTemplate template = razorEngine.Compile(
@"
@foreach (var item in ((IEnumerable