Esempio n. 1
0
        public bool IsModified(String className, String hash)
        {
            bool isModified = true;

            PluginCacheEntry pluginEntry = this.Entries.FirstOrDefault(entry => entry.ClassName == className);

            if (pluginEntry != null)
            {
                isModified = String.Compare(pluginEntry.Hash, hash, StringComparison.OrdinalIgnoreCase) != 0;
            }

            return(isModified);
        }
Esempio n. 2
0
        public void Cache(PluginCacheEntry entry) {
            PluginCacheEntry pluginEntry = null;

            do {
                pluginEntry = this.Entries.FirstOrDefault(e => e.ClassName == entry.ClassName);

                if (pluginEntry != null) {
                    this.Entries.Remove(pluginEntry);
                }

            } while (pluginEntry != null);
            
            this.Entries.Add(entry);
        }
Esempio n. 3
0
        public void Cache(PluginCacheEntry entry)
        {
            PluginCacheEntry pluginEntry = null;

            do
            {
                pluginEntry = this.Entries.FirstOrDefault(e => e.ClassName == entry.ClassName);

                if (pluginEntry != null)
                {
                    this.Entries.Remove(pluginEntry);
                }
            } while (pluginEntry != null);

            this.Entries.Add(entry);
        }