提交 69695075 编写于 作者: J jmarolf

Deleting empty directories. Removing a file that was added accidentally, and...

Deleting empty directories.  Removing a file that was added accidentally, and updating the Blocking analyzer. (changeset 1314564)
上级 f58e55c6
......@@ -37,39 +37,42 @@ public void AnalyzeNode(SyntaxNode node, SemanticModel semanticModel, Action<Dia
{
var invokeMethod = semanticModel.GetSymbolInfo(node).Symbol as IMethodSymbol;
// Checks if the Wait method is called within an async method then creates the diagnostic.
if (invokeMethod != null && !invokeMethod.IsExtensionMethod && invokeMethod.OriginalDefinition.Name.Equals("Wait"))
if (invokeMethod != null && !invokeMethod.IsExtensionMethod)
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the Wait method is called within an async method then creates the diagnostic.
if (invokeMethod.OriginalDefinition.Name.Equals("Wait"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the WaitAny method is called within an async method then creates the diagnostic.
if (invokeMethod != null && !invokeMethod.IsExtensionMethod && invokeMethod.OriginalDefinition.Name.Equals("WaitAny"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the WaitAny method is called within an async method then creates the diagnostic.
if (invokeMethod.OriginalDefinition.Name.Equals("WaitAny"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the WaitAll method is called within an async method then creates the diagnostic.
if (invokeMethod != null && !invokeMethod.IsExtensionMethod && invokeMethod.OriginalDefinition.Name.Equals("WaitAll"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the WaitAll method is called within an async method then creates the diagnostic.
if (invokeMethod.OriginalDefinition.Name.Equals("WaitAll"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the Sleep method is called within an async method then creates the diagnostic.
if (invokeMethod != null && !invokeMethod.IsExtensionMethod && invokeMethod.OriginalDefinition.Name.Equals("Sleep"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the Sleep method is called within an async method then creates the diagnostic.
if (invokeMethod.OriginalDefinition.Name.Equals("Sleep"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
// Checks if the GetResult method is called within an async method then creates the diagnostic.
if (invokeMethod != null && !invokeMethod.IsExtensionMethod && invokeMethod.OriginalDefinition.Name.Equals("GetResult"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
// Checks if the GetResult method is called within an async method then creates the diagnostic.
if (invokeMethod.OriginalDefinition.Name.Equals("GetResult"))
{
addDiagnostic(Diagnostic.Create(Rule, node.Parent.GetLocation()));
return;
}
}
var property = semanticModel.GetSymbolInfo(node).Symbol as IPropertySymbol;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsyncPackage
{
public class Class1
{
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册