// Internal for testing
        internal SumType <CompletionItem[], CompletionList>?SetResolveData(SumType <CompletionItem[], CompletionList> completionResult, LanguageServerKind kind)
        {
            var result = completionResult.Match <SumType <CompletionItem[], CompletionList>?>(
                items =>
            {
                var newItems = items.Select(item => SetData(item)).ToArray();
                return(newItems);
            },
                list =>
            {
                var newItems = list.Items.Select(item => SetData(item)).ToArray();
                return(new CompletionList()
                {
                    Items = newItems,
                    IsIncomplete = list.IsIncomplete,
                });
            },
                () => null);

            return(result);

            CompletionItem SetData(CompletionItem item)
            {
                var data = new CompletionResolveData()
                {
                    LanguageServerKind = kind,
                    OriginalData       = item.Data
                };

                item.Data = data;

                return(item);
            }
        }
        private static void AssociateRequest(LanguageServerKind requestKind, CompletionItem item, CompletionRequestContextCache cache, object originalData = null)
        {
            var documentUri    = new Uri("C:/path/to/file.razor");
            var projectedUri   = new Uri("C:/path/to/file.razor.g.xyz");
            var requestContext = new CompletionRequestContext(documentUri, projectedUri, requestKind);

            var resultId = cache.Set(requestContext);
            var data     = new CompletionResolveData()
            {
                ResultId     = resultId,
                OriginalData = originalData,
            };

            item.Data = data;
        }