コード例 #1
0
ファイル: MessageStore.cs プロジェクト: 4deeptech/lokad-cqrs
 public StoreRecord(string key, object[] items, long storeVersion, long streamVersion,MessageAttribute[] attributes)
 {
     Items = items;
     StoreVersion = storeVersion;
     StreamVersion = streamVersion;
     Key = key;
     Attributes = attributes;
 }
コード例 #2
0
ファイル: MessageSender.cs プロジェクト: AigizK/lokad-cqrs
 string GenerateSha1HashFromContent(object message, MessageAttribute[] attributes)
 {
     // we need to set ID and date to fixed
     var envelope = new ImmutableEnvelope("", default(DateTime), message, attributes);
     var data = _streamer.SaveEnvelopeData(envelope);
     using (var sha1 = new SHA1Managed())
     {
         var hash = sha1.ComputeHash(data);
         return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
     }
 }
コード例 #3
0
        public ImmutableEnvelope(string envelopeId, DateTime createdUtc, object message, MessageAttribute[] attributes)
        {
            EnvelopeId = envelopeId;
            Message    = message;
            CreatedUtc = createdUtc;

            if (null == attributes)
            {
                Attributes = MessageAttribute.Empty;
            }
            else
            {
                // just ensuring that we have an immutable copy
                var copy = new MessageAttribute[attributes.Length];
                Array.Copy(attributes, copy, attributes.Length);
                Attributes = copy;
            }
        }
コード例 #4
0
        public ImmutableEnvelope(string envelopeId, DateTime createdUtc, object message, MessageAttribute[] attributes)
        {
            
            EnvelopeId = envelopeId;
            Message = message;
            CreatedUtc = createdUtc;

            if (null == attributes)
            {
                Attributes = MessageAttribute.Empty;
            }
            else
            {
                // just ensuring that we have an immutable copy
                var copy = new MessageAttribute[attributes.Length];
                Array.Copy(attributes, copy, attributes.Length);
                Attributes = copy;
            }
        }
コード例 #5
0
 public void PublishFromClientHashed(IFuncEvent e, MessageAttribute[] attributes)
 {
     _functionalRecorder.SendHashed(e, attributes);
 }
コード例 #6
0
 public void SendFromClient(ICommand e, string id, MessageAttribute[] attributes)
 {
     _commandRouter.Send(e, id, attributes);
 }