Exemplo n.º 1
0
        public override string ToString()
        {
            string sourcesMessage = _eventsSources != null?_eventsSources.Count.ToString() : string.Empty;

            return(base.ToString() + ", senderId[" + SenderId.ToString() + "], sources count [" +
                   sourcesMessage + "]");
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            var result        = new StringBuilder();
            var currentSender = Sender is null
                ? $"SenderId: {SenderId.ToString()}"
                : Sender.ToString();

            result.AppendLine($"{currentSender}:");
            if (!(ReplyMessage is null))
            {
                var sender = ReplyMessage.Sender is null
                    ? $"SenderId: {ReplyMessage.SenderId.ToString()}"
                    : ReplyMessage.Sender.ToString();
                result.AppendLine($"| {sender}:");
                foreach (var row in ReplyMessage.Text.Split('\n'))
                {
                    result.AppendLine($"| {row}");
                }
                result.AppendLine($"| {ReplyMessage.Date}  Mark: {ReplyMessage.Mark}");
            }

            result.AppendLine(Text);
            result.AppendLine($"{Date}  Mark: {Mark}");
            return(result.ToString());
        }
Exemplo n.º 3
0
 public override string ToString()
 {
     return(String.Format(
                "{0}[{1}]:S{{0x{2}}}|R{{0x{3}}}{4}",
                CommandId,
                CommandStatus,
                SenderId.ToString("X"),
                ReceiverId.ToString("X"),
                _packetBytes == null ? "" : string.Format("[Len:{0}]", _packetBytes.Length)));
 }
Exemplo n.º 4
0
        public byte[] ToByteArray()
        {
            string stringresult = SenderId.ToString() + " " + Message + " " + ReceiverId.ToString();

            return(Encoding.ASCII.GetBytes(stringresult));
        }
Exemplo n.º 5
0
        }                                 //kwota przelewu


        public override string ToString() //przeciazenie metody do string
        {
            return("\n##OD: " + SenderId.ToString() + " DLA: " + RecipientId.ToString() + " KWOTA: " + Amount.ToString() + "##");
        }
Exemplo n.º 6
0
        public void Handle(MessageHandled message)
        {
            if (_configuration.PeerIdsToInvestigate != null && _configuration.PeerIdsToInvestigate.Contains(Context !.SenderId.ToString()))
            {
                _log.Info($"Ack received from peer {Context.SenderId}. MessageId: {message.MessageId}");
            }

            _inMemoryMessageMatcher.EnqueueAck(Context !.SenderId, message.MessageId);

            var activeMessageReplayer = _messageReplayerRepository.GetActiveMessageReplayer(Context.SenderId);

            activeMessageReplayer?.Handle(message);
        }