Re-write
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
using System.Text.Json;
|
||||
using View_by_Distance.Property.Models;
|
||||
using View_by_Distance.Shared.Models;
|
||||
|
||||
namespace View_by_Distance.Instance.Models;
|
||||
@ -37,7 +36,7 @@ internal class A2_People
|
||||
string directoryFullName;
|
||||
Dictionary<string, List<G2_Identify>> keyValuePairs = new();
|
||||
string hPeopleCollectionDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(configuration, nameof(A2_People), "[]");
|
||||
string aPropertySingletonDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(configuration, nameof(A_Property), "{}");
|
||||
string aPropertySingletonDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(configuration, nameof(Property.Models.A_Property), "{}");
|
||||
foreach (G2_Identify identified in identifiedCollection)
|
||||
{
|
||||
fileInfo = new FileInfo(string.Concat(aPropertySingletonDirectory, identified.RelativePath));
|
||||
@ -56,7 +55,7 @@ internal class A2_People
|
||||
_ = Directory.CreateDirectory(directoryFullName);
|
||||
jsonFile = Path.Combine(directoryFullName, $"{segments[1]}.json");
|
||||
json = JsonSerializer.Serialize(keyValuePair.Value, _WriteIndentedJsonSerializerOptions);
|
||||
if (!Property.Models.Stateless.IPath.WriteAllText(jsonFile, json, updateDateWhenMatches: true, compareBeforeWrite: true))
|
||||
if (!Shared.Models.Stateless.Methods.IPath.WriteAllText(jsonFile, json, updateDateWhenMatches: true, compareBeforeWrite: true))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -64,8 +63,6 @@ internal class A2_People
|
||||
internal Person[] GetPeople(Property.Models.Configuration configuration)
|
||||
{
|
||||
Person[] results;
|
||||
if (_Configuration?.PropertyConfiguration is null)
|
||||
throw new NullReferenceException(nameof(_Configuration.PropertyConfiguration));
|
||||
string rootDirectory = _Configuration.PropertyConfiguration.RootDirectory;
|
||||
string peopleRootDirectory = Property.Models.Stateless.IResult.GetResultsDateGroupDirectory(configuration, nameof(A2_People));
|
||||
string? rootResultsDirectory = Path.GetDirectoryName(Path.GetDirectoryName(peopleRootDirectory));
|
||||
|
Reference in New Issue
Block a user