I’ve already presented a Generic Effectivity. Offcourse, managing all these effectivities (versions of data) can be handled in a generic way too. A bit of experience mixed with Patterns for things that change with time allowed me to come up with the following interface:
public interface IEffectivityManager<t> : IList<ieffectivity<t>>
{
IEffectivity<t> Add(T t, DateTime begin);
IEffectivity<t> GetSnapshot(DateTime validityDate);
bool TryGetSnapshot(DateTime validityDate, out IEffectivity<t> effectivity);
}
Feel free to download IEffectivityManager.txt, EffectivityManager.txt and EffectivityManagerTester.txt.
1 Comments.