public IAsyncResult BeginPoll(string device, string operation, AsyncCallback callback, object state) { var pollCompletionSource = new PollCompletionSource(device, operation, callback, state); NotificationListener.Create().Register(device, operation, pollCompletionSource); return(pollCompletionSource.Task); }
public void UnregisterAll() { NotificationListener.Create().Dispose(); }