Exemple #1
0
        public override RichText GetRichTextTooltip(IEntity entity)
        {
            var flags           = ConversionFlags.All & ~(ConversionFlags.ShowBody | ConversionFlags.PlaceReturnTypeAfterParameterList);
            var output          = new StringWriter();
            var decoratedWriter = new TextWriterTokenWriter(output);
            var writer          = new CSharpHighlightingTokenWriter(TokenWriter.InsertRequiredSpaces(decoratedWriter), locatable: decoratedWriter);

            new CSharpAmbience()
            {
                ConversionFlags = flags
            }.ConvertSymbol(entity, writer, new DecompilerSettings().CSharpFormattingOptions);
            return(new RichText(output.ToString(), writer.HighlightingModel));
        }