protected Action <object> Documentation(
            string expectedText,
            Tuple <string, string>[] expectedClassifications = null)
        {
            return(content =>
            {
                var documentationCommentContent = ((QuickInfoDisplayDeferredContent)content).Documentation;
                switch (documentationCommentContent)
                {
                case DocumentationCommentDeferredContent docComment:
                    {
                        var documentationCommentBlock = (TextBlock)docComment.Create();
                        var actualText = documentationCommentBlock.Text;

                        Assert.Equal(expectedText, actualText);
                    }
                    break;

                case ClassifiableDeferredContent classifiable:
                    {
                        var actualContent = classifiable.ClassifiableContent;
                        Assert.Equal(expectedText, actualContent.GetFullText());
                        ClassificationTestHelper.Verify(expectedText, expectedClassifications, actualContent);
                    }
                    break;
                }
            });
        }
        protected Action <object> AnonymousTypes(
            string expectedText,
            Tuple <string, string>[] expectedClassifications = null)
        {
            return((content) =>
            {
                var actualContent = ((QuickInfoDisplayDeferredContent)content).AnonymousTypes.ClassifiableContent;

                // The type parameter map should have an additional line break at the beginning. We
                // create a copy here because we've captured expectedText and this delegate might be
                // executed more than once (e.g. with different parse options).

                // var expectedTextCopy = "\r\n" + expectedText;
                ClassificationTestHelper.Verify(expectedText, expectedClassifications, actualContent);
            });
        }
 protected Action <object> MainDescription(
     string expectedText,
     Tuple <string, string>[] expectedClassifications = null)
 {
     return((content) =>
     {
         content.TypeSwitch(
             (QuickInfoDisplayDeferredContent qiContent) =>
         {
             var actualContent = qiContent.MainDescription.ClassifiableContent;
             ClassificationTestHelper.Verify(expectedText, expectedClassifications, actualContent);
         },
             (ClassifiableDeferredContent classifiable) =>
         {
             var actualContent = classifiable.ClassifiableContent;
             ClassificationTestHelper.Verify(expectedText, expectedClassifications, actualContent);
         });
     });
 }
        protected Action <object> MainDescription(
            string expectedText,
            Tuple <string, string>[] expectedClassifications = null)
        {
            return(content =>
            {
                switch (content)
                {
                case QuickInfoDisplayDeferredContent qiContent:
                    {
                        var actualContent = qiContent.MainDescription.ClassifiableContent;
                        ClassificationTestHelper.Verify(expectedText, expectedClassifications, actualContent);
                    }
                    break;

                case ClassifiableDeferredContent classifiable:
                    {
                        var actualContent = classifiable.ClassifiableContent;
                        ClassificationTestHelper.Verify(expectedText, expectedClassifications, actualContent);
                    }
                    break;
                }
            });
        }