added-numbers-to-distinguish-has-ignore-keyword-and-has-date-time-original
moved-container-to-new-project-to-prepare-to-remove-property-file added-logic-to-rename-to-3-and-7-like-should-ignore-for-missing-date-time-original
This commit is contained in:
@ -23,29 +23,16 @@ public interface IId
|
||||
static string GetPaddedId(Properties.IPropertyConfiguration propertyConfiguration, int id, bool? hasIgnoreKeyword, bool? hasDateTimeOriginal, int? index) =>
|
||||
Id.GetPaddedId(propertyConfiguration, id, hasIgnoreKeyword, hasDateTimeOriginal, index);
|
||||
|
||||
string TestStatic_GetIgnoreFullPath(FilePath filePath, Models.FileHolder fileHolder) =>
|
||||
GetIgnoreFullPath(filePath, fileHolder);
|
||||
static string GetIgnoreFullPath(FilePath filePath, Models.FileHolder fileHolder) =>
|
||||
fileHolder.DirectoryFullPath is null ?
|
||||
throw new NotSupportedException() :
|
||||
filePath.Id > -1 ?
|
||||
fileHolder.NameWithoutExtension[^1] == '9' ?
|
||||
Path.Combine(fileHolder.DirectoryFullPath, $"{fileHolder.NameWithoutExtension[..^1]}8{fileHolder.ExtensionLowered}") :
|
||||
throw new NotSupportedException("High") :
|
||||
fileHolder.NameWithoutExtension[^1] == '1' ?
|
||||
Path.Combine(fileHolder.DirectoryFullPath, $"{fileHolder.NameWithoutExtension[..^1]}2{fileHolder.ExtensionLowered}") :
|
||||
throw new NotSupportedException("Low");
|
||||
|
||||
bool TestStatic_NameWithoutExtensionIsIntelligentIdFormat(Properties.IPropertyConfiguration propertyConfiguration, string fileNameFirstSegment) =>
|
||||
NameWithoutExtensionIsIntelligentIdFormat(propertyConfiguration, fileNameFirstSegment);
|
||||
static bool NameWithoutExtensionIsIntelligentIdFormat(Properties.IPropertyConfiguration propertyConfiguration, string fileNameFirstSegment) =>
|
||||
fileNameFirstSegment.Length - 1 == propertyConfiguration.IntMinValueLength && fileNameFirstSegment[^1] is '1' or '2' or '8' or '9' && fileNameFirstSegment.All(char.IsNumber);
|
||||
fileNameFirstSegment.Length - 1 == propertyConfiguration.IntMinValueLength && fileNameFirstSegment[^1] is '1' or '2' or '3' or '7' or '8' or '9' && fileNameFirstSegment.All(char.IsNumber);
|
||||
|
||||
bool TestStatic_NameWithoutExtensionIsPaddedIntelligentIdFormat(Properties.IPropertyConfiguration propertyConfiguration, int sortOrderOnlyLengthIndex, string fileNameFirstSegment) =>
|
||||
NameWithoutExtensionIsPaddedIntelligentIdFormat(propertyConfiguration, sortOrderOnlyLengthIndex, fileNameFirstSegment);
|
||||
static bool NameWithoutExtensionIsPaddedIntelligentIdFormat(Properties.IPropertyConfiguration propertyConfiguration, int sortOrderOnlyLengthIndex, string fileNameFirstSegment) =>
|
||||
fileNameFirstSegment.Length == propertyConfiguration.IntMinValueLength + sortOrderOnlyLengthIndex + 1
|
||||
&& fileNameFirstSegment[^1] is '1' or '2' or '8' or '9'
|
||||
&& fileNameFirstSegment[^1] is '1' or '2' or '3' or '7' or '8' or '9'
|
||||
&& fileNameFirstSegment.All(char.IsNumber);
|
||||
|
||||
bool TestStatic_NameWithoutExtensionIsIdFormat(Properties.IPropertyConfiguration propertyConfiguration, Models.FileHolder fileHolder) =>
|
||||
@ -58,4 +45,19 @@ public interface IId
|
||||
static int GetDeterministicHashCode(byte[] value) =>
|
||||
Id.GetDeterministicHashCode(value);
|
||||
|
||||
int TestStatic_GetHasIgnoreKeyword(FilePath filePath) =>
|
||||
GetHasIgnoreKeyword(filePath);
|
||||
static int GetHasIgnoreKeyword(FilePath filePath) =>
|
||||
Id.GetHasIgnoreKeyword(filePath);
|
||||
|
||||
int TestStatic_GetMissingDateTimeOriginal(FilePath filePath) =>
|
||||
GetMissingDateTimeOriginal(filePath);
|
||||
static int GetMissingDateTimeOriginal(FilePath filePath) =>
|
||||
Id.GetMissingDateTimeOriginal(filePath);
|
||||
|
||||
int TestStatic_GetHasDateTimeOriginal(FilePath filePath) =>
|
||||
GetHasDateTimeOriginal(filePath);
|
||||
static int GetHasDateTimeOriginal(FilePath filePath) =>
|
||||
Id.GetHasDateTimeOriginal(filePath);
|
||||
|
||||
}
|
Reference in New Issue
Block a user