コード例 #1
0
 public void             SetSeqNumber(UInt32 nodeId, UInt64 seq)
 {
     for (int i = 0; i < lastRequests.Count; ++i)
     {
         if (lastRequests[i].nodeId == nodeId)
         {
             var newDesc = new LastRequest();
             newDesc.number  = seq;
             newDesc.nodeId  = nodeId;
             lastRequests[i] = newDesc;
         }
     }
 }
コード例 #2
0
        public void CreateToken()
        {
            Token token = new Token();

            foreach (var item in m_requestNumbers)
            {
                var lastRequest = new LastRequest();
                lastRequest.nodeId = item.Key;
                lastRequest.number = item.Value;

                token.LastRequests.Add(lastRequest);
            }

            lock ( m_tokenLock )
            {
                m_token = token;
            }

            LogMessage(this, "Created token");
        }