Skip to content

Commit

Permalink
Remove uses of politically sensitive terms
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Nov 7, 2022
1 parent a61d5a3 commit a83e88d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private void AnalyzeAwaitExpression(SyntaxNodeAnalysisContext context)
return null;
}

// Whitelist Task.From*() methods.
// Allow Task.From*() methods.
if (!context.TryGetNewOrExistingSemanticModel(invocationSyntax.SyntaxTree, out SemanticModel? declarationSemanticModel))
{
return null;
Expand All @@ -211,7 +211,7 @@ private void AnalyzeAwaitExpression(SyntaxNodeAnalysisContext context)
ISymbol? definition = declarationSemanticModel.GetSymbolInfo(memberAccessSyntax, cancellationToken).Symbol;
if (definition is IFieldSymbol field)
{
// Whitelist the TplExtensions.CompletedTask and related fields.
// Allow the TplExtensions.CompletedTask and related fields.
if (field.ContainingType.Name == Types.TplExtensions.TypeName && field.BelongsToNamespace(Types.TplExtensions.Namespace) &&
(field.Name == Types.TplExtensions.CompletedTask || field.Name == Types.TplExtensions.CanceledTask || field.Name == Types.TplExtensions.TrueTask || field.Name == Types.TplExtensions.FalseTask))
{
Expand Down

0 comments on commit a83e88d

Please sign in to comment.