/// <summary>
 /// 是否可以通知
 /// </summary>
 public Boolean IsCanNotify(String address, ushort sequenceNumber, int repeatCounter)
 {
     RepeatedPackage repeated = new RepeatedPackage();
     String key = GenerateKey(address, sequenceNumber);
     Boolean isContainer = IsContainer(key, out repeated);
     return ProcessStrategy(isContainer, repeated, key, repeatCounter);
 }
 private void AddRepeatedPackage(String key, RepeatedPackage repeated)
 {
     repeated.RepatedCounter = 1;
     repeated.Timestamp = DateTime.Now;
     m_Packages.Add(key, repeated);
 }
 private Boolean ProcessStrategy(Boolean isContainer, RepeatedPackage repeated,
     String key, int repeatCounter)
 {
     Boolean result = false;
     if (isContainer == true && repeated.RepatedCounter < repeatCounter)
     {
         UpdateRepeatedPackage(key, repeated);
         result = true;
     }
     else if (isContainer == true && repeated.RepatedCounter >= repeatCounter)
     {
         UpdateRepeatedPackage(key, repeated);
         m_logger.Info("Repeated Package Key : " + key + " Timestamp : " + repeated.Timestamp + " Counter : " + repeated.RepatedCounter);
         result = false;
     }
     else if (isContainer == false)
     {
         RemoveTooManyRepeatedPackages();
         AddRepeatedPackage(key, repeated);
         result = true;
     }
     return result;
 }
 private void UpdateRepeatedPackage(String key, RepeatedPackage repeated)
 {
     repeated.RepatedCounter = repeated.RepatedCounter + 1;
     repeated.Timestamp = DateTime.Now;
     m_Packages.Update(key, repeated);
 }
 private Boolean IsContainer(String key, out RepeatedPackage repeated)
 {
     Boolean result = false;
     repeated = new RepeatedPackage();
     if (m_Packages.ContainsKey(key))
     {
         result = true;
         m_Packages.TryGetValue(key, out repeated);
     }
     return result;
 }