Exemplo n.º 1
0
        public async Task AddSubscriberAsync <TMessage>(MessageSubscriber <TMessage> messageSubscriber)
            where TMessage : Message
        {
            var subscriberKey = exchangeSubscribersResolver.GetSubscriberKey <TMessage>();
            var serialized    = messageSerializer.Serialize(messageSubscriber.MessageSubscriberInfo);

            await database.SetAddAsync(subscriberKey, serialized);
        }
Exemplo n.º 2
0
 public async Task AddSubscriberAsync <T>(Subscriber <T> subScriber) where T : class
 {
     var subscriberKey = _exchangeSubscribersResolver.GetSubscriberKey <T>();
     var wasSuccessful = await _cacheClient.SetAddAsync <SubscriberInfo>(subscriberKey, subScriber.SubscriberInfo);
 }