提交 67268303 编写于 作者: C Cyrus Najmabadi

Use 'Source'

上级 c440fddb
......@@ -239,9 +239,9 @@ private VSDiagnostic ConvertDiagnostic(Document document, SourceText text, Diagn
// Razor wants to handle all span mapping themselves. So if we are in razor, return the raw doc spans, and
// do not map them.
var useMappedSpan = !document.IsRazorDocument();
return new RoslynDiagnostic
return new VSDiagnostic
{
Client = GetType().Name,
Source = GetType().Name,
Code = diagnosticData.Id,
Message = diagnosticData.Message,
Severity = ConvertDiagnosticSeverity(diagnosticData.Severity),
......
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.Serialization;
using Microsoft.VisualStudio.LanguageServer.Protocol;
namespace Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics
{
[DataContract]
internal class RoslynDiagnostic : VSDiagnostic
{
[DataMember(Name = "_ms_client", IsRequired = false)]
public string? Client { get; set; }
}
}
......@@ -586,9 +586,9 @@ private LSP.Diagnostic ConvertToLspDiagnostic(DiagnosticData diagnosticData, Sou
{
Contract.ThrowIfNull(diagnosticData.DataLocation);
var diagnostic = new RoslynDiagnostic
var diagnostic = new LSP.Diagnostic
{
Client = this._languageClient.GetType().Name,
Source = this._languageClient.GetType().Name,
Code = diagnosticData.Id,
Severity = ProtocolConversions.DiagnosticSeverityToLspDiagnositcSeverity(diagnosticData.Severity),
Range = GetDiagnosticRange(diagnosticData.DataLocation, text, isRazor),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册