Skip to content

Context usages documentation on map Methods #53

@Liamth99

Description

@Liamth99

Describe the solution you'd like:
We could track how the mapper context is being used in methods and edit the XML docs on the Map method to reflect this.

For example the code below to point out that When getting the Release property for ASTrack, the "release" key is used to access the dictionary.

[ForMember<MZTrack, ASTrack>(nameof(ASTrack.Release))]
private static ASRelease GetTitle(MZTrack _, MapperContextBase ctx)
{
    if (ctx.AdditionalContext.TryGetValue("release", out var release) && release is MZRelease musicBrainzRelease)
        return Map(musicBrainzRelease);

    return null!;
}

Metadata

Metadata

Assignees

Labels

GeneratorThis issue focuses on the source generatorenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions