NullReferenceException
This commit is contained in:
@ -33,7 +33,7 @@ public class PropertyCompareLogic
|
||||
{
|
||||
List<PropertyCompare> results = new();
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
int index;
|
||||
string value;
|
||||
long[] distinctNumberValues;
|
||||
@ -81,7 +81,7 @@ public class PropertyCompareLogic
|
||||
{
|
||||
List<string[]> fromThenToCollection = new();
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
int z = 0;
|
||||
string to;
|
||||
string from;
|
||||
@ -177,7 +177,7 @@ public class PropertyCompareLogic
|
||||
string json = File.ReadAllText(jsonFile);
|
||||
A_Property? property = JsonSerializer.Deserialize<A_Property>(json);
|
||||
if (property?.Id is null)
|
||||
throw new ArgumentNullException(nameof(property));
|
||||
throw new NullReferenceException(nameof(property));
|
||||
DateTime minimumDateTime = Property.Models.Stateless.A_Property.GetMinimumDateTime(property);
|
||||
corrected = string.Concat(relativeDirectory, jsonFileNameWithoutExtension);
|
||||
if (_SpellingFindReplace is not null && (from l in _SpellingFindReplace where corrected.Contains(l.Find) select true).Any())
|
||||
@ -251,7 +251,7 @@ public class PropertyCompareLogic
|
||||
{
|
||||
List<PropertyCompare> results = new();
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
string[] files;
|
||||
int totalSeconds;
|
||||
string directory;
|
||||
@ -274,7 +274,7 @@ public class PropertyCompareLogic
|
||||
List<(int g, string sourceDirectory, string[] sourceDirectoryFiles, int r)> groupCollection;
|
||||
ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = _MaxDegreeOfParallelism };
|
||||
ProgressBarOptions options = new() { ProgressCharacter = '─', ProgressBarOnBottom = true, DisableBottomPercentage = true };
|
||||
groupCollection = Property.Models.Stateless.A_Property.GetGroupCollection(aPropertySingletonDirectory, searchPattern, topDirectories);
|
||||
groupCollection = Property.Models.Stateless.Container.GetGroupCollection(aPropertySingletonDirectory, searchPattern, topDirectories);
|
||||
foreach ((int g, string sourceDirectory, string[] sourceDirectoryFiles, int r) in groupCollection)
|
||||
{
|
||||
if (!topDirectories.Any())
|
||||
@ -319,7 +319,7 @@ public class PropertyCompareLogic
|
||||
private void MoveFiles(string[] directories, List<string[]> fromThenToCollection)
|
||||
{
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
int z;
|
||||
string to;
|
||||
string from;
|
||||
@ -406,7 +406,7 @@ public class PropertyCompareLogic
|
||||
public void SaveDiffFiles(string aPropertyCollectionDirectory, int loadLessThan, PropertyCompare[] propertyCompares, PropertyCompare[]? diffPropertyCompares)
|
||||
{
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
string text;
|
||||
string[] lines;
|
||||
string fileName;
|
||||
@ -459,7 +459,7 @@ public class PropertyCompareLogic
|
||||
public void SaveLogAndMoveFiles(string aPropertyCollectionDirectory, int loadLessThan, PropertyCompare[] propertyCompares, PropertyCompare[]? diffPropertyCompares, int i)
|
||||
{
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
List<string> lines;
|
||||
string checkDirectory;
|
||||
string[] toDirectories;
|
||||
@ -498,7 +498,7 @@ public class PropertyCompareLogic
|
||||
public void WithSubdirectory(string propertyDirectory, bool subDirectoriesAny, string fileName, bool renameCompare, bool deleteArg)
|
||||
{
|
||||
if (_Log is null)
|
||||
throw new ArgumentNullException(nameof(_Log));
|
||||
throw new NullReferenceException(nameof(_Log));
|
||||
List<string[]> fileCollection = new();
|
||||
if (renameCompare && deleteArg)
|
||||
throw new Exception();
|
||||
|
Reference in New Issue
Block a user