CmisSync.Lib.Filter.IgnoredFoldersFilter.CheckPath C# (CSharp) Метод

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

Checks the path if it begins with any path, which is ignored. Reports ignores to the queue.
public CheckPath ( string localPath, string &reason ) : bool
localPath string /// The local path which should be checked, if it should be ignored. ///
reason string Reason of the result value if returns true
Результат bool
        public virtual bool CheckPath(string localPath, out string reason) {
            lock (this.listLock) {
                string r = string.Empty;
                bool result = !string.IsNullOrEmpty(this.ignoredPaths.Find(delegate(string ignore) {
                    bool found = localPath.StartsWith(ignore);
                    r = found ? ignore : string.Empty;
                    return found;
                }));
                reason = r;
                return result;
            }
        }
    }

Usage Example

        public void AllowCorrectPaths()
        {
            var filter = new IgnoredFoldersFilter();

            string reason;
            Assert.That(filter.CheckPath(Path.GetTempPath(), out reason), Is.False);
            Assert.That(string.IsNullOrEmpty(reason), Is.True);
        }
All Usage Examples Of CmisSync.Lib.Filter.IgnoredFoldersFilter::CheckPath
IgnoredFoldersFilter