Exemplo n.º 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;
		}
Exemplo n.º 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;
 }
Exemplo n.º 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);
		}
Exemplo n.º 4
0
			public PerTimeSlotWindow(DateTime baseTime, int timeSlot)
			{
				this.TimeSlot = new BoundedInteger(timeSlot, 1, 0x7fffffff);
				this.Reset(baseTime, timeSlot);
			}
Exemplo n.º 5
0
 public BoundedResetList(int listSize)
 {
     this.listSize = new BoundedInteger(listSize, 1, 0x7fffffff);
     this.list     = new List <TItem>();
 }
Exemplo n.º 6
0
 public PerTimeSlotWindow(DateTime baseTime, int timeSlot)
 {
     this.TimeSlot = new BoundedInteger(timeSlot, 1, 0x7fffffff);
     this.Reset(baseTime, timeSlot);
 }