示例#1
0
        public NexoPartner(TcpClient tcp, MessageHeaderType mh)
        {
            SaleID   = new NexoSaleID(CMisc.AsString(mh.SaleID));
            POIID    = new NexoPOIID(CMisc.AsString(mh.POIID));
            EndPoint = new NexoEndPoint(tcp);

            _sessions = new NexoListOfSessions("SESSIONS");
            _messages = new NexoDictionaryOfMessages();

#if NET35
            Sessions = _sessions;
            Messages = _messages;
#else
            Sessions = new ReadOnlyCollection <NexoSession>(_sessions);
            Messages = new ReadOnlyDictionary <string, NexoMessage>(_messages);
#endif

            Timestamp   = DateTime.Now;
            Key         = GetKey(this);
            Description = GetDescription();
        }
示例#2
0
 public static string GetKey(NexoEndPoint o)
 {
     return(o.IP.ToString());
 }