Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reduce AOT binary size#3091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdaigle merged 3 commits intodotnet:mainfromedwardneal:aot-1
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
Expand DownExpand Up@@ -396,12 +395,12 @@ internal SqlConnectionString(string connectionString) : base(connectionString, G
if (_networkLibrary != null)
{ // MDAC 83525
string networkLibrary = _networkLibrary.Trim().ToLower(CultureInfo.InvariantCulture);
Hashtable netlib = NetlibMapping();
Dictionary<string, string> netlib = NetlibMapping();
if (!netlib.ContainsKey(networkLibrary))
{
throw ADP.InvalidConnectionOptionValue(KEY.Network_Library);
}
_networkLibrary =(string)netlib[networkLibrary];
_networkLibrary = netlib[networkLibrary];
}
else
{
Expand DownExpand Up@@ -1101,14 +1100,14 @@ internal SqlConnectionEncryptOption ConvertValueToSqlConnectionEncrypt()
}
}

static internalHashtable NetlibMapping()
static internalDictionary<string, string> NetlibMapping()
{
const int NetLibCount = 8;

Hashtable hash = s_netlibMapping;
Dictionary<string, string> hash = s_netlibMapping;
if (hash == null)
{
hash = newHashtable(NetLibCount)
hash = newDictionary<string, string>(NetLibCount)
{
{ NETLIB.TCPIP, TdsEnums.TCP },
{ NETLIB.NamedPipes, TdsEnums.NP },
Expand DownExpand Up@@ -1150,7 +1149,7 @@ internal static class NETLIB
internal const string VIA = "dbmsgnet";
}

private staticHashtable s_netlibMapping;
private staticDictionary<string, string> s_netlibMapping;

#if NETFRAMEWORK
protected internal override PermissionSet CreatePermissionSet()
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -139,10 +139,14 @@ internal static int GetCurrentProcessIdForTdsLoginOnly()
// Pick up the process Id from the current process instead of randomly generating it.
// This would be helpful while tracing application related issues.
int processId;
#if NET
processId = Environment.ProcessId;
#else
using (System.Diagnostics.Process p = System.Diagnostics.Process.GetCurrentProcess())
{
processId = p.Id;
}
#endif
System.Threading.Volatile.Write(ref s_currentProcessId, processId);
}
return s_currentProcessId;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,8 +7,8 @@
using System.Diagnostics;
using System.IO;
using System.Net.Http;
using System.Runtime.Serialization.Json;
using System.Security.Cryptography.X509Certificates;
using System.Text.Json;
using System.Threading;

namespace Microsoft.Data.SqlClient
Expand DownExpand Up@@ -72,8 +72,7 @@ protected override byte[] MakeRequest(string url)

using (Stream stream = s_client.GetStreamAsync(url).ConfigureAwait(false).GetAwaiter().GetResult())
{
var deserializer = new DataContractJsonSerializer(typeof(byte[]));
return (byte[])deserializer.ReadObject(stream);
return JsonSerializer.Deserialize<List<byte>>(stream)?.ToArray();
}
}
catch (Exception e)
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -202,7 +202,7 @@ private X509Certificate2Collection GetSigningCertificate(string attestationUrl,

try
{
var s = new SignedCms();
SignedCms s = new SignedCms();
s.Decode(data);
certificateCollection.AddRange(s.Certificates);
}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp