Skip to content

Commit 1c38fd9

Browse files
committed
Add high-level summary of PacketHandle types
1 parent b1a4413 commit 1c38fd9

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/PacketHandle.Windows.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,23 @@ namespace Microsoft.Data.SqlClient
1818

1919
internal readonly ref struct PacketHandle
2020
{
21+
/// <summary>
22+
/// PacketHandle is transporting a native pointer. The NativePointer field is valid.
23+
/// A PacketHandle has this type when managed code is referencing a pointer to a
24+
/// packet which has been read from the native SNI layer.
25+
/// </summary>
2126
public const int NativePointerType = 1;
27+
/// <summary>
28+
/// PacketHandle is transporting a native packet. The NativePacket field is valid.
29+
/// A PacketHandle has this type when managed code is directly referencing a packet
30+
/// which is due to be passed to the native SNI layer.
31+
/// </summary>
2232
public const int NativePacketType = 2;
2333
#if NET
34+
/// <summary>
35+
/// PacketHandle is transporting a managed packet. The ManagedPacket field is valid.
36+
/// A PacketHandle used by the managed SNI layer will always have this type.
37+
/// </summary>
2438
public const int ManagedPacketType = 3;
2539

2640
public readonly SNI.SNIPacket ManagedPacket;

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/PacketHandle.netcore.Unix.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,22 @@ namespace Microsoft.Data.SqlClient
1818

1919
internal readonly ref struct PacketHandle
2020
{
21+
/// <summary>
22+
/// PacketHandle is transporting a native pointer. The NativePointer field is valid.
23+
/// A PacketHandle has this type when managed code is referencing a pointer to a
24+
/// packet which has been read from the native SNI layer.
25+
/// </summary>
2126
public const int NativePointerType = 1;
27+
/// <summary>
28+
/// PacketHandle is transporting a native packet. The NativePacket field is valid.
29+
/// A PacketHandle has this type when managed code is directly referencing a packet
30+
/// which is due to be passed to the native SNI layer.
31+
/// </summary>
2232
public const int NativePacketType = 2;
33+
/// <summary>
34+
/// PacketHandle is transporting a managed packet. The ManagedPacket field is valid.
35+
/// A PacketHandle used by the managed SNI layer will always have this type.
36+
/// </summary>
2337
public const int ManagedPacketType = 3;
2438

2539
public readonly SNI.SNIPacket ManagedPacket;

0 commit comments

Comments
 (0)