public IEntitySubscription SubscribeEntityEvent(Guid entityId, Action callback) { var subscription = new EntityNotificationSubscription <TContext>(entityId, this, callback); _subscriptions.AddSubscription(subscription); _logger.LogDebug($"Subscribing entity event -> {entityId} -> subscription {subscription.SubscriptionId}"); return(subscription); }
internal void Destroy(EntityNotificationSubscription <TContext> subscription) { _logger.LogWarning($"Destroying subscription for entity -> {subscription.EntityId} -> Subscriptoon {subscription.SubscriptionId}"); _subscriptions.RemoveSubscription(subscription); }
internal void Unsubscribe(EntityNotificationSubscription <TContext> subscription) { _logger.LogDebug($"Canceling subscription for entity -> {subscription.EntityId} -> Subscriptoon {subscription.SubscriptionId}"); _subscriptions.RemoveSubscription(subscription); }