/// <summary> /// Returns the value of type T with key. /// </summary> /// <typeparam name="T">The typy of the value</typeparam> /// <param name="key">the key of the corresponding value</param> /// <returns>the value casted to type t</returns> public T GetValueFromCache <T>(string key) { return(( T )importInfo.GetValue(key)); }
/// <summary> /// Returns true if the plugin cache contains an item of type T with key /// </summary> /// <typeparam name="T">The type to be checked for</typeparam> /// <param name="key">the key that is checked.</param> /// <returns>false if nonexsistant or not the specified type</returns> public bool HasValueOfType <T>(string key) { return(importInfo.ContainsKey(key) && importInfo.GetValue(key).GetType() == typeof(T)); }