-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add
using Sdcb.PaddleOCR
@ GlobalUsings.cs
@ imagePipeline + GlobalUsings.cs * using file scoped namespace @ ByteArrayEqualityComparer.cs @ shared @ c# * fix `NU1004: The project reference tbm.shared has changed` @ c#.yml @ .github/workflows
- Loading branch information
Showing
11 changed files
with
19 additions
and
28 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
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,5 +1,3 @@ | ||
using Sdcb.PaddleOCR; | ||
|
||
namespace tbm.ImagePipeline.Ocr; | ||
|
||
public class PaddleOcrRecognizer(PaddleOcrAll ocr) | ||
|
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,14 @@ | ||
namespace tbm.Shared | ||
namespace tbm.Shared; | ||
|
||
public class ByteArrayEqualityComparer : EqualityComparer<byte[]> | ||
{ | ||
public class ByteArrayEqualityComparer : EqualityComparer<byte[]> | ||
{ | ||
public override bool Equals(byte[]? x, byte[]? y) => | ||
x == y || (x != null && y != null && x.AsSpan().SequenceEqual(y.AsSpan())); | ||
public override bool Equals(byte[]? x, byte[]? y) => | ||
x == y || (x != null && y != null && x.AsSpan().SequenceEqual(y.AsSpan())); | ||
|
||
public override int GetHashCode(byte[] obj) | ||
{ | ||
var hash = default(HashCode); | ||
hash.AddBytes(obj); | ||
return hash.ToHashCode(); | ||
} | ||
public override int GetHashCode(byte[] obj) | ||
{ | ||
var hash = default(HashCode); | ||
hash.AddBytes(obj); | ||
return hash.ToHashCode(); | ||
} | ||
} |
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,6 +1,4 @@ | ||
using System.Reflection; | ||
using Autofac; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace tbm.Shared; | ||
|
||
|
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,6 @@ | ||
global using Autofac; | ||
global using Microsoft.EntityFrameworkCore; | ||
global using Microsoft.Extensions.Hosting; | ||
global using Microsoft.Extensions.Logging; | ||
global using NLog.Extensions.Logging; | ||
global using Npgsql; |
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,5 +1,4 @@ | ||
using System.Globalization; | ||
using Npgsql; | ||
|
||
namespace tbm.Shared; | ||
|
||
|
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