Пример #1
0
        public override void Write(DocumentFormatter output, OutputContext context)
        {
            if (Overloads.Count == 0)
            {
                base.Write(output, context);
                return;
            }

            output.Header(1, SharedTitle);
            WriteInfoBox(output, context);
            WriteOverloadsSummary(output, context);

            output.Table(new[] { "Overload", "Description" }, Overloads,
                         overload => overload.WriteLink(output, context),
                         overload => overload.WriteSummaryLine(output, context)
                         );

            foreach (var overload in Overloads)
            {
                output.Header(2, overload.Name);
                overload.WriteSummary(output, context);

                var syntax = overload.GetSyntax(context.Language);
                if (!string.IsNullOrEmpty(syntax))
                {
                    output.Header(3, "Syntax");
                    output.Code(syntax, context.Language.Name);
                }

                overload.WriteDetails(3, output, context);
            }
        }
Пример #2
0
        public override void Write(DocumentFormatter output, OutputContext context)
        {
            output.Header(1, Title);
            WriteInfoBox(output, context);
            WriteSummary(output, context);

            var syntax = GetSyntax(context.Language);

            if (!string.IsNullOrEmpty(syntax))
            {
                output.Header(2, "Syntax");
                output.Code(syntax, context.Language.Name);
            }

            WriteDetails(2, output, context);
        }