Class XmlPluginCache
Default implementation of the plug-in cache interface (see IPluginCache) that stores plug-in state into an xml file.
Inheritance
System.Object
XmlPluginCache
Implements
Namespace: Sdl.Core.PluginFramework
Assembly: Sdl.Core.PluginFramework.dll
Syntax
public class XmlPluginCache : Object, IPluginCache
Constructors
XmlPluginCache(String)
Constructs a plug-in cache using the specified path for persisting plug-in state.
Declaration
public XmlPluginCache(string pluginCacheFilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginCacheFilePath | The path to a plug-in cache xml file. A new file is created if it does not exist yet. |
Properties
PluginCacheFilePath
Gets the file path of the plug-in cache xml file.
Declaration
public string PluginCacheFilePath { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
GetPluginState(String)
Gets the plug-in state of the plug-in with the specified id.
Declaration
public PluginState GetPluginState(string pluginId)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginId | The id of the plug-in for which to get the state. |
Returns
Type | Description |
---|---|
PluginState | A PluginState object containing the plug-in's state information. If no state information is found, a default state object is created. |
Save()
Saves the plug-in cache to the plug-in cache xml file.
Declaration
public void Save()
StorePluginState(IPlugin)
Stores the state of the specified plug-in in the plug-in cache.
Declaration
public void StorePluginState(IPlugin plugin)
Parameters
Type | Name | Description |
---|---|---|
IPlugin | plugin | The plug-in for which to store the state. |