Example #1
0
        internal EventRootResponse(HttpResponseMessage httpResponse, ValueRootAddedEventHandler <T> added, IRequestManager requestManager, string path)
        {
            _added          = added;
            _requestManager = requestManager;
            _path           = path;

            _cancel      = new CancellationTokenSource();
            _pollingTask = ReadLoop(httpResponse, _cancel.Token);
        }
Example #2
0
 public async Task <EventRootResponse <T> > OnChangeGetAsync <T>(string path, ValueRootAddedEventHandler <T> added = null)
 {
     return(new EventRootResponse <T>(await _requestManager.ListenAsync(path).ConfigureAwait(false), added, _requestManager, path));
 }
Example #3
0
 public Task <EventRootResponse <T> > OnChange <T>(string path, ValueRootAddedEventHandler <T> added = null)
 {
     return(_firebaseClient.OnChangeGetAsync(path, added));
 }