Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic types and parameters are not handled properly #10

Open
robertmclaws opened this issue Dec 25, 2016 · 0 comments
Open

Generic types and parameters are not handled properly #10

robertmclaws opened this issue Dec 25, 2016 · 0 comments
Labels

Comments

@robertmclaws
Copy link
Contributor

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.

@Pxtl Pxtl added the bug label Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants