Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt committed Mar 25, 2022
1 parent a4d9a1a commit f76e31e
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/Analyzers/CSharp/Analysis/UseAsyncAwaitAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,35 +169,6 @@ private static bool IsFixable(BlockSyntax body, SyntaxNodeAnalysisContext contex
}
}

private static bool IsTaskLike(ITypeSymbol typeSymbol)
{
if (typeSymbol?.IsErrorType() == false
&& typeSymbol.SpecialType == SpecialType.None)
{
ITypeSymbol t = typeSymbol.OriginalDefinition;

if (t.Name == "ValueTask`1"
&& t.ContainingNamespace.HasMetadataName(MetadataNames.System_Threading_Tasks))
{
return true;
}

do
{
if ((t.Name == "Task" || t.Name == "Task`1")
&& t.ContainingNamespace.HasMetadataName(MetadataNames.System_Threading_Tasks))
{
return true;
}

t = t.BaseType;
}
while (t?.SpecialType == SpecialType.None);
}

return false;
}

private class UseAsyncAwaitWalker : StatementWalker
{
[ThreadStatic]
Expand Down

0 comments on commit f76e31e

Please sign in to comment.