Ejemplo n.º 1
0
        public override void WriteLocation(ITextColorWriter output, BookmarkLocationFormatterOptions options)
        {
            bool printedToken = false;

            if ((options & BookmarkLocationFormatterOptions.Tokens) != 0)
            {
                WriteToken(output, location.Token);
                output.WriteSpace();
                printedToken = true;
            }

            bool success = WriteLocationCore(output, options);

            if (!success)
            {
                if (printedToken)
                {
                    output.Write(BoxedTextColor.Error, "???");
                }
                else
                {
                    WriteToken(output, location.Token);
                }
            }
        }
Ejemplo n.º 2
0
        protected FormatterOptions GetFormatterOptions(BookmarkLocationFormatterOptions options)
        {
            FormatterOptions flags = 0;

            if ((options & BookmarkLocationFormatterOptions.ModuleNames) != 0)
            {
                flags |= FormatterOptions.ShowModuleNames;
            }
            if ((options & BookmarkLocationFormatterOptions.ParameterTypes) != 0)
            {
                flags |= FormatterOptions.ShowParameterTypes;
            }
            if ((options & BookmarkLocationFormatterOptions.ParameterNames) != 0)
            {
                flags |= FormatterOptions.ShowParameterNames;
            }
            if ((options & BookmarkLocationFormatterOptions.DeclaringTypes) != 0)
            {
                flags |= FormatterOptions.ShowDeclaringTypes;
            }
            if ((options & BookmarkLocationFormatterOptions.ReturnTypes) != 0)
            {
                flags |= FormatterOptions.ShowReturnTypes;
            }
            if ((options & BookmarkLocationFormatterOptions.Namespaces) != 0)
            {
                flags |= FormatterOptions.ShowNamespaces;
            }
            if ((options & BookmarkLocationFormatterOptions.IntrinsicTypeKeywords) != 0)
            {
                flags |= FormatterOptions.ShowIntrinsicTypeKeywords;
            }
            if ((options & BookmarkLocationFormatterOptions.DigitSeparators) != 0)
            {
                flags |= FormatterOptions.DigitSeparators;
            }
            if ((options & BookmarkLocationFormatterOptions.Decimal) != 0)
            {
                flags |= FormatterOptions.UseDecimal;
            }
            return(flags);
        }
Ejemplo n.º 3
0
 protected abstract bool WriteLocationCore(ITextColorWriter output, BookmarkLocationFormatterOptions options);
 /// <summary>
 /// Writes the location shown in the Location column
 /// </summary>
 /// <param name="output">Output</param>
 /// <param name="options">Options</param>
 public abstract void WriteLocation(ITextColorWriter output, BookmarkLocationFormatterOptions options);