csharp_new_line_before_open_brace = none
This commit is contained in:
@ -59,12 +59,11 @@ internal static partial class Helper20250521 {
|
||||
string datePattern = args[5];
|
||||
string searchPattern = args[2];
|
||||
string searchPatternB = args[3];
|
||||
string columns = args[6].Replace('~', ',');
|
||||
int dateLineSegmentCount = int.Parse(args[4]);
|
||||
string sourceDirectory = Path.GetFullPath(args[0].Split('~')[0]);
|
||||
ReadOnlyDictionary<string, string> keyValuePairs = GetKeyValuePairs(searchPattern, sourceDirectory);
|
||||
MoveMatchDirectory(searchPatternB, keyValuePairs, sourceDirectory);
|
||||
ReadOnlyCollection<RecordB> records = GetRecords(searchPatternB, sourceDirectory, dateLineSegmentCount, datePattern, columns);
|
||||
ReadOnlyCollection<RecordB> records = GetRecords(searchPatternB, sourceDirectory, dateLineSegmentCount, datePattern);
|
||||
WriteRecords(sourceDirectory, records);
|
||||
}
|
||||
|
||||
@ -72,7 +71,7 @@ internal static partial class Helper20250521 {
|
||||
Dictionary<string, string> results = [];
|
||||
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.AllDirectories);
|
||||
foreach (string file in files) {
|
||||
results.Add(Path.GetFileNameWithoutExtension(file), Path.GetDirectoryName(file));
|
||||
results.Add(Path.GetFileNameWithoutExtension(file), Path.GetDirectoryName(file) ?? throw new Exception());
|
||||
}
|
||||
return results.AsReadOnly();
|
||||
}
|
||||
@ -92,7 +91,7 @@ internal static partial class Helper20250521 {
|
||||
}
|
||||
}
|
||||
|
||||
private static ReadOnlyCollection<RecordB> GetRecords(string searchPatternB, string sourceDirectory, int dateLineSegmentCount, string datePattern, string columns) {
|
||||
private static ReadOnlyCollection<RecordB> GetRecords(string searchPatternB, string sourceDirectory, int dateLineSegmentCount, string datePattern) {
|
||||
List<RecordB> results = [];
|
||||
string line;
|
||||
string[] lines;
|
||||
@ -110,7 +109,7 @@ internal static partial class Helper20250521 {
|
||||
if (lineCheck.EffectiveDate == DateTime.MinValue || lineCheck.TransactionDate == DateTime.MinValue) {
|
||||
continue;
|
||||
} else {
|
||||
record = GetRecord(dateLineSegmentCount, datePattern, lines, i, lineCheck.Segments, lineCheck.TransactionDate, lineCheck.EffectiveDate);
|
||||
record = GetRecord(dateLineSegmentCount, datePattern, lines, i, lineCheck.TransactionDate, lineCheck.EffectiveDate);
|
||||
if (record is not null) {
|
||||
i = record.I;
|
||||
results.Add(record);
|
||||
@ -121,7 +120,7 @@ internal static partial class Helper20250521 {
|
||||
return results.AsReadOnly();
|
||||
}
|
||||
|
||||
private static RecordB? GetRecord(int dateLineSegmentCount, string datePattern, string[] lines, int i, string[] segments, DateTime transactionDate, DateTime effectiveDate) {
|
||||
private static RecordB? GetRecord(int dateLineSegmentCount, string datePattern, string[] lines, int i, DateTime transactionDate, DateTime effectiveDate) {
|
||||
RecordB? result = null;
|
||||
string line;
|
||||
LineCheck lineCheck;
|
||||
@ -148,7 +147,7 @@ internal static partial class Helper20250521 {
|
||||
return result;
|
||||
}
|
||||
|
||||
private static RecordB GetRecord(DateTime transactionDate, DateTime effectiveDate, ReadOnlyCollection<string> collection, int i) {
|
||||
private static RecordB? GetRecord(DateTime transactionDate, DateTime effectiveDate, ReadOnlyCollection<string> collection, int i) {
|
||||
RecordB? result;
|
||||
List<string> verified = [];
|
||||
foreach (string check in collection) {
|
||||
|
Reference in New Issue
Block a user