Port changes from 16.0-preview1

\n\nCommit migrated from 446af41614
This commit is contained in:
Ryan Nowak 2018-12-02 14:17:26 -08:00
parent 616ec14459
commit f2bc93d0f6
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Globalization;
using Microsoft.AspNetCore.Razor.Language;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@ -49,7 +50,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Razor.Serialization
writer.WriteStartObject();
WriteProperty(writer, nameof(RazorDiagnostic.Id), diagnostic.Id);
WriteProperty(writer, nameof(RazorDiagnostic.Severity), (int)diagnostic.Severity);
WriteProperty(writer, RazorDiagnosticMessageKey, diagnostic.GetMessage());
WriteProperty(writer, RazorDiagnosticMessageKey, diagnostic.GetMessage(CultureInfo.CurrentCulture));
writer.WritePropertyName(nameof(RazorDiagnostic.Span));
serializer.Serialize(writer, diagnostic.Span);