Skip to content

Commit

Permalink
small cleanup changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wharvex committed Aug 12, 2024
1 parent c802626 commit 6d717a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Files.App/Utils/Cloud/Detector/GoogleDriveCloudDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ await FilesystemTasks.Wrap(() => StorageFile.GetFileFromPathAsync(Path.Combine(a

#if DEBUG
Debug.WriteLine("YIELD RETURNING from `GoogleDriveCloudDetector.GetProviders` (media): ");
Debug.WriteLine($"name={title}; path={path}");
Debug.WriteLine($"Name: {title}; SyncFolder: {path}");
#endif

yield return new CloudProvider(CloudProviders.GoogleDrive)
Expand Down Expand Up @@ -124,27 +124,27 @@ await FilesystemTasks.Wrap(() => StorageFile.GetFileFromPathAsync(Path.Combine(a
};
}

private static async Task Inspect(SqliteConnection database, string sqlCommand, string contentsOf)
private static async Task Inspect(SqliteConnection database, string sqlCommand, string targetDescription)
{
await using var cmdTablesAll = new SqliteCommand(sqlCommand, database);
var reader = await cmdTablesAll.ExecuteReaderAsync();
var colNamesList = Enumerable.Range(0, reader.FieldCount).Select(j => reader.GetName(j)).ToList();
var colNamesList = Enumerable.Range(0, reader.FieldCount).Select(reader.GetName).ToList();

#if DEBUG
Debug.WriteLine($"BEGIN LOGGING of {contentsOf} contents");
Debug.WriteLine($"BEGIN LOGGING of {targetDescription}");
#endif

for (int index = 0; reader.Read() is not false; index++)
{
var colVals = new object[reader.FieldCount];
reader.GetValues(colVals);

colVals.Select((val, j) => $"row {index}: column {j}: {colNamesList[j]}: {val}")
colVals.Select((val, i) => $"row {index}: column {i}: {colNamesList[i]}: {val}")
.ToList().ForEach(s => Debug.WriteLine(s));
}

#if DEBUG
Debug.WriteLine($"END LOGGING of {contentsOf} contents");
Debug.WriteLine($"END LOGGING of {targetDescription} contents");
#endif
}

Expand Down

0 comments on commit 6d717a7

Please sign in to comment.