akamsteeg/AtleX.CommandLineArguments

Remove cached types from HelpWriter

Closed this issue · 0 comments

In HelpWriter, we cache the types of DisplayAttribute and RequiredAttribute but that serves no purpose besides making the object bigger.

/// <summary>
/// Gets the cached <see cref="Type"/> of <see cref="DisplayAttribute"/>
/// </summary>
private readonly Type cachedDisplayAttributeType;
/// <summary>
/// Gets the cached <see cref="Type"/> of <see cref="RequiredAttribute"/>
/// </summary>
private readonly Type cachedRequiredAttributeType;

We should remove those cached instances.