private async Task <Document> UseLocalVariablesAsParameters(Document document, IInvocation invocation, bool generateNamedParameters, CancellationToken cancellationToken)
        {
            var semanticModel = await document.GetSemanticModelAsync(cancellationToken);

            var mappingSourceFinder = new LocalScopeMappingSourceFinder(semanticModel, invocation.SourceNode);

            return(await CodeFixHelper.FixInvocationWithParameters(document, invocation, generateNamedParameters, semanticModel, mappingSourceFinder, cancellationToken));
        }
        private async Task <Document> ScaffoldInvocation(Document document, IInvocation invocation, bool namedArguments,
                                                         CancellationToken cancellationToken)
        {
            var syntaxGenerator = SyntaxGenerator.GetGenerator(document);
            var semanticModel   = await document.GetSemanticModelAsync(cancellationToken);

            var contextAssembly     = semanticModel.FindContextAssembly(invocation.SourceNode);
            var mappingSourceFinder = new ScaffoldingSourceFinder(syntaxGenerator, document, contextAssembly);

            return(await CodeFixHelper.FixInvocationWithParameters(document, invocation, namedArguments, semanticModel, mappingSourceFinder, cancellationToken));
        }