예제 #1
0
 public bool CheckItsStillInTheStore(string messageId)
 {
     using (var store = new EsentStore <T>(EsentInstanceService.Service.EsentInstance))
     {
         Repository <T> repository = new Repository <T>((IEsentStore <T>)store);
         var            result     = repository.PeekForMessage(messageId);
         return(result);
     }
 }
예제 #2
0
        public int?Save <T>(byte[] messageAsBytes)
        {
            using (var store = new EsentStore <T>(this.instance))
            {
                Repository <T> repository = new Repository <T>((IEsentStore <T>)store);

                var result = repository.SavePayload(messageAsBytes, Writer.CleanupName(typeof(T).ToString()));
                return(result);
            }
            //Writeline("Got message as bytes: " + messageAsBytes.ToString());
            //return 1;
        }