public bool ProcessSubscriptionData(RtmSubscriptionData data) { Log.V("Processing subscription data, subscription: {0}, data: {1}", this, data); if (_state.ProcessSubscriptionData(data) != null) { this.NotifySubscriptionData(data); return(true); } return(false); }
public State ProcessSubscriptionData(RtmSubscriptionData data) { Log.V("Processing subscription data, state: {0}, data: {1}", this, data); if (IsSubscribed) { if (_awaiter.IsCompleted) { Log.V("Subscription data ignored because state is completed, state: {0}, data: {1}", this, data); return(null); } if (_fsm.IsTrackPosition) { _fsm.Position = data.Position; } return(this); } Log.V("Subscription data ignored because state is not subscribed state, state: {0}, data: {1}", this, data); return(null); }
public void OnSubscriptionData(ISubscription subscription, RtmSubscriptionData data) { _observers.NotifySubscriptionData(subscription, data); }
void ISubscriptionObserver.OnSubscriptionData(ISubscription subscription, RtmSubscriptionData data) { OnSubscriptionData.InvokeSafe(subscription, data); }
public static void NotifySubscriptionData(this SubscriptionFuture future, RtmSubscriptionData data) { future?.Observer.NotifySubscriptionData(future, data); }
public static void NotifySubscriptionData(this IEnumerable <ISubscriptionObserver> observers, ISubscription subscription, RtmSubscriptionData data) { if (observers == null) { return; } foreach (var observer in observers) { try { observer.OnSubscriptionData(subscription, data); } catch (Exception ex) { UnhandledExceptionWatcher.Swallow(ex); } } }
public static void NotifySubscriptionData(this ISubscriptionObserver observer, ISubscription subscription, RtmSubscriptionData data) { if (observer != null) { observer.OnSubscriptionData(subscription, data); } }