Esempio n. 1
0
 private static ModalityPerformedProcedureStepIod GetCachedMppsIod(ServerAssociationParameters association ,string cacheKeyId)
 {
     ListDictionary mppsAssociationList;
     if (_mppsCache.TryGetValue(association.GetHashCode(), out mppsAssociationList))
     {
          if (mppsAssociationList.Contains(cacheKeyId))
              return mppsAssociationList[cacheKeyId] as ModalityPerformedProcedureStepIod;
          else 
              return null;
     }
     return null;
 }
Esempio n. 2
0
 private static void RemoveAllAssociationMppsFromCache(ServerAssociationParameters association)
 {
     ListDictionary mppsAssociationList;
     if (_mppsCache.TryGetValue(association.GetHashCode(), out mppsAssociationList))
     {
         mppsAssociationList.Clear();
         _mppsCache.Remove(association.GetHashCode());
     }
 }
Esempio n. 3
0
        private static void CacheMppsEntity(ServerAssociationParameters association,
                                            string key,
                                            ModalityPerformedProcedureStepIod ie,
                                            out bool alreadyCached)
        {
            alreadyCached = false;
            ListDictionary mppsAssociationList;
            if (_mppsCache.TryGetValue(association.GetHashCode(), out mppsAssociationList))
            {
                if (mppsAssociationList.Contains(key))
                    alreadyCached = true;
                else
                    mppsAssociationList.Add(key, ie);
            }
            else
            {
                ListDictionary newList = new ListDictionary();
                newList.Add(key, ie);
                _mppsCache.Add(association.GetHashCode(), newList);
            }

        }
Esempio n. 4
0
        private static void RemoveMppsEntityFromCache(ServerAssociationParameters association, string key)
        {
            ListDictionary mppsAssociationList;
            if (_mppsCache.TryGetValue(association.GetHashCode(), out mppsAssociationList))
            {
                if (mppsAssociationList.Contains(key))
                    mppsAssociationList.Remove(key);
            }

        }
Esempio n. 5
0
 private static bool IsMppsEntitycached(ServerAssociationParameters association, string key)
 {
     ListDictionary mppsAssociationList;
     if (_mppsCache.TryGetValue(association.GetHashCode(), out mppsAssociationList))
         return false;
     else
         return mppsAssociationList.Contains(key);
 }