Ejemplo n.º 1
0
 /// <summary>
 /// Removes the settings for given plugin from the cache.
 /// </summary>
 /// <param name="plugin">The plugin to remove the cached settings for.</param>
 public void RemovePluginSettings(TextPlugin plugin)
 {
     _cache.Remove(CacheKeys.PluginSettingsKey(plugin));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the plugin settings.
 /// </summary>
 /// <param name="plugin">The text plugin.</param>
 /// <returns>
 /// Returns the <see cref="Settings" /> or null if the plugin is not in the cache.
 /// </returns>
 public PluginSettings GetPluginSettings(TextPlugin plugin)
 {
     return(_cache.Get(CacheKeys.PluginSettingsKey(plugin)) as PluginSettings);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Updates the plugin settings.
 /// </summary>
 /// <param name="plugin">The text plugin.</param>
 public void UpdatePluginSettings(TextPlugin plugin)
 {
     _cache.Remove(CacheKeys.PluginSettingsKey(plugin));
     _cache.Add(CacheKeys.PluginSettingsKey(plugin), plugin.Settings, new CacheItemPolicy());
 }