CmisSync.Lib.Config.RepoInfo.GetDatabasePath C# (CSharp) Метод

GetDatabasePath() публичный Метод

Full path to the local database file/folder.
public GetDatabasePath ( ) : string
Результат string
        public virtual string GetDatabasePath() {
            string name = this.DisplayName.Replace("\\", "_");
            name = name.Replace("/", "_");
            return Path.Combine(ConfigManager.CurrentConfig.GetConfigPath(), name + "_DB");
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Remove a synchronized folder from the CmisSync configuration.
        /// This happens after the user removes the folder.
        /// </summary>
        /// <param name="folder">The synchronized folder to remove</param>
        private void RemoveRepository(RepoInfo folder) {
            foreach (Repository repo in this.repositories) {
                if (repo.LocalPath.Equals(folder.LocalPath)) {
                    repo.Dispose();
                    this.repositories.Remove(repo);
                    this.statusAggregator.Remove(repo);
                    repo.Dispose();
                    break;
                }
            }

            // Remove DBreeze DB folder
            try {
                Directory.Delete(folder.GetDatabasePath(), true);
            } catch (DirectoryNotFoundException) {
            }
        }