Exemplo n.º 1
0
 /// <summary>
 /// Creates a new cache of ground positions, backed by the given timer.
 /// </summary>
 /// <param name="timer">The timer to use to determine when to clear the cache.</param>
 /// <exception cref="ArgumentNullException">If timer is null.</exception>
 public GroundPositionCache(ICacheTimer timer)
 {
     if (timer == null)
     {
         throw new ArgumentNullException("timer", "The given timer must not be null");
     }
     this.timer = timer;
 }
 public void Setup()
 {
     tick       = 0;
     cacheTimer = new CacheTimer(CACHE_PERSISTANCE, GetTick);
 }