private static void AnalyzeInvocationExpressionInsideAwaitExpression(CustomAnalysisContext context)
        {
            var node                = context.Node;
            var awaitExpression     = node.Parent as AwaitExpressionSyntax;
            var awaitExpressionInfo = context.SemanticModel.GetAwaitExpressionInfo(awaitExpression);

            if (!(awaitExpressionInfo.GetResultMethod?.ReturnType is INamedTypeSymbol returnType))
            {
                return;
            }
            if (!returnType.IsDisposableOrImplementsDisposable())
            {
                return;
            }
            if (Detector.IsIgnoredTypeOrImplementsIgnoredInterface(returnType))
            {
                return;
            }
            if (awaitExpression.IsDescendantOfUsingHeader())
            {
                return;
            }
            if (awaitExpression.IsPartOfVariableDeclaratorInsideAUsingDeclaration())
            {
                return;
            }
            if (awaitExpression.IsPartOfReturnStatementInMethod())
            {
                return;
            }
            if (awaitExpression.IsReturnedLaterWithinMethod())
            {
                return;
            }
            if (awaitExpression.IsDescendantOfVariableDeclarator())
            {
                AnalyzeNodeWithinVariableDeclarator(context.NewWith(awaitExpression));
            }
            else if (awaitExpression.IsDescendantOfAssignmentExpressionSyntax())
            {
                if (node.TryFindParentClass(out var @class))
                {
                    var assignment = awaitExpression?.Parent as AssignmentExpressionSyntax;
                    var member     = (assignment?.Left as IdentifierNameSyntax)?.Identifier.Text;
                    var isDisposed = @class.ContainsDisposeCallFor(member, context.SemanticModel, Configuration);
                    if (isDisposed)
                    {
                        return;
                    }
                }
                context.ReportNotDisposedLocalVariable();
            }
            else
            {
                context.ReportNotDisposedAnonymousObject();
            }
        }
        private static void CheckIfObjectCreationTracksNode(CustomAnalysisContext context, ObjectCreationExpressionSyntax objectCreation)
        {
            var t = context.SemanticModel.GetReturnTypeOf(objectCreation);

            if (t == null)
            {
                return;           //return type could not be determined
            }
            if (Detector.IsTrackedType(t, objectCreation, context.SemanticModel))
            {
                return;
            }

            context.ReportNotDisposedAnonymousObject();
        }
        private static void AnalyzePartOfMethodCall(CustomAnalysisContext ctx)
        {
            var methodInvocation = ctx.Node.Parent.Parent.Parent as InvocationExpressionSyntax;

            if (Detector.IsTrackingMethodCall(methodInvocation, ctx.Context.SemanticModel))
            {
                return;
            }

            if (methodInvocation.IsInterlockedExchangeExpression())
            {
                return;
            }

            ctx.ReportNotDisposedAnonymousObject();
        }
        private static void AnalyzeNodeInArgumentList(CustomAnalysisContext context)
        {
            var objectCreation = context.Node.Parent.Parent.Parent as ObjectCreationExpressionSyntax;
            var t = context.SemanticModel.GetReturnTypeOf(objectCreation);

            if (t == null)
            {
                return;           //return type could not be determined
            }
            if (Detector.IsTrackedType(t, objectCreation, context.SemanticModel))
            {
                return;
            }

            context.ReportNotDisposedAnonymousObject();
        }