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:
@ -28,13 +28,22 @@ internal abstract class Id
|
||||
_ = results.Append(intelligentId[i]);
|
||||
_ = results.Append(intelligentId[^3]).Append(intelligentId[^2]);
|
||||
result = int.Parse(results.ToString());
|
||||
if (intelligentId[^1] is '1' or '2')
|
||||
if (intelligentId[^1] is '1' or '2' or '3')
|
||||
result *= -1;
|
||||
else if (intelligentId[^1] is not '9' and not '8')
|
||||
else if (intelligentId[^1] is not '9' and not '8' and not '7')
|
||||
throw new NotSupportedException();
|
||||
return result;
|
||||
}
|
||||
|
||||
internal static int GetHasIgnoreKeyword(FilePath filePath) =>
|
||||
filePath.Id > -1 ? 8 : 2;
|
||||
|
||||
internal static int GetMissingDateTimeOriginal(FilePath filePath) =>
|
||||
filePath.Id > -1 ? 7 : 3;
|
||||
|
||||
internal static int GetHasDateTimeOriginal(FilePath filePath) =>
|
||||
filePath.Id > -1 ? 9 : 1;
|
||||
|
||||
internal static string GetIntelligentId(Properties.IPropertyConfiguration propertyConfiguration, long id, bool? hasIgnoreKeyword, bool? hasDateTimeOriginal)
|
||||
{
|
||||
string result;
|
||||
@ -48,12 +57,12 @@ internal abstract class Id
|
||||
List<char> resultAllInOneSubdirectoryChars = [];
|
||||
if (id > -1)
|
||||
{
|
||||
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 8 : 9;
|
||||
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 8 : hasDateTimeOriginal is not null && hasDateTimeOriginal.Value ? 9 : 7;
|
||||
value = id.ToString().PadLeft(propertyConfiguration.IntMinValueLength, '0');
|
||||
}
|
||||
else
|
||||
{
|
||||
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 2 : 1;
|
||||
key = hasIgnoreKeyword is not null && hasIgnoreKeyword.Value ? 2 : hasDateTimeOriginal is not null && hasDateTimeOriginal.Value ? 1 : 3;
|
||||
value = id.ToString()[1..].PadLeft(propertyConfiguration.IntMinValueLength, '0');
|
||||
}
|
||||
for (int i = value.Length - propertyConfiguration.ResultAllInOneSubdirectoryLength - 1; i > -1; i--)
|
||||
|
Reference in New Issue
Block a user