Skip to content

Commit c9431ec

Browse files
committed
fix warnings
1 parent 840cdac commit c9431ec

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/Servers/Connections.Abstractions/src/Features/ITlsAccessFeature.cs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using System.Text;
99
using System.Threading;
1010
using System.Threading.Tasks;
11-
using Microsoft.AspNetCore.Connections.Abstractions.TLS;
1211

1312
namespace Microsoft.AspNetCore.Connections.Features;
1413

src/Servers/HttpSys/samples/TlsFeaturesObserve/HttpSys/HttpSysConfigurator.cs

+6
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ static byte[] GetHash(string thumbprint)
7979
int length = thumbprint.Length;
8080
byte[] bytes = new byte[length / 2];
8181
for (int i = 0; i < length; i += 2)
82+
{
8283
bytes[i / 2] = Convert.ToByte(thumbprint.Substring(i, 2), 16);
84+
}
85+
8386
return bytes;
8487
}
8588

@@ -104,6 +107,8 @@ static void CallHttpApi(Action body)
104107
body();
105108
}
106109

110+
// disabled warning since it is just a sample
111+
#pragma warning disable SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
107112
[DllImport("httpapi.dll", SetLastError = true)]
108113
private static extern uint HttpInitialize(
109114
HTTPAPI_VERSION version,
@@ -117,4 +122,5 @@ public static extern uint HttpSetServiceConfiguration(
117122
nint pConfigInformation,
118123
int configInformationLength,
119124
nint pOverlapped);
125+
#pragma warning restore SYSLIB1054 // Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
120126
}

src/Servers/HttpSys/src/RequestProcessing/Request.cs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using System.Security.Cryptography;
99
using System.Security.Cryptography.X509Certificates;
1010
using System.Security.Principal;
11-
using Microsoft.AspNetCore.Connections.Abstractions.TLS;
1211
using Microsoft.AspNetCore.Http;
1312
using Microsoft.AspNetCore.HttpSys.Internal;
1413
using Microsoft.AspNetCore.Shared;

0 commit comments

Comments
 (0)