Used to re-organized folders
This commit is contained in:
@ -31,6 +31,7 @@ public class AppSettings
|
||||
continue;
|
||||
throw new NotSupportedException(physicalFileProvider.Root);
|
||||
}
|
||||
throw new NotSupportedException("Not Found!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@ public class RenameConfiguration
|
||||
{
|
||||
|
||||
public string[]? IgnoreExtensions { get; set; }
|
||||
public bool? MoveFilesToRoot { get; set; }
|
||||
public bool? SkipIdFiles { get; set; }
|
||||
public string[]? ValidImageFormatExtensions { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
@ -30,6 +32,7 @@ public class RenameConfiguration
|
||||
continue;
|
||||
throw new NotSupportedException(physicalFileProvider.Root);
|
||||
}
|
||||
throw new NotSupportedException("Not Found!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,10 +47,14 @@ public class RenameConfiguration
|
||||
Models.RenameConfiguration result;
|
||||
if (configuration is null) throw new NullReferenceException(nameof(configuration));
|
||||
if (configuration.IgnoreExtensions is null) throw new NullReferenceException(nameof(configuration.IgnoreExtensions));
|
||||
if (configuration.MoveFilesToRoot is null) throw new NullReferenceException(nameof(configuration.MoveFilesToRoot));
|
||||
if (configuration.SkipIdFiles is null) throw new NullReferenceException(nameof(configuration.SkipIdFiles));
|
||||
if (configuration.ValidImageFormatExtensions is null) throw new NullReferenceException(nameof(configuration.ValidImageFormatExtensions));
|
||||
Verify(configuration);
|
||||
result = new(metadataConfiguration,
|
||||
configuration.IgnoreExtensions,
|
||||
configuration.MoveFilesToRoot.Value,
|
||||
configuration.SkipIdFiles.Value,
|
||||
configuration.ValidImageFormatExtensions);
|
||||
return result;
|
||||
}
|
||||
|
@ -6,7 +6,9 @@ namespace View_by_Distance.Rename.Models;
|
||||
|
||||
public record RenameConfiguration(Shared.Models.MetadataConfiguration MetadataConfiguration,
|
||||
string[] IgnoreExtensions,
|
||||
string[] ValidImageFormatExtensions)
|
||||
bool MoveFilesToRoot,
|
||||
bool SkipIdFiles,
|
||||
string[] ValidImageFormatExtensions) : Shared.Models.Properties.IRenameConfiguration
|
||||
{
|
||||
|
||||
public override string ToString()
|
||||
|
Reference in New Issue
Block a user