I am working on .NET CORE 6 Renci.SshNet
library. When I read files using SftpClient.ListDirectory I also read .
& ..
as files. I want to create list of const outside service class that just deal with this list. I want to know best approach from architecture point of view i.e. using const, value object, struct, or readonly
I have manage to pull the prototype as
public static class RejectedFileName
{
private static readonly string[] FileNames = {".", ".."};
public static string[] GetNames()
{
return FileNames;
}
}
then I can use in my service class as
var filteredFiles = files.Except(RejectedFileName.GetNames()).ToList();