public static async Task <SuggestedAction> CreateAsync(
                SuggestedActionWithNestedFlavors suggestedAction, CancellationToken cancellationToken)
            {
                var previewResult = await suggestedAction.GetPreviewResultAsync(cancellationToken).ConfigureAwait(true);

                if (previewResult == null)
                {
                    return(null);
                }

                var changeSummary = previewResult.ChangeSummary;

                if (changeSummary == null)
                {
                    return(null);
                }

                return(new PreviewChangesSuggestedAction(
                           suggestedAction.ThreadingContext,
                           suggestedAction.SourceProvider,
                           suggestedAction.Workspace,
                           suggestedAction.OriginalSolution,
                           suggestedAction.SubjectBuffer,
                           suggestedAction.Provider,
                           new PreviewChangesCodeAction(
                               suggestedAction.Workspace, suggestedAction.CodeAction, changeSummary)));
            }
            public static async Task<SuggestedAction> CreateAsync(
                SuggestedActionWithNestedFlavors suggestedAction, CancellationToken cancellationToken)
            {
                var previewResult = await suggestedAction.GetPreviewResultAsync(cancellationToken).ConfigureAwait(true);
                if (previewResult == null)
                {
                    return null;
                }

                var changeSummary = previewResult.ChangeSummary;
                if (changeSummary == null)
                {
                    return null;
                }

                return new PreviewChangesSuggestedAction(
                    suggestedAction.SourceProvider, suggestedAction.Workspace,
                    suggestedAction.SubjectBuffer, suggestedAction.Provider,
                    new PreviewChangesCodeAction(
                        suggestedAction.Workspace, suggestedAction.CodeAction, changeSummary));
            }