未验证 提交 4fe6582f 编写于 作者: M Madalyn Redding 提交者: GitHub

Update CSharpUseRangeOperatorDiagnosticAnalyzer.cs

上级 db2ed4b0
......@@ -175,7 +175,7 @@ protected override void InitializeWorker(AnalysisContext context)
var indexer = GetIndexer(targetMethod.ContainingType, infoCache.RangeType, targetMethod.ContainingType);
// Need to make sure that if the target method is being written to, that the indexer returns a ref, is a read/write property,
// or the syntax allows for the slice method to be run
if (invocation.Syntax.IsLeftSideOfAnyAssignExpression() && indexer != null && isWriteableIndexer(invocation, indexer))
if (invocation.Syntax.IsLeftSideOfAnyAssignExpression() && indexer != null && IsWriteableIndexer(invocation, indexer))
{
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册