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

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

Adds the ignore path.
public AddIgnorePath ( string ignorePath ) : void
ignorePath string /// Ignore path. ///
Результат void
        public void AddIgnorePath(string ignorePath) {
            this.IgnoredFolders.Add(new IgnoredFolder { Path = ignorePath });
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Customization step of remote folder addition wizard is complete, start CmisSync.
        /// </summary>
        public void CustomizePageCompleted(string repoName, string localrepopath) {
            try {
                this.CheckRepoPathExists(localrepopath);
            } catch (ArgumentException) {
                if (this.LocalPathExists != null && !this.LocalPathExists(localrepopath)) {
                    return;
                }
            }

            this.SyncingReponame = repoName;
            this.saved_local_path = localrepopath;

            RepoInfo repoInfo = new RepoInfo {
                DisplayName = repoName,
                Address = this.saved_address,
                Binding = this.saved_binding,
                User = this.saved_user,
                ObfuscatedPassword = new Password(this.saved_password).ObfuscatedPassword,
                RepositoryId = this.PreviousRepository,
                RemotePath = this.PreviousPath,
                LocalPath = localrepopath
            };

            foreach (string ignore in this.ignoredPaths) {
                repoInfo.AddIgnorePath(ignore);
            }

            // Check that the folder exists.
            if (Directory.Exists(repoInfo.LocalPath)) {
                Logger.Info(string.Format("DataSpace Repository Folder {0} already exist, this could lead to sync conflicts", repoInfo.LocalPath));
            } else {
                // Create the local folder.
                Directory.CreateDirectory(repoInfo.LocalPath);
            }

            try {
                new Thread(() => {
                    Program.Controller.AddRepo(repoInfo);
                }).Start();
            } catch (Exception ex) {
                Logger.Fatal(ex.ToString());
            }

            this.ChangePageEvent(PageType.Finished);
        }