private async Task AlertLongPollWaiterAsync(InboxEntity inbox)
{
Requires.NotNull(inbox, "inbox");
await this.PushNotifyInboxMessageAsync(inbox);
var id = inbox.RowKey;
TaskCompletionSource<object> tcs;
lock (LongPollWaiters)
{
if (LongPollWaiters.TryGetValue(id, out tcs))
{
LongPollWaiters.Remove(id);
}
}
if (tcs != null)
{
tcs.TrySetResult(null);
}
}