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

Improve code style behavior.

上级 3c67ceb2
......@@ -300,20 +300,17 @@ private void Process(AnalysisResult result, SemanticModelAnalysisContext context
var option = optionSet.GetOption(CodeStyleOptions.PreferAutoProperties, propertyDeclaration.Language);
var lowPriority = ImmutableDictionary<string, string>.Empty.Add("LowPriority", "");
// Place the appropriate marker on the field depending on the user option.
var diagnostic1 = Diagnostic.Create(
GetFieldDescriptor(option), nodeToFade.GetLocation(),
additionalLocations: additionalLocations,
properties: option.Notification.Value == DiagnosticSeverity.Hidden ? lowPriority : default);
additionalLocations: additionalLocations);
// Also, place a hidden marker on the property. If they bring up a lightbulb
// there, they'll be able to see that they can convert it to an auto-prop.
var diagnostic2 = Diagnostic.Create(
HiddenDescriptor, propertyDeclaration.GetLocation(),
additionalLocations: additionalLocations,
properties: lowPriority);
properties: ImmutableDictionary<string, string>.Empty.Add("LowPriority", ""));
context.ReportDiagnostic(diagnostic1);
context.ReportDiagnostic(diagnostic2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册