//add a CacheInfoItem to the collection
 public void Add(string key, CacheInfoItem cacheinfoitem)
 {
     this.Dictionary.Add(key, cacheinfoitem);
 }
        private void SingleCache_OnCachedSuccess(object sender, EventArgs e, ArrayList message)
        {
            //
            EventArgs e1=new EventArgs();

            string SP=(sender as ZefaniaCache).GetPathToModul;
            string IP=(sender as ZefaniaCache).GetInfoPath;

            CacheInfoItem CII=new CacheInfoItem(IP,false);

            if(FCacheInfoDictionary.Contains(CII.Sourcepath)){FCacheInfoDictionary.Remove(CII.Sourcepath);}

            FCacheInfoDictionary.Add(SP,CII);

            if(OnCacheFinished!=null)
            {
                OnCacheFinished(sender,e,message[0].ToString());
            }
        }
        /// <summary>
        ///  Das <see cref="CacheInfoItemDictionary"/> updaten und optional die MD5-Hashwerte checken
        /// </summary>
        /// <param name="checkMd5">Wenn true, MD5 checken</param>
        private void RefreshCacheItemsList(bool checkMd5)
        {
            EventArgs e1=new EventArgs();
            try
            {
                FCacheInfoDictionary.Clear();
                foreach(string InfoPath in FCachedInfoFilesPaths)
                {
                    CacheInfoItem CI=new CacheInfoItem(InfoPath,checkMd5);

                    if(FCacheInfoDictionary.Contains(CI.Sourcepath)){FCacheInfoDictionary.Remove(CI.Sourcepath);}

                    FCacheInfoDictionary.Add(CI.Sourcepath,CI);

                    if(OnBuildListsProgress!=null)
                    {
                        OnBuildListsProgress(this,e1,CI.Title);
                    }
                }

                foreach(string ModulPath in FIncomingModulPaths)
                {
                    if(!CacheInfoDictionary.Contains(ModulPath))
                    {
                        CacheInfoItem CII=new CacheInfoItem(ModulPath,checkMd5);

                        FCacheInfoDictionary.Add(CII.Sourcepath,CII);
                        if(OnBuildListsProgress!=null)
                        {
                            OnBuildListsProgress(this,e1,CII.Title);
                        }
                    }
                }
            }

            catch(Exception e)
            {
            }
        }
        /// <summary>
        /// Entfernt ein <see cref="CacheInfoItem"/> anhand des des info.xml Pfades des Cache aus dem <see cref="CacheRequestDictionary"/>.
        /// </summary>
        /// <param name="infoFilePath">Pfad zur info.xml Datei des Caches</param>
        private void RemoveModulFromCacheRequestDictionary(string infoFilePath)
        {
            try
            {
                CacheInfoItem CI=new CacheInfoItem(infoFilePath,false);
                if(FCacheRequestDictionary.Contains(CI.Sourcepath)){FCacheRequestDictionary.Remove(CI.Sourcepath);}

            }
            catch(Exception e)
            {
            }
        }
        /// <summary>
        /// Fügt ein <see cref="CacheInfoItem"/> anhand des des info.xml Pfades des Cache in das <see cref="CacheInfoItemDictionary"/>
        /// </summary>
        /// <param name="infoFilePath">Pfad zur info.xml Datei des Caches</param>
        private void AddCacheToModulDictionary(string infoFilePath)
        {
            try
            {
                CacheInfoItem CI=new CacheInfoItem(infoFilePath,false);
                if(FCacheInfoDictionary.Contains(CI.Sourcepath)){FCacheInfoDictionary.Remove(CI.Sourcepath);}
                FCacheInfoDictionary.Add(CI.Sourcepath,CI);

            }
            catch(Exception e)
            {
            }
        }