예제 #1
0
 public virtual Release Release(Request request)
 {
     var release = new Release(Environment, request, TriggerRequest);
       ReleaseQueue.Enqueue(release);
       TriggerRelease();
       return release;
 }
예제 #2
0
 public Release(Environment environment, Request request, Action<Event> callback)
   : base(environment) {
   Request = request;
   CallbackList.Add(callback);
 }
예제 #3
0
 protected virtual void DoRequest(Request request) {
   if (Users.Count < Capacity) {
     Users.Add(request);
     request.Succeed();
   }
 }
예제 #4
0
 public virtual Request Request() {
   var request = new Request(Environment, TriggerRelease, DisposeCallback);
   RequestQueue.AddLast(request);
   TriggerRequest();
   return request;
 }