internal override ICacheClient TryExecute(ICacheClient client) { if (!CanExecute) { return(client); } if (Params.Count != 1) { Logger.CommandLogger.WriteError("please specify a dump directory"); } else { try { client.Dump(Params[0]); Logger.Write("Database successfully saved"); } catch (Exception e) { Logger.WriteEror("error saving database:" + e.Message); } } return(client); }
/// <summary> /// Dump all data into a directory /// </summary> /// <param name="path"></param> public void Dump(string path) { _client.Dump(path); }