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