Skip to content

Commit

Permalink
Fix/Unify links from msdn/docs/blogs to learn
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelZ committed Nov 1, 2024
1 parent 699f6ab commit d682c2b
Show file tree
Hide file tree
Showing 38 changed files with 67 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal sealed class LocalDB

private IntPtr _startInstanceHandle = IntPtr.Zero;

// Local Db api doc https://msdn.microsoft.com/en-us/library/hh217143.aspx
// Local Db api doc https://learn.microsoft.com/sql/relational-databases/express-localdb-instance-apis/localdbstartinstance-function
// HRESULT LocalDBStartInstance( [Input ] PCWSTR pInstanceName, [Input ] DWORD dwFlags,[Output] LPWSTR wszSqlConnection,[Input/Output] LPDWORD lpcchSqlConnection);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate int LocalDBStartInstance(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ private bool InferNamedPipesInformation()
{
// Assuming that user did not change default NamedPipe name, if the datasource is in the format servername\instance,
// separate servername and instance and prepend instance with MSSQL$ and append default pipe path
// https://learn.microsoft.com/en-us/sql/tools/configuration-manager/named-pipes-properties?view=sql-server-ver16
// https://learn.microsoft.com/sql/tools/configuration-manager/named-pipes-properties
if (_dataSourceAfterTrimmingProtocol.Contains(PathSeparator) && ResolvedProtocol == Protocol.NP)
{
string[] tokensByBackSlash = _dataSourceAfterTrimmingProtocol.Split(BackSlashCharacter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal sealed class SSRP
private const int SqlServerBrowserPort = 1434; //port SQL Server Browser
private const int ReceiveMAXTimeoutsForCLNT_BCAST_EX = 15000; //Default max time for response wait
private const int ReceiveTimeoutsForCLNT_BCAST_EX = 1000; //subsequent wait time for response after intial wait
private const int ServerResponseHeaderSizeForCLNT_BCAST_EX = 3;//(SVR_RESP + RESP_SIZE) https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-sqlr/2e1560c9-5097-4023-9f5e-72b9ff1ec3b1
private const int ServerResponseHeaderSizeForCLNT_BCAST_EX = 3;//(SVR_RESP + RESP_SIZE) https://learn.microsoft.com/openspecs/windows_protocols/mc-sqlr/2e1560c9-5097-4023-9f5e-72b9ff1ec3b1
private const int ValidResponseSizeForCLNT_BCAST_EX = 4096; //valid reponse size should be less than 4096
private const int FirstTimeoutForCLNT_BCAST_EX = 5000;//wait for first response for 5 seconds
private const int CLNT_BCAST_EX = 2;//request packet
Expand Down Expand Up @@ -384,16 +384,16 @@ private static SsrpResult SendUDPRequest(IPEndPoint endPoint, byte[] requestPack

/// <summary>
/// Sends request to server, and receives response from server (SQLBrowser) on port 1434 by UDP
/// Request (https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-sqlr/a3035afa-c268-4699-b8fd-4f351e5c8e9e)
/// Response (https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-sqlr/2e1560c9-5097-4023-9f5e-72b9ff1ec3b1)
/// Request (https://learn.microsoft.com/openspecs/windows_protocols/mc-sqlr/a3035afa-c268-4699-b8fd-4f351e5c8e9e)
/// Response (https://learn.microsoft.com/openspecs/windows_protocols/mc-sqlr/2e1560c9-5097-4023-9f5e-72b9ff1ec3b1)
/// </summary>
/// <returns>string containing list of SVR_RESP(just RESP_DATA)</returns>
internal static string SendBroadcastUDPRequest()
{
StringBuilder response = new StringBuilder();
byte[] CLNT_BCAST_EX_Request = new byte[1] { CLNT_BCAST_EX }; //0x02
// Waits 5 seconds for the first response and every 1 second up to 15 seconds
// https://docs.microsoft.com/en-us/openspecs/windows_protocols/mc-sqlr/f2640a2d-3beb-464b-a443-f635842ebc3e#Appendix_A_3
// https://learn.microsoft.com/openspecs/windows_protocols/mc-sqlr/f2640a2d-3beb-464b-a443-f635842ebc3e#Appendix_A_3
int currentTimeOut = FirstTimeoutForCLNT_BCAST_EX;

using (TrySNIEventScope.Create(nameof(SSRP)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ private object ConvertValue(object value, _SqlMetaData metadata, bool isNull, re
else
{
// We truncate to at most 100 characters to match SQL Servers behavior as described in
// https://blogs.msdn.microsoft.com/sql_server_team/string-or-binary-data-would-be-truncated-replacing-the-infamous-error-8152/
// https://learn.microsoft.com/archive/blogs/sql_server_team/string-or-binary-data-would-be-truncated-replacing-the-infamous-error-8152
str = str.Remove(Math.Min(maxStringLength, 100));
}
throw SQL.BulkLoadStringTooLong(_destinationTableName, metadata.column, str);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ override public bool GetBoolean(int i)
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/GetXmlReader/*' />
virtual public XmlReader GetXmlReader(int i)
{
// NOTE: sql_variant can not contain a XML data type: http://msdn.microsoft.com/en-us/library/ms173829.aspx
// NOTE: sql_variant can not contain a XML data type: https://learn.microsoft.com/sql/t-sql/data-types/sql-variant-transact-sql
// If this ever changes, the following code should be changed to be like GetStream/GetTextReader
CheckDataIsReady(columnIndex: i);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ internal bool IsDNSCachingBeforeRedirectSupported
private static readonly TimeSpan _dbAuthenticationContextUnLockedRefreshTimeSpan = new TimeSpan(hours: 0, minutes: 10, seconds: 00);

// The errors in the transient error set are contained in
// https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-error-messages/#transient-faults-connection-loss-and-other-temporary-errors
// https://learn.microsoft.com/azure/azure-sql/database/troubleshoot-common-errors-issues#transient-faults-connection-loss-and-other-temporary-errors
private static readonly HashSet<int> s_transientErrors = new HashSet<int>
{
// SQL Error Code: 4060
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static TdsParser()
{
// For CoreCLR, we need to register the ANSI Code Page encoding provider before attempting to get an Encoding from a CodePage
// For a default installation of SqlServer the encoding exchanged during Login is 1252. This encoding is not loaded by default
// See Remarks at https://msdn.microsoft.com/en-us/library/system.text.encodingprovider(v=vs.110).aspx
// See Remarks at https://learn.microsoft.com/dotnet/api/system.text.encodingprovider
// SqlClient needs to register the encoding providers to make sure that even basic scenarios work with Sql Server.
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@ public static partial class SqlClientMetaDataCollectionNames
public sealed partial class SqlClientPermission : System.Data.Common.DBDataPermission
{
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientPermission.xml' path='docs/members[@name="SqlClientPermission"]/ctor[@name="default"]/*'/>
[System.ObsoleteAttribute("SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)]
[System.ObsoleteAttribute("SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. https://learn.microsoft.com/dotnet/framework/whats-new/whats-obsolete", true)]
public SqlClientPermission() : base(default(System.Security.Permissions.PermissionState)) { }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientPermission.xml' path='docs/members[@name="SqlClientPermission"]/ctor[@name="PermissionState"]//*'/>
public SqlClientPermission(System.Security.Permissions.PermissionState state) : base(default(System.Security.Permissions.PermissionState)) { }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientPermission.xml' path='docs/members[@name="SqlClientPermission"]/ctor[@name="PermissionStateAndAllowBlankPasswordBool"]//*'/>
[System.ObsoleteAttribute("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)]
[System.ObsoleteAttribute("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. https://learn.microsoft.com/dotnet/framework/whats-new/whats-obsolete", true)]
public SqlClientPermission(System.Security.Permissions.PermissionState state, bool allowBlankPassword) : base(default(System.Security.Permissions.PermissionState)) { }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientPermission.xml' path='docs/members[@name="SqlClientPermission"]/Add/*'/>
public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) { }
Expand Down Expand Up @@ -1750,7 +1750,7 @@ internal SqlParameterCollection() { }
public Microsoft.Data.SqlClient.SqlParameter Add(string parameterName, System.Data.SqlDbType sqlDbType, int size, string sourceColumn) { throw null; }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlParameterCollection.xml' path='docs/members[@name="SqlParameterCollection"]/AddParameterNameValue/*'/>
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated. Use AddWithValue(String parameterName, Object value). http://go.microsoft.com/fwlink/?linkid=14202", false)]
[System.ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated. Use AddWithValue(String parameterName, Object value). https://learn.microsoft.com/dotnet/framework/whats-new/whats-obsolete", false)]
public Microsoft.Data.SqlClient.SqlParameter Add(string parameterName, object value) { throw null; }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlParameterCollection.xml' path='docs/members[@name="SqlParameterCollection"]/AddRangeValues1/*'/>
public void AddRange(Microsoft.Data.SqlClient.SqlParameter[] values) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static internal unsafe IntPtr InterlockedExchangePointer(
return actualPtr;
}

// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getcomputernameex.asp
// https://learn.microsoft.com/windows/win32/api/sysinfoapi/nf-sysinfoapi-getcomputernameexw
[DllImport(ExternDll.Kernel32, CharSet = CharSet.Unicode, EntryPoint = "GetComputerNameExW", SetLastError = true)]
[ResourceExposure(ResourceScope.None)]
static internal extern int GetComputerNameEx(int nameType, StringBuilder nameBuffer, ref int bufferSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,7 @@ private object ConvertValue(object value, _SqlMetaData metadata, bool isNull, re
else
{
// We truncate to at most 100 characters to match SQL Servers behavior as described in
// https://blogs.msdn.microsoft.com/sql_server_team/string-or-binary-data-would-be-truncated-replacing-the-infamous-error-8152/
// https://learn.microsoft.com/archive/blogs/sql_server_team/string-or-binary-data-would-be-truncated-replacing-the-infamous-error-8152
str = str.Remove(Math.Min(maxStringLength, 100));
}
throw SQL.BulkLoadStringTooLong(_destinationTableName, metadata.column, str);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed class SqlClientPermission : System.Data.Common.DBDataPermission
{

/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientPermission.xml' path='docs/members[@name="SqlClientPermission"]/ctor[@name="default"]/*' />
[Obsolete("SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)] // MDAC 86034
[Obsolete("SqlClientPermission() has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. https://learn.microsoft.com/dotnet/framework/whats-new/whats-obsolete", true)] // MDAC 86034
public SqlClientPermission() : this(PermissionState.None)
{
}
Expand All @@ -32,7 +32,7 @@ public SqlClientPermission(PermissionState state) : base(state)
}

/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientPermission.xml' path='docs/members[@name="SqlClientPermission"]/ctor[@name="PermissionStateAndallowBlankPasswordBool"]/*' />
[Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. http://go.microsoft.com/fwlink/?linkid=14202", true)] // MDAC 86034
[Obsolete("SqlClientPermission(PermissionState state, Boolean allowBlankPassword) has been deprecated. Use the SqlClientPermission(PermissionState.None) constructor. https://learn.microsoft.com/dotnet/framework/whats-new/whats-obsolete", true)] // MDAC 86034
public SqlClientPermission(PermissionState state, bool allowBlankPassword) : this(state)
{
AllowBlankPassword = allowBlankPassword;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ override public bool GetBoolean(int i)
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml' path='docs/members[@name="SqlDataReader"]/GetXmlReader/*' />
virtual public XmlReader GetXmlReader(int i)
{
// NOTE: sql_variant can not contain a XML data type: http://msdn.microsoft.com/en-us/library/ms173829.aspx
// NOTE: sql_variant can not contain a XML data type: https://learn.microsoft.com/sql/t-sql/data-types/sql-variant-transact-sql
// If this ever changes, the following code should be changed to be like GetStream/GetTextReader
CheckDataIsReady(columnIndex: i);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ public override TextReader GetTextReader(int ordinal)

public override XmlReader GetXmlReader(int ordinal)
{
// NOTE: sql_variant can not contain a XML data type: http://msdn.microsoft.com/en-us/library/ms173829.aspx
// NOTE: sql_variant can not contain a XML data type: https://learn.microsoft.com/sql/t-sql/data-types/sql-variant-transact-sql

EnsureCanGetCol(ordinal);
if (_currentMetaData[ordinal].SqlDbType != SqlDbType.Xml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ internal SqlInternalConnectionTds(
}

// The errors in the transient error set are contained in
// https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-error-messages/#transient-faults-connection-loss-and-other-temporary-errors
// https://learn.microsoft.com/azure/azure-sql/database/troubleshoot-common-errors-issues#transient-faults-connection-loss-and-other-temporary-errors
private static void populateTransientErrors()
{
// SQL Error Code: 4060
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

internal partial class Interop
{
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382.aspx
// https://learn.microsoft.com/windows/win32/debug/system-error-codes--0-499-
internal partial class Errors
{
internal const int ERROR_FILE_NOT_FOUND = 0x2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

internal static partial class Interop
{
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa380518.aspx
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff564879.aspx
// https://learn.microsoft.com/windows/win32/api/subauth/ns-subauth-unicode_string
// https://learn.microsoft.com/windows/win32/api/ntdef/ns-ntdef-_unicode_string
[StructLayout(LayoutKind.Sequential)]
internal unsafe struct UNICODE_STRING
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal partial class Interop
{
internal partial class Kernel32
{
/// <summary> <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/defining-i-o-control-codes">CTL_CODE</a> method.</summary>
/// <summary> <a href="https://learn.microsoft.com/windows-hardware/drivers/kernel/defining-i-o-control-codes">CTL_CODE</a> method.</summary>
/// <param name="deviceType">Identifies the device type. This value must match the value that is set in the DeviceType member of the driver's DEVICE_OBJECT structure.</param>
/// <param name="function">Identifies the function to be performed by the driver. Values of less than 0x800 are reserved for Microsoft. Values of 0x800 and higher can be used by vendors.</param>
/// <param name="method">Indicates how the system will pass data between the caller of DeviceIoControl (or IoBuildDeviceIoControlRequest) and the driver that handles the IRP.</param>
Expand All @@ -20,7 +20,7 @@ internal unsafe static uint CTL_CODE(
byte access)
{
// MaxFunctionCode specifies the maximum value of the FunctionCode field in the FSCTLs (or IOCTLs for IOCTL tests). The maximum possible value is 4095.
// See https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/how-to-select-and-configure-the-device-fundamental-tests
// See https://learn.microsoft.com/windows-hardware/drivers/develop/how-to-select-and-configure-the-device-fundamental-tests
if (function > 4095)
throw ADP.ArgumentOutOfRange("function");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal partial class Interop
internal partial class Kernel32
{
/// <summary>
/// <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/defining-i-o-control-codes">RequiredAccess</a>.
/// <a href="https://learn.microsoft.com/windows-hardware/drivers/kernel/defining-i-o-control-codes">RequiredAccess</a>.
/// Indicates the type of access that a caller must request when opening the file object that represents the device (see IRP_MJ_CREATE).
/// </summary>
[Flags]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal partial class Interop
internal partial class Kernel32
{
/// <summary>
/// <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/buffer-descriptions-for-i-o-control-codes">TransferType</a>.
/// <a href="https://learn.microsoft.com/windows-hardware/drivers/kernel/buffer-descriptions-for-i-o-control-codes">TransferType</a>.
/// Indicates how the system will pass data between the caller of DeviceIoControl (or IoBuildDeviceIoControlRequest) and the driver that handles the IRP.
/// </summary>
public enum IoControlTransferType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal partial class Interop
internal partial class NtDll
{
/// <summary>
/// <a href="https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/ns-wdm-_file_full_ea_information">FILE_FULL_EA_INFORMATION</a> structure.
/// <a href="https://learn.microsoft.com/windows-hardware/drivers/ddi/wdm/ns-wdm-_file_full_ea_information">FILE_FULL_EA_INFORMATION</a> structure.
/// Provides extended attribute (EA) information. This structure is used primarily by network drivers.
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential)]
Expand Down
Loading

0 comments on commit d682c2b

Please sign in to comment.