Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Commit dc3a520

Browse files
author
N. Taylor Mullen
committed
Rebased onto latest dev.
- Fixed tag helper parse tree visitor rebase error.
1 parent d0605ef commit dc3a520

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

src/Microsoft.AspNet.Razor/Generator/CodeBuilderContext.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,10 @@ internal CodeBuilderContext(RazorEngineHost host,
5050
/// <see cref="TargetWriterName"/>, i.e. WriteLiteralTo(myWriter, "Hello World").
5151
/// </remarks>
5252
public string TargetWriterName { get; set; }
53+
54+
/// <summary>
55+
/// Gets or sets the <c>SHA1</c> based checksum for the file whose location is defined by <see cref="SourceFile"/>.
56+
/// </summary>
57+
public string Checksum { get; set; }
5358
}
5459
}

src/Microsoft.AspNet.Razor/Generator/CodeGeneratorContext.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,5 @@ public CodeGeneratorContext(RazorEngineHost host,
4040
public RazorEngineHost Host { get; private set; }
4141

4242
public CodeTreeBuilder CodeTreeBuilder { get; set; }
43-
/// <summary>
44-
/// Gets or sets the <c>SHA1</c> based checksum for the file whose location is defined by <see cref="SourceFile"/>.
45-
/// </summary>
46-
public string Checksum { get; set; }
47-
4843
}
4944
}

src/Microsoft.AspNet.Razor/Parser/TagHelpers/TagHelperBlockBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ private static KeyValuePair<string, SyntaxTreeNode> ParseSpan(Span span)
150150
{
151151
name = symbol.Content;
152152
}
153+
else if (afterEquals)
154+
{
155+
builder.Accept(symbol);
156+
}
153157
else if (symbol.Type == HtmlSymbolType.Equals)
154158
{
155159
// We've found an '=' symbol, this means that the coming symbols will either be a quote
@@ -174,10 +178,6 @@ private static KeyValuePair<string, SyntaxTreeNode> ParseSpan(Span span)
174178

175179
afterEquals = true;
176180
}
177-
else if (afterEquals)
178-
{
179-
builder.Accept(symbol);
180-
}
181181
}
182182

183183
return new KeyValuePair<string, SyntaxTreeNode>(name, builder.Build());

src/Microsoft.AspNet.Razor/RazorTemplateEngine.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,8 @@ protected internal virtual GeneratorResults GenerateCodeCore(ITextDocument input
253253
generator.Visit(results);
254254

255255
var codeBuilderContext = new CodeBuilderContext(generator.Context);
256+
codeBuilderContext.Checksum = checksum;
256257
var builder = CreateCodeBuilder(codeBuilderContext);
257-
codeGenerationContext.Checksum = checksum;
258-
259-
var builder = CreateCodeBuilder(codeGenerationContext);
260258
var builderResult = builder.Build();
261259

262260
// Collect results and return

0 commit comments

Comments
 (0)