public override IEnumerable <TDataType> Snapshot(AdapterReaderQos qos, QueryParameters queryParameters) { var waitHandle = new ManualResetEvent(false); using (var callback = new SnapshotCallback(waitHandle)) { using ( var subcriber = new Subscriber <TDataType>(topic, queryParameters.Partition, qos, callback.Listener, 1000)) { waitHandle.WaitOne(Constants.RequestTimeout); return(callback.DataItems); } } }
public Guid Subscribe(FirebasePath path, string eventName, SnapshotCallback callback, object context, bool once, IEnumerable <ISubscriptionFilter> filters) { var sub = new Subscription(_app, filters) { Event = eventName, Callback = callback, Context = context, Once = once, Path = path, }; if (!once) { lock (_lock) { _subscriptions.Add(sub); } } _syncDb.ExecuteInitial(sub); return(sub.SubscriptionId); }
public Guid Subscribe(FirebasePath path, string eventName, SnapshotCallback callback, object context, bool once, IEnumerable<ISubscriptionFilter> filters) { var sub = new Subscription(_app, filters) { Event = eventName, Callback = callback, Context = context, Once = once, Path = path, }; if (!once) { lock (_lock) { _subscriptions.Add(sub); } } _syncDb.ExecuteInitial(sub); return sub.SubscriptionId; }
internal Guid SubscribeOnce(string eventName, FirebasePath path, SnapshotCallback callback, object context, IEnumerable<ISubscriptionFilter> filters, FirebaseStatusCallback cancelledCallback) { return _subscriptions.Subscribe(path, eventName, callback, context, true, filters); }
public IFirebaseReadonlyQuery Once(string eventName, SnapshotCallback callback, object context, FirebaseStatusCallback cancelledCallback = null) { return(CreateQuery().Once(eventName, callback, context, cancelledCallback)); }
internal Guid Subscribe(string eventName, FirebasePath path, SnapshotCallback callback, object context, IEnumerable<ISubscriptionFilter> filters) { return _subscriptions.Subscribe(path, eventName, callback, context, false, filters); }
internal void Fire(SnapshotCallback callback, DataSnapshot snap, object context) { _subProcessor.Add(callback, snap, context); }
public IFirebaseReadonlyQuery On(string eventName, SnapshotCallback callback, object context) { return(CreateQuery().On(eventName, callback, context)); }
public IFirebaseReadonlyQuery Once(string eventName, SnapshotCallback callback, object context, FirebaseStatusCallback cancelledCallback = null) { return CreateQuery().Once(eventName, callback, context, cancelledCallback); }
internal Guid SubscribeOnce(string eventName, FirebasePath path, SnapshotCallback callback, object context, IEnumerable <ISubscriptionFilter> filters, FirebaseStatusCallback cancelledCallback) { return(_subscriptions.Subscribe(path, eventName, callback, context, true, filters)); }
public IFirebaseReadonlyQuery On(string eventName, SnapshotCallback callback) { return On(eventName, callback, null); }
public IFirebaseReadonlyQuery Once(string eventName, SnapshotCallback callback, FirebaseStatusCallback cancelledCallback = null) { return Once(eventName, callback, null, cancelledCallback); }
public IFirebaseReadonlyQuery On(string eventName, SnapshotCallback callback, object context) { _queryId = _app.Subscribe(eventName, _path, callback, context, _filters); return(this); }
public IFirebaseReadonlyQuery Once(string eventName, SnapshotCallback callback, FirebaseStatusCallback cancelledCallback = null) { return(Once(eventName, callback, null, cancelledCallback)); }
public IFirebaseReadonlyQuery On(string eventName, SnapshotCallback callback) { return(On(eventName, callback, null)); }
public void Add(SnapshotCallback callback, DataSnapshot snap, object context) { EnsureStarted(); _queue.Enqueue(_token, new QueueSubscriptionEvent(callback, snap, context)); }
public IFirebaseReadonlyQuery On(string eventName, SnapshotCallback callback, object context) { return CreateQuery().On(eventName, callback, context); }
public IFirebaseReadonlyQuery Once(string eventName, SnapshotCallback callback, object context, FirebaseStatusCallback cancelledCallback = null) { _queryId = _app.SubscribeOnce(eventName, _path, callback, context, _filters, cancelledCallback); return(this); }
public QueueSubscriptionEvent(SnapshotCallback callback, DataSnapshot snap, object context) { _callback = callback; _snap = snap; _context = context; }
public IFirebaseReadonlyQuery On(string eventName, SnapshotCallback callback, object context) { _queryId = _app.Subscribe(eventName, _path, callback, context, _filters); return this; }
public IFirebaseReadonlyQuery Once(string eventName, SnapshotCallback callback, object context, FirebaseStatusCallback cancelledCallback = null) { _queryId = _app.SubscribeOnce(eventName, _path, callback, context, _filters, cancelledCallback); return this; }
internal Guid Subscribe(string eventName, FirebasePath path, SnapshotCallback callback, object context, IEnumerable <ISubscriptionFilter> filters) { return(_subscriptions.Subscribe(path, eventName, callback, context, false, filters)); }