diff --git a/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpCodeWriter.cs b/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpCodeWriter.cs index 89c0cf7ce8..78c35736a7 100644 --- a/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpCodeWriter.cs +++ b/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpCodeWriter.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNet.Razor.CodeGenerators { WriteStringLiteral(value.Value); WriteParameterSeparator(); - Write(value.Location.AbsoluteIndex.ToString(CultureInfo.InvariantCulture)); + Write(value.Location.AbsoluteIndex.ToString(CultureInfo.CurrentCulture)); return this; } diff --git a/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpTagHelperCodeRenderer.cs b/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpTagHelperCodeRenderer.cs index ed22119df0..48e4f43fd4 100644 --- a/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpTagHelperCodeRenderer.cs +++ b/src/Microsoft.AspNet.Razor/CodeGenerators/CSharpTagHelperCodeRenderer.cs @@ -115,9 +115,11 @@ namespace Microsoft.AspNet.Razor.CodeGenerators // Call into the tag helper scope manager to start a new tag helper scope. // Also capture the value as the current execution context. - _writer.WriteStartAssignment(ExecutionContextVariableName) - .WriteStartInstanceMethodInvocation(ScopeManagerVariableName, - _tagHelperContext.ScopeManagerBeginMethodName); + _writer + .WriteStartAssignment(ExecutionContextVariableName) + .WriteStartInstanceMethodInvocation( + ScopeManagerVariableName, + _tagHelperContext.ScopeManagerBeginMethodName); // Assign a unique ID for this instance of the source HTML tag. This must be unique // per call site, e.g. if the tag is on the view twice, there should be two IDs. diff --git a/src/Microsoft.AspNet.Razor/CodeGenerators/Visitors/CSharpCodeVisitor.cs b/src/Microsoft.AspNet.Razor/CodeGenerators/Visitors/CSharpCodeVisitor.cs index 7596be5898..513acad2cc 100644 --- a/src/Microsoft.AspNet.Razor/CodeGenerators/Visitors/CSharpCodeVisitor.cs +++ b/src/Microsoft.AspNet.Razor/CodeGenerators/Visitors/CSharpCodeVisitor.cs @@ -207,9 +207,9 @@ namespace Microsoft.AspNet.Razor.CodeGenerators.Visitors Writer .WriteParameterSeparator() - .Write(chunk.Start.AbsoluteIndex.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.Start.AbsoluteIndex.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() - .Write(chunk.Association.Length.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.Association.Length.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() .WriteBooleanLiteral(value: false) .WriteEndMethodInvocation(); @@ -229,9 +229,9 @@ namespace Microsoft.AspNet.Razor.CodeGenerators.Visitors Writer .WriteEndMethodInvocation(false) .WriteParameterSeparator() - .Write(chunk.Start.AbsoluteIndex.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.Start.AbsoluteIndex.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() - .Write(chunk.Association.Length.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.Association.Length.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() .WriteBooleanLiteral(false) .WriteEndMethodInvocation(); @@ -282,9 +282,9 @@ namespace Microsoft.AspNet.Razor.CodeGenerators.Visitors Writer .WriteParameterSeparator() - .Write(chunk.ValueLocation.AbsoluteIndex.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.ValueLocation.AbsoluteIndex.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() - .Write(chunk.Association.Length.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.Association.Length.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() .WriteBooleanLiteral(false) .WriteEndMethodInvocation(); @@ -294,7 +294,7 @@ namespace Microsoft.AspNet.Razor.CodeGenerators.Visitors Writer .WriteLocationTaggedString(chunk.Value) .WriteParameterSeparator() - .Write(chunk.Association.Length.ToString(CultureInfo.InvariantCulture)) + .Write(chunk.Association.Length.ToString(CultureInfo.CurrentCulture)) .WriteParameterSeparator() .WriteBooleanLiteral(true) .WriteEndMethodInvocation(); @@ -330,7 +330,7 @@ namespace Microsoft.AspNet.Razor.CodeGenerators.Visitors .WriteParameterSeparator() .WriteLocationTaggedString(chunk.Suffix) .WriteParameterSeparator() - .Write(attributeCount.ToString(CultureInfo.InvariantCulture)) + .Write(attributeCount.ToString(CultureInfo.CurrentCulture)) .WriteEndMethodInvocation(); Accept(chunk.Children);