internal static async Task Build(StreamWriter writer, Type type, XDocument xmlComments)
        {
            await DocumentHelpers.PageTitle(
                writer,
                async w => await TypeHelper.FullName(w, type, t => t.Name, "<", ">"),
                TypeHelper.TypeTypeTitle(type));

            await DocumentHelpers.PageHeader(writer, type, xmlComments);

            await writer.WriteLineAsync(XmlCommentHelper.Summary(XmlCommentHelper.TypeElement(xmlComments, type)));

            await writer.WriteLineAsync();

            await TypeDocument.Signature(writer, type);

            await TypeDocument.TypeParameters(writer, type, xmlComments);

            await TypeDocument.Inheritance(writer, type);

            await TypeDocument.Implements(writer, type);

            // TODO - Derived
            // TODO - Attributes
            await TypeDocument.Constructors(writer, type, xmlComments);

            await TypeDocument.Properties(writer, type, xmlComments);

            await TypeDocument.Methods(writer, type, xmlComments);

            // TODO - Operators
            // TODO - Explicit Interface Implementations
            // TODO - Extension Methods
        }
Esempio n. 2
0
        internal static async Task Build(
            StreamWriter writer,
            string typeNamespace,
            List <Type> types,
            XDocument xmlComments)
        {
            await writer.WriteAsync("# ");

            await writer.WriteAsync(typeNamespace);

            await writer.WriteLineAsync(" Namespace");

            await writer.WriteLineAsync();

            await writer.WriteLineAsync("| | |");

            await writer.WriteLineAsync("|_|_|");

            foreach (var type in types)
            {
                await writer.WriteAsync("|[");

                await TypeHelper.FullName(writer, type, t => t.Name, "&lt;", "&gt;");

                await writer.WriteAsync("](");

                await writer.WriteAsync(FileNameHelper.TypeFileName(string.Empty, type));

                await writer.WriteAsync(")|");

                await writer.WriteAsync(XmlCommentHelper.Summary(XmlCommentHelper.TypeElement(xmlComments, type)));

                await writer.WriteLineAsync("|");
            }

            await writer.WriteLineAsync();
        }