public object Clone()
        {
            var result = new FilterItemCollection();

            result.CopyFrom(this);
            return(result);
        }
 public void CopyFrom(FilterItemCollection from)
 {
     this.Clear();
     foreach (var it in from)
     {
         this.Add(it);
     }
 }
Example #3
0
 public DirectoryEntry(string sourceDirectory, string destinationDirectory)
 {
     _sourceDirectory                 = sourceDirectory ?? throw new ArgumentNullException(nameof(sourceDirectory));
     _destinationDirectory            = destinationDirectory ?? throw new ArgumentNullException(nameof(destinationDirectory));
     _maxDepthOfSymbolicLinksToFollow = 4;
     _excludedFiles = new Filter.FilterItemCollection
     {
         new Filter.FilterItem(Filter.FilterAction.Exclude, @"\System Volume Information\*"),
         new Filter.FilterItem(Filter.FilterAction.Exclude, @"\$RECYCLE.BIN\*")
     };
     IsEnabled = true;
 }
 public FilterItemCollectionReadonly(FilterItemCollection from)
 {
     _filterItems = from.ToArray();
 }