CmisSync.Lib.SelectiveIgnore.IgnoredEntitiesCollection.IsIgnoredPath C# (CSharp) 메소드

IsIgnoredPath() 공개 메소드

public IsIgnoredPath ( string localPath ) : IgnoredState
localPath string
리턴 IgnoredState
        public IgnoredState IsIgnoredPath(string localPath) {
            foreach (var entry in this.entries.Values) {
                if (localPath == entry.LocalPath) {
                    return IgnoredState.IGNORED;
                } else if (localPath.StartsWith(entry.LocalPath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? entry.LocalPath : entry.LocalPath + Path.DirectorySeparatorChar.ToString())) {
                    return IgnoredState.INHERITED;
                }
            }

            return IgnoredState.NOT_IGNORED;
        }
    }

Usage Example

        public void IgnoreInheritedCheckOnLocalPath() {
            var underTest = new IgnoredEntitiesCollection();

            underTest.Add(Mock.Of<IIgnoredEntity>(o => o.ObjectId == this.objectId && o.LocalPath == this.localPath));

            Assert.That(underTest.IsIgnoredPath(Path.Combine(this.localPath, Guid.NewGuid().ToString())), Is.EqualTo(IgnoredState.INHERITED));
        }
All Usage Examples Of CmisSync.Lib.SelectiveIgnore.IgnoredEntitiesCollection::IsIgnoredPath