未验证 提交 ea57e1ea 编写于 作者: S Sam Harwell 提交者: GitHub

Merge pull request #35481 from sharwell/rs1024-editorfeatures-tests

Fix violations of RS1024 in Microsoft.CodeAnalysis.EditorFeatures.UnitTests
......@@ -492,7 +492,7 @@ public partial class CodeGenerationTests
var attributeType = (INamedTypeSymbol)GetTypeSymbol(attributeClass)(context.SemanticModel);
var taggedNode = context.GetDestinationNode();
ISymbol attributeTarget = context.SemanticModel.GetDeclaredSymbol(taggedNode);
var attribute = attributeTarget.GetAttributes().Single(attr => attr.AttributeClass == attributeType);
var attribute = attributeTarget.GetAttributes().Single(attr => Equals(attr.AttributeClass, attributeType));
var declarationNode = taggedNode.FirstAncestorOrSelf<T>();
var newNode = CodeGenerator.RemoveAttribute(declarationNode, context.Document.Project.Solution.Workspace, attribute)
.WithAdditionalAnnotations(Formatter.Annotation);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册