/// <summary> /// 从持久化文件 获取 字符串 /// </summary> /// <param name="token">持久化标识</param> /// <param name="encoding">编码 (Null表示使用 默认编码)</param> /// <param name="securityKey">密钥 (Null表示使用 默认密钥)</param> /// <param name="isolatedStorageString">独立存储 字符串 功能 接口</param> /// <returns></returns> public static string GetString(string token, string securityKey = null, Encoding encoding = null, IIsolatedStorageString isolatedStorageString = null) { return(GenericityHelper.GetInterface(isolatedStorageString, DefaultIsolatedStorage).GetString(token, securityKey, encoding)); }
/// <summary> /// 序列化 字符串 到 持久化文件 /// </summary> /// <param name="sourceString">要序列化的字符串</param> /// <param name="token">持久化标识</param> /// <param name="encoding">编码 (Null表示使用 默认编码)</param> /// <param name="securityKey">密钥 (Null表示使用 默认密钥)</param> /// <param name="isolatedStorageString">独立存储 字符串 功能 接口</param> public static void SaveString(string sourceString, string token, string securityKey = null, Encoding encoding = null, IIsolatedStorageString isolatedStorageString = null) { GenericityHelper.GetInterface(isolatedStorageString, DefaultIsolatedStorage).SaveString(sourceString, token, securityKey, encoding); }