Example #1
0
        protected static ReadModelUpdatedMessage Enhance(ReadModelUpdatedMessage message, string[] topics = null)
        {
            if (topics != null)
            {
                message.Topics = topics;
                return(message);
            }

            if (message.ReadModel is ITopicsProvider topicsProvider)
            {
                message.Topics = topicsProvider.GetTopics().ToArray();
            }

            return(message);
        }
Example #2
0
 public static ReadModelUpdatedMessage Updated <T, TKey>(T document) where T : IReadModelEx <TKey>
 {
     return(ReadModelUpdatedMessage.Updated <T, TKey>(document.Id, document));
 }