void GenerateHeader()
        {
            CSharpAmbience ambience = new CSharpAmbience();

            ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
            var stringBuilder = new StringBuilder();
            var formatter     = new ParameterHighlightingOutputFormatter(stringBuilder, highlightedParameterIndex);

            ambience.ConvertEntity(Method, formatter, FormattingOptionsFactory.CreateSharpDevelop());
            var inlineBuilder = new HighlightedInlineBuilder(stringBuilder.ToString());

            inlineBuilder.SetFontWeight(formatter.parameterStartOffset, formatter.parameterLength, FontWeights.Bold);
            header.Inlines.Clear();
            header.Inlines.AddRange(inlineBuilder.CreateRuns());
        }
        void GenerateHeader()
        {
            CSharpAmbience ambience = new CSharpAmbience();

            ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
            var         stringBuilder = new StringBuilder();
            TokenWriter formatter     = new ParameterHighlightingOutputFormatter(stringBuilder, highlightedParameterIndex);

            ambience.ConvertSymbol(Method, formatter, FormattingOptionsFactory.CreateSharpDevelop());
            var documentation = XmlDocumentationElement.Get(Method);

            ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList;

            var inlineBuilder = new HighlightedInlineBuilder(stringBuilder.ToString());

            header.Inlines.Clear();
            header.Inlines.AddRange(inlineBuilder.CreateRuns());
        }
Esempio n. 3
0
        void GenerateHeader()
        {
            CSharpAmbience ambience = new CSharpAmbience();
            ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
            var stringBuilder = new StringBuilder();
            TokenWriter formatter = new ParameterHighlightingOutputFormatter(stringBuilder, highlightedParameterIndex);
            ambience.ConvertSymbol(Method, formatter, FormattingOptionsFactory.CreateSharpDevelop());
            var documentation = XmlDocumentationElement.Get(Method);
            ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList;
			
            var inlineBuilder = new HighlightedInlineBuilder(stringBuilder.ToString());
            header.Inlines.Clear();
            header.Inlines.AddRange(inlineBuilder.CreateRuns());
        }
 void GenerateHeader()
 {
     CSharpAmbience ambience = new CSharpAmbience();
     ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
     var stringBuilder = new StringBuilder();
     var formatter = new ParameterHighlightingOutputFormatter(stringBuilder, highlightedParameterIndex);
     ambience.ConvertEntity(Method, formatter, FormattingOptionsFactory.CreateSharpDevelop());
     var inlineBuilder = new HighlightedInlineBuilder(stringBuilder.ToString());
     inlineBuilder.SetFontWeight(formatter.parameterStartOffset, formatter.parameterLength, FontWeights.Bold);
     header.Inlines.Clear();
     header.Inlines.AddRange(inlineBuilder.CreateRuns());
 }