Exemple #1
0
        public static List <T> GetAll <T>(string contextName)
            where T : class
        {
            var messages = MockBusQueues.Gets <CacheMessage>(contextName);

            return(messages.Where(x => x.ContentType == typeof(T).Name).Select(x => x.Content.JsonDeserialize <T>()).ToList());
        }
 public void Enqueue <T>(string contextName, T message)
     where T : class, IBusMessage
 {
     contextName = contextName ?? ContextName;
     MockBusQueues.Enqueue(contextName, message);
 }