-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
134 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
Analogy.LogViewer.Sqlite.UnitTests/Analogy.LogViewer.Sqlite.UnitTests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
using System; | ||
using Analogy.Interfaces; | ||
using Analogy.LogViewer.Sqlite.Properties; | ||
using Analogy.LogViewer.Template.Managers; | ||
using Microsoft.Data.Sqlite; | ||
using Microsoft.Extensions.Logging; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Drawing; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Analogy.Interfaces; | ||
using Analogy.LogViewer.Sqlite.Properties; | ||
using Analogy.LogViewer.Template.Managers; | ||
using Microsoft.Data.Sqlite; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Analogy.LogViewer.Sqlite.IAnalogy | ||
{ | ||
|
@@ -23,10 +23,9 @@ public class SqliteBroswerDataProvider : Template.OfflineDataProvider | |
public override string FileOpenDialogFilters { get; set; } = "sqlite db file (*.db)|*.db"; | ||
public override IEnumerable<string> SupportFormats { get; set; } = new[] { "*.db" }; | ||
public override string? InitialFolderFullPath { get; set; } = Environment.CurrentDirectory; | ||
public override IEnumerable<(string originalHeader, string replacementHeader)> GetReplacementHeaders() | ||
public override IEnumerable<(string OriginalHeader, string ReplacementHeader)> GetReplacementHeaders() | ||
=> Array.Empty<(string, string)>(); | ||
|
||
|
||
public override Task InitializeDataProvider(ILogger logger) | ||
{ | ||
//do some initialization for this provider | ||
|
@@ -52,7 +51,6 @@ public override IEnumerable<AnalogyLogMessagePropertyName> HideExistingColumns() | |
yield return AnalogyLogMessagePropertyName.Id; | ||
} | ||
|
||
|
||
public override void MessageOpened(IAnalogyLogMessage message) | ||
{ | ||
//nop | ||
|
@@ -63,6 +61,7 @@ public override async Task<IEnumerable<IAnalogyLogMessage>> Process(string fileN | |
using (var conn = new SqliteConnection($"Data Source={fileName};Mode=readonly")) | ||
{ | ||
await conn.OpenAsync(token); | ||
|
||
Check warning on line 64 in Analogy.LogViewer.Sqlite/IAnalogy/SqliteBroswerDataProvider.cs GitHub Actions / build (Release)
Check warning on line 64 in Analogy.LogViewer.Sqlite/IAnalogy/SqliteBroswerDataProvider.cs GitHub Actions / build (Debug)
Check warning on line 64 in Analogy.LogViewer.Sqlite/IAnalogy/SqliteBroswerDataProvider.cs GitHub Actions / build (Debug)
|
||
// executes query that select names of all tables in master table of the database | ||
string query = "SELECT name FROM sqlite_master " + | ||
"WHERE type = 'table'" + | ||
|
@@ -77,9 +76,7 @@ public override async Task<IEnumerable<IAnalogyLogMessage>> Process(string fileN | |
{ | ||
dt.Load(rdr); | ||
} | ||
|
||
} | ||
|
||
DataTable dtData = new DataTable(); | ||
foreach (DataRow row in dt.Rows) | ||
{ | ||
|
@@ -110,9 +107,7 @@ public override async Task<IEnumerable<IAnalogyLogMessage>> Process(string fileN | |
} | ||
messages.Add(m); | ||
messagesHandler.AppendMessage(m, fileName); | ||
|
||
} | ||
|
||
return messages; | ||
} | ||
|
||
|
@@ -125,4 +120,4 @@ public override async Task<IEnumerable<IAnalogyLogMessage>> Process(string fileN | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#https://github.com/dotnet/csharplang/blob/main/spec/documentation-comments.md#id-string-format | ||
|
||
M:System.String.ToLower;Use ToLowerInvariant instead | ||
M:System.String.ToUpper;Use ToUpperInvariant instead | ||
|
||
F:System.StringComparison.CurrentCulture;Consider using Ordinal | ||
F:System.StringComparison.CurrentCultureIgnoreCase;Consider using OrdinalIgnoreCase | ||
F:System.StringComparison.InvariantCurrent;Consider using Ordinal | ||
F:System.StringComparison.InvariantCurrentIgnoreCase;Consider using OrdinalIgnoreCase |
Oops, something went wrong.