RefactoringEssentials
RefactoringEssentials copied to clipboard
New analyser: Method with CancellationToken parameter must call overloads with CancellationToken parameter
Example:
public void MethodOne(string param1, CancellationToken token)
{
MethodTwo("Hello "+param1);//This line should have warning
}
public void MethodTwo(string param1, CancellationToken token = default(CancellationToken))
{
}
Idea is simple... In big APIs like Roslyn methods can have many overloads and it's "common" to forget to pass token to all methods, would be nice to be warned when you forget it...