public Subscription Subscribe(Guid device, SubscriptionCallback callback) { return Subscribe(device, -1, callback); }
public Subscription Subscribe(Guid device, short service, SubscriptionCallback callback) { if (callback == null || service == 0) throw new ArgumentException(); Subscription subscription = base.Subscribe(device, service); if (subscription != null) { subscriptions[subscription.Guid] = subscription; subscriptions_callbacks[subscription.Guid] = callback; } return subscription; }
public static EventRaisedConstraint <TEventArg> RaiseWith <TEventArg>( SubscriptionCallback <TEventArg> subscription) { return(new EventRaisedConstraint <TEventArg>(subscription)); }
private void sendButton_Click(object sender, EventArgs e) { subscriptionCallback = () => { JObject msg = new JObject(); JObject msg2 = new JObject(); DesktopUtils.updateJSONValue(msg, "data", dataTextBox.Text); DesktopUtils.updateJSONValue(msg2, "topic", "incoming-data"); DesktopUtils.updateJSONValue(msg2, "message", dataTextBox.Text); interAppBus_.send("exceladapter", "update", msg2); interAppBus_.send(htmlDemoUuid_, topicTextBox.Text, msg); }; if (subscriptionMap.ContainsKey(topicTextBox.Text)) { subscriptionCallback(); } else { JObject msg = new JObject(); DesktopUtils.updateJSONValue(msg, "topic", topicTextBox.Text); interAppBus_.send("htmlinterappcommdemo", "new-topic", msg); } }
public static EventRaisedConstraint Raise(SubscriptionCallback subscription) { return(new EventRaisedConstraint(subscription)); }
public CacheSubscription(ISubscription subscription, CoreItemCacheParams cacheParams, SubscriptionCallback userCallback, object userContext) { Subscription = subscription; CacheParams = cacheParams; UserCallback = userCallback; UserContext = userContext; }
public ISubscription SubscribeNewOnly <T>(IExpression filter, SubscriptionCallback userCallback, object userContext) { return(SubscribePrivate(typeof(T), filter, true, false, false, userCallback, userContext)); }
public ISubscription Subscribe <T>(IExpression whereExpr, SubscriptionCallback userCallback, object userContext) { return(SubscribePrivate(typeof(T), whereExpr, false, true, false, userCallback, userContext)); }
public ISubscription Subscribe(Type dataType, IExpression whereExpr, SubscriptionCallback userCallback, object userContext) { return(SubscribePrivate(dataType, whereExpr, false, true, false, userCallback, userContext)); }