XmlCommentMarkDownGenerator
XmlCommentMarkDownGenerator copied to clipboard
Generic types and parameters are not handled properly
Given the following example:
<?xml version="1.0"?>
<doc>
<assembly>
<name>Example.Core</name>
</assembly>
<members>
<member name="T:Example.Core.MessageBus.MessageEnvelope`1">
<summary>
Represents a wrapper for an Entity that will be published to the MessageBus Queue.
</summary>
<typeparam name="T">The type of the Entity to be published.</typeparam>
</member>
<member name="P:Example.Core.MessageBus.MessageEnvelope`1.AttemptsCount">
<summary>
The number of times the system has previously attempted to process this message.
</summary>
</member>
<member name="P:Example.Core.MessageBus.MessageEnvelope`1.DatePublished">
<summary>
The Date and Time in UTC that this nessage was published to the queue.
</summary>
</member>
<member name="P:Example.Core.MessageBus.MessageEnvelope`1.Entity">
<summary>
The Entity that is to be included in the payload.
</summary>
</member>
<member name="P:Example.Core.MessageBus.MessageEnvelope`1.Id">
<summary>
A <see cref="T:System.Guid"/> uniquely identifying this message on the queue. Helps when looking at logs or correlating from telemetry.
</summary>
</member>
<member name="P:Example.Core.MessageBus.MessageEnvelope`1.ProcessLog">
<summary>
The processing log for this particular message.
</summary>
</member>
<member name="M:Example.Core.MessageBus.MessageEnvelope`1.#ctor(`0)">
<summary>
Creates a new instance for a given Entity.
</summary>
<param name="entity">The entity to add to the payload.</param>
</member>
</members>
</doc>
There needs to be a way to complete the Type name with the proper Generic parameters. In the example above, the first <member>
node needs to become MessageEnvelope<T>
.
This means that the processing needs to be more complex. the number after the accent mark describes the number of generic parameters passed in. So the code needs to parse the type, look for the accent mark, and if it's there, generate a comma separated format string (<{0}, {1}>
), that can then be used in s string.Format command against the <typeparam>
nodes.