Created
July 14, 2024 09:02
-
-
Save hishaamn/26e73d7953ab2bc3574849def09137c8 to your computer and use it in GitHub Desktop.
Override current implementation to introduce the SkipFile value
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomEntrySorter : EntrySorter | |
{ | |
private bool SkipFile { get; set; } | |
public CustomEntrySorter(ISource<PackageEntry> baseSource, bool skipFile = false) : base(baseSource) | |
{ | |
this.SkipFile = skipFile; | |
} | |
public override void Put(PackageEntry entry) | |
{ | |
if(this.SkipFile && entry.Properties.ContainsKey("type") && entry.Properties["type"].Equals("file")) | |
{ | |
Log.Info($"Skipping file {entry.Key}", this); | |
return; | |
} | |
base.Put(entry); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment