Write helper method template functions with no indent.
Also removed capturing of the LineMapping (wasn't being used) for the CSharpHelperVisitor.
This commit is contained in:
parent
49ffb5ae81
commit
9f05cf8fbb
|
|
@ -20,9 +20,13 @@ namespace Microsoft.AspNet.Razor.Generator.Compiler.CSharp
|
|||
|
||||
string accessibility = "public " + (Context.Host.StaticHelpers ? "static" : String.Empty);
|
||||
|
||||
// We want to write the method signature at 0 indentation so if helper's are formatted they format correctly.
|
||||
int currentIndentation = Writer.CurrentIndent;
|
||||
Writer.ResetIndent();
|
||||
Writer.Write(accessibility).Write(" ").Write(Context.Host.GeneratedClassContext.TemplateTypeName).Write(" ");
|
||||
Writer.SetIndent(currentIndentation);
|
||||
|
||||
using (CSharpLineMappingWriter mappingWriter = Writer.BuildLineMapping(chunk.Signature.Location, chunk.Signature.Value.Length, Context.SourceFile))
|
||||
using (Writer.BuildLineMapping(chunk.Signature.Location, chunk.Signature.Value.Length, Context.SourceFile))
|
||||
{
|
||||
Writer.Write(chunk.Signature);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue