Tim Van Wassenhove

Passionate geek, interested in Technology. Proud father of two

23 Sep 2008

Refactoring EffectivityManager

A while ago i presented the EffectivityManager. Having used this class for a while i have decided to rename it to Temporal. The implementation of IList is not required anymore because a user is typically only interested in a specific effectivity, not the evolution of the effectivities.

public interface ITemporal<T>
{
	void Modify(T element, DateTime from);
	IEffectivity<T> GetSnapshot(DateTime validityDate);
	bool TryGetSnapshot(DateTime validityDate, out IEffectivity<T> effectivity);
}

In the implementation i have added a constructor that accepts a DiscreteValuesGenerator which makes it possible to create Periods with a resolution of a day instead of seconds.