Re-write
This commit is contained in:
@ -28,8 +28,6 @@ internal class F_Random
|
||||
private bool IsIgnoreRelativePath(string directory)
|
||||
{
|
||||
bool result = false;
|
||||
if (_Configuration?.PropertyConfiguration is null)
|
||||
throw new NullReferenceException(nameof(_Configuration.PropertyConfiguration));
|
||||
string? checkDirectory = Path.GetFullPath(directory);
|
||||
for (int i = 0; i < int.MaxValue; i++)
|
||||
{
|
||||
@ -71,7 +69,7 @@ internal class F_Random
|
||||
relativePaths = (from l in relativePaths orderby random.NextDouble() select l).ToList();
|
||||
jsonFile = Path.Combine(fRandomCollectionDirectory, $"{dateTime.AddDays(i):MM-dd}.json");
|
||||
json = JsonSerializer.Serialize(relativePaths, _WriteIndentedJsonSerializerOptions);
|
||||
_ = Property.Models.Stateless.IPath.WriteAllText(jsonFile, json, updateDateWhenMatches: false, compareBeforeWrite: false);
|
||||
_ = Shared.Models.Stateless.Methods.IPath.WriteAllText(jsonFile, json, updateDateWhenMatches: false, compareBeforeWrite: false);
|
||||
if (!_Configuration.SaveFullYearOfRandomFiles)
|
||||
break;
|
||||
}
|
||||
@ -81,7 +79,7 @@ internal class F_Random
|
||||
ignoreRelativePaths = (from l in ignoreRelativePaths orderby random.NextDouble() select l).ToList();
|
||||
jsonFile = Path.Combine(fRandomCollectionDirectory, "01-01.txt");
|
||||
json = JsonSerializer.Serialize(ignoreRelativePaths, _WriteIndentedJsonSerializerOptions);
|
||||
_ = Property.Models.Stateless.IPath.WriteAllText(jsonFile, json, updateDateWhenMatches: false, compareBeforeWrite: false);
|
||||
_ = Shared.Models.Stateless.Methods.IPath.WriteAllText(jsonFile, json, updateDateWhenMatches: false, compareBeforeWrite: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user