public IPromise EnqueueRequest(IMessage message, ICallbackPoint callbackPoint, TimeSpan expireAfter) { return InternalEnqueueRequest(message, callbackPoint, expireAfter); }
private IPromise InternalEnqueueRequest(IMessage message, ICallbackPoint callbackPoint, TimeSpan? expireAfter = null) { hubRegistered.Wait(); var promise = (expireAfter != null) ? new Promise(expireAfter.Value) : new Promise(); registrationsQueue.Add(new CallbackRegistration { Message = message, Promise = promise, CallbackPoint = callbackPoint }); return promise; }
public IPromise EnqueueRequest(IMessage message, ICallbackPoint callbackPoint) { return InternalEnqueueRequest(message, callbackPoint); }