Skip to content

Commit 7adc2ee

Browse files
committed
Code cleanup
1 parent b5d5ab6 commit 7adc2ee

File tree

14 files changed

+23
-23
lines changed

14 files changed

+23
-23
lines changed

sources/Jpki.NUnit/AssertThrows.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ private static Exception Unwrap(this Exception e)
5050
{
5151
try
5252
{
53-
#pragma warning disable VSTHRD002 // Avoid problematic synchronous waits
53+
#pragma warning disable VSTHRD002 // Avoid problematic synchronous waits
5454
code().Wait();
55-
#pragma warning restore VSTHRD002
55+
#pragma warning restore VSTHRD002
5656
}
5757
catch (AggregateException e)
5858
{

sources/Jpki.Powershell.Test/Runtime/Http/TestJsonResource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ namespace Jpki.Powershell.Test.Runtime.Http
3939
[TestFixture]
4040
public class TestJsonResource
4141
{
42-
private static readonly Uri SampleUrl =
42+
private static readonly Uri SampleUrl =
4343
new Uri("https://accounts.google.com/.well-known/openid-configuration");
44-
44+
4545
private static readonly Uri NotFoundUrl =
4646
new Uri("https://gstatic.com/generate_404");
4747

sources/Jpki.Powershell.Test/Runtime/Text/TestJson.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ public void DeserializeStream()
7070
public void DeserializeString()
7171
{
7272
var json = "{\"a\": \"aa\",\"b\": \"bb\"}";
73-
73+
7474
var c = Json.Deserialize<SomeClass>(json);
75-
75+
7676
AssertThat.NotNull(c);
7777
AssertThat.AreEqual("aa", c!.A);
7878
AssertThat.AreEqual("bb", c!.B);

sources/Jpki.Powershell.Test/Security/WebAuthn/Metadata/TestMetadataStatement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void YubiKey5ci()
4040
AssertThat.AreEqual("...", statement.LegalHeader);
4141
AssertThat.AreEqual("YubiKey 5 Series with Lightning", statement.Description);
4242
CollectionAssertThat.AreEquivalent(
43-
new[] { "secp256r1_ecdsa_sha256_raw" },
43+
new[] { "secp256r1_ecdsa_sha256_raw" },
4444
statement.AuthenticationAlgorithms!);
4545
CollectionAssertThat.AreEquivalent(
4646
new[] { "hardware", "secure_element", "remote_handle" },
@@ -61,7 +61,7 @@ public void YubiKey5ci()
6161
statement.MatcherProtection!);
6262
AssertThat.AreEqual(128, statement.CryptoStrength);
6363
AssertThat.AreEqual(
64-
"CN=Yubico U2F Root CA Serial 457200631",
64+
"CN=Yubico U2F Root CA Serial 457200631",
6565
statement.AttestationRootCertificates.First().Issuer);
6666
}
6767

sources/Jpki.Powershell/Runtime/Http/HttpServer.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ internal class HttpServer : IDisposable
3939
/// port stays the same for this instance.
4040
/// </summary>
4141
private readonly Lazy<int> randomUnusedPort = new Lazy<int>(
42-
() => {
42+
() =>
43+
{
4344
var listener = new TcpListener(IPAddress.Loopback, 0);
4445
try
4546
{

sources/Jpki.Powershell/Runtime/Http/JsonResource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
//
2121

2222
using Jpki.Powershell.Runtime.Text;
23+
using System.Net;
2324
using System.Net.Http;
24-
using System.Threading.Tasks;
2525
using System.Threading;
26-
using System.Net;
26+
using System.Threading.Tasks;
2727

2828
namespace Jpki.Powershell.Runtime.Http
2929
{

sources/Jpki.Powershell/Runtime/Http/RestResourceBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected RequestBase(RestResourceBase resource)
7575
/// <summary>
7676
/// Request URI.
7777
/// </summary>
78-
public Uri Uri { get; set; }
78+
public Uri Uri { get; set; }
7979

8080
/// <summary>
8181
/// Initialze a HTTP request message.

sources/Jpki.Powershell/Runtime/Http/TextResource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// under the License.
2020
//
2121

22-
using System.Net.Http;
2322
using System.Net;
23+
using System.Net.Http;
2424
using System.Threading;
2525
using System.Threading.Tasks;
2626

sources/Jpki.Powershell/Runtime/Http/UserAgent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal class UserAgent
3030
public string Platform { get; }
3131

3232
public static UserAgent Default = new UserAgent(
33-
"JPKI",
33+
"JPKI",
3434
typeof(UserAgent).Assembly.GetName().Version ?? new Version(1, 0));
3535

3636
public UserAgent(string product, Version version, string platform)

sources/Jpki.Powershell/Runtime/Text/Json.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace Jpki.Powershell.Runtime.Text
3434
/// Deserialize JSON using either Newtonsoft.Json (NetFx) or
3535
/// System.Text.Json (.NET).
3636
/// </summary>
37-
internal static class Json
37+
internal static class Json
3838
{
3939
public static T? Deserialize<T>(Stream stream) where T : class
4040
{

sources/Jpki.Powershell/Security/WebAuthn/Metadata/MetadataStatement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public Guid? Aaguid
221221
/// in the authenticator attestation.
222222
/// </summary>
223223
[EditorBrowsable(EditorBrowsableState.Never)]
224-
public IReadOnlyList<X509Certificate2> AttestationRootCertificates
224+
public IReadOnlyList<X509Certificate2> AttestationRootCertificates
225225
{
226226
get => this.AttestationRootCertificateStrings
227227
.EnsureNotNull()

sources/Jpki.Security.Cryptography.Test/Security/Cryptography/TestEcdsaExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private static ECDsa CreateKey()
156156
private static ECDsa CreateKey(int keySize)
157157
{
158158
#if WINDOWS || NETFRAMEWORK
159-
return new ECDsaCng(keySize);
159+
return new ECDsaCng(keySize);
160160
#else
161161
return ECDsa.Create();
162162
#endif

sources/Jpki.Security.Cryptography.Test/Security/Cryptography/TestRSAExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
using Jpki.Security.Cryptography;
2323
using NUnit.Framework;
24-
using System.Diagnostics;
2524
using System.Linq;
2625
using System.Security.Cryptography;
2726

sources/Jpki.Security.WebAuthn/Format/BigEndian.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ internal static uint ReadGuid(
7474
ReadUInt16(data, offset + 6, out var c);
7575

7676
guid = new Guid(
77-
a, b, c,
78-
data[offset + 8],
79-
data[offset + 9],
77+
a, b, c,
78+
data[offset + 8],
79+
data[offset + 9],
8080
data[offset + 10],
8181
data[offset + 11],
8282
data[offset + 12],
83-
data[offset + 13],
84-
data[offset + 14],
83+
data[offset + 13],
84+
data[offset + 14],
8585
data[offset + 15]);
8686
return 16;
8787
}

0 commit comments

Comments
 (0)