Closed mwpowellhtx closed 4 years ago
On the other hand, maintaining the Dictionary
, EO
approach, would need to reconsider the DeltaDays
provider naming convention. It should be fairly straightforward to ensure a unique name on that one, perhaps involving an actual Days delta.
This in the queue will probably solve the issue.
/// <summary>
/// Gets the Actual Days involved during the Change attempt.
/// </summary>
internal int ActualDaysValue => (ProtectedTimestamp - BaseTimestamp).Days + 1;
/// <summary>
/// Gets the Provider Name.
/// </summary>
/// <see cref="ActualDaysValue"/>
/// <inheritdoc />
public sealed override string Name => $"{ActualDaysValue} Days Since {BaseTimestamp:d}";
/// <summary>
/// Performs the Provider Strategy.
/// </summary>
/// <param name="current"></param>
/// <param name="result"></param>
/// <returns></returns>
/// <see cref="ActualDaysValue"/>
/// <inheritdoc />
public sealed override bool TryChange(string current, out string result) => Changed = (result = $"{ActualDaysValue % MaxValue}") != current;
We think this has been resolved. Put tests in to verify that the keys and therefore the IVersionProvider.Name
instances are all unique.
Rethink Name based dictionary keyed Version Providers. May instead consider whether positional keys, literally,
Major
,Minor
,Patch
,Build
, etc. In fact, may wonder whether dictionary is necessary after all. Would also need to rethink what we were doing with thedynamic Registry
, usage such asRegistry.Unknown
andRegistry.NoOp
, etc.