Example #1
0
		public PswsTimer(ElapsedEventHandler elapsedEventHandler, int timeout, bool continuous, bool startAtCreation)
		{
			this.timeout = new BoundedInteger(timeout, 1, 0x7fffffff);
			this.elapsedEventHandler = elapsedEventHandler;
			this.continuous = continuous;
			this.timer = PswsTimer.CreateTimer(elapsedEventHandler, this.timeout.Value, this.continuous, startAtCreation);
			this.disposed = false;
		}
Example #2
0
 public PswsTimer(ElapsedEventHandler elapsedEventHandler, int timeout, bool continuous, bool startAtCreation)
 {
     this.timeout             = new BoundedInteger(timeout, 1, 0x7fffffff);
     this.elapsedEventHandler = elapsedEventHandler;
     this.continuous          = continuous;
     this.timer    = PswsTimer.CreateTimer(elapsedEventHandler, this.timeout.Value, this.continuous, startAtCreation);
     this.disposed = false;
 }
Example #3
0
		public UserQuota(int maxConcurrentRequests, int maxRequestsPerTimeSlot, int timeSlotSize)
		{
			this.maxConcurrentRequests = new BoundedInteger(maxConcurrentRequests, 1, 0x7fffffff);
			this.timeSlotSize = new BoundedInteger(timeSlotSize, 1, 0x7fffffff);
			this.maxRequestsPerTimeSlot = new BoundedInteger(maxRequestsPerTimeSlot, 1, 0x7fffffff);
		}
Example #4
0
			public PerTimeSlotWindow(DateTime baseTime, int timeSlot)
			{
				this.TimeSlot = new BoundedInteger(timeSlot, 1, 0x7fffffff);
				this.Reset(baseTime, timeSlot);
			}
Example #5
0
 public BoundedResetList(int listSize)
 {
     this.listSize = new BoundedInteger(listSize, 1, 0x7fffffff);
     this.list     = new List <TItem>();
 }
Example #6
0
 public PerTimeSlotWindow(DateTime baseTime, int timeSlot)
 {
     this.TimeSlot = new BoundedInteger(timeSlot, 1, 0x7fffffff);
     this.Reset(baseTime, timeSlot);
 }