Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed Jun 24, 2021
1 parent 8a2f40e commit 6eed7df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
12 changes: 8 additions & 4 deletions doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@
<summary>Synchronously gets the value of the specified column as a type. <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldValueAsync``1(System.Int32,System.Threading.CancellationToken)" /> is the asynchronous version of this method.</summary>
<returns>The returned type object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
<format type="text/markdown">
<![CDATA[
## Remarks
`T` can be one of the following types:
Expand All @@ -332,7 +333,8 @@
|SqlBoolean|SqlByte|SqlDateTime|SqlDecimal|
|SqlDouble|SqlGuid|SqlInt16|SqlInt32|
|SqlInt64|SqlMoney|SqlSingle|SqlString|
|String|UDT, which can be any CLR type marked with <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute>.|||
|Stream|String|TextReader|UDT, which can be any CLR type marked with <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute>.|
|XmlReader||||
For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support).
Expand All @@ -359,7 +361,8 @@
<summary>Asynchronously gets the value of the specified column as a type. <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.GetFieldValue``1(System.Int32)" /> is the synchronous version of this method.</summary>
<returns>The returned type object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
<format type="text/markdown">
<![CDATA[
## Remarks
`T` can be one of the following types:
Expand All @@ -372,7 +375,8 @@
|SqlBoolean|SqlByte|SqlDateTime|SqlDecimal|
|SqlDouble|SqlGuid|SqlInt16|SqlInt32|
|SqlInt64|SqlMoney|SqlSingle|SqlString|
|String|UDT, which can be any CLR type marked with <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute>.|||
|Stream|String|TextReader|UDT, which can be any CLR type marked with <xref:Microsoft.Data.SqlClient.Server.SqlUserDefinedTypeAttribute>.|
|XmlReader||||
For more information, see [SqlClient Streaming Support](/sql/connect/ado-net/sqlclient-streaming-support).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static class DataReaderStreamsTest
[MemberData(nameof(GetCommandBehaviours))]
public static async Task GetFieldValueAsync_OfStream(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
byte[] originalData = CreateBinaryData(PacketSize, forcedPacketCount: 4);
string query = CreateBinaryDataQuery(originalData);
Expand Down Expand Up @@ -57,7 +57,7 @@ public static async Task GetFieldValueAsync_OfStream(CommandBehavior behavior)
[MemberData(nameof(GetCommandBehaviours))]
public static async Task GetFieldValueAsync_OfXmlReader(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
string originalXml = CreateXmlData(PacketSize, forcedPacketCount: 4);
string query = CreateXmlDataQuery(originalXml);
Expand Down Expand Up @@ -92,7 +92,7 @@ public static async Task GetFieldValueAsync_OfXmlReader(CommandBehavior behavior
[MemberData(nameof(GetCommandBehaviours))]
public static async Task GetFieldValueAsync_OfTextReader(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
string originalText = CreateXmlData(PacketSize, forcedPacketCount: 4);
string query = CreateTextDataQuery(originalText);
Expand Down Expand Up @@ -127,7 +127,7 @@ public static async Task GetFieldValueAsync_OfTextReader(CommandBehavior behavio
[MemberData(nameof(GetCommandBehaviours))]
public static void GetFieldValue_OfXmlReader(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
string originalXml = CreateXmlData(PacketSize, forcedPacketCount: 4);
string query = CreateXmlDataQuery(originalXml);
Expand Down Expand Up @@ -162,7 +162,7 @@ public static void GetFieldValue_OfXmlReader(CommandBehavior behavior)
[MemberData(nameof(GetCommandBehaviours))]
public static void GetFieldValue_OfStream(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
byte[] originalData = CreateBinaryData(PacketSize, forcedPacketCount: 4);
string query = CreateBinaryDataQuery(originalData);
Expand Down Expand Up @@ -196,7 +196,7 @@ public static void GetFieldValue_OfStream(CommandBehavior behavior)
[MemberData(nameof(GetCommandBehaviours))]
public static void GetFieldValue_OfTextReader(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
string originalText = CreateXmlData(PacketSize, forcedPacketCount: 4);
string query = CreateTextDataQuery(originalText);
Expand Down Expand Up @@ -231,7 +231,7 @@ public static void GetFieldValue_OfTextReader(CommandBehavior behavior)
[MemberData(nameof(GetCommandBehaviours))]
public static void GetStream(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
byte[] originalData = CreateBinaryData(PacketSize, forcedPacketCount: 4);
string query = CreateBinaryDataQuery(originalData);
Expand Down Expand Up @@ -268,7 +268,7 @@ public static void GetStream(CommandBehavior behavior)
[MemberData(nameof(GetCommandBehaviours))]
public static void GetXmlReader(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
string originalXml = CreateXmlData(PacketSize, forcedPacketCount: 4);
string query = CreateXmlDataQuery(originalXml);
Expand Down Expand Up @@ -303,7 +303,7 @@ public static void GetXmlReader(CommandBehavior behavior)
[MemberData(nameof(GetCommandBehaviours))]
public static void GetTextReader(CommandBehavior behavior)
{
const int PacketSize = 512;
const int PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
string connectionString = SetConnectionStringPacketSize(DataTestUtility.TCPConnectionString, PacketSize);
string originalText = CreateXmlData(PacketSize, forcedPacketCount: 4);
string query = CreateTextDataQuery(originalText);
Expand Down Expand Up @@ -494,7 +494,7 @@ private static string SetConnectionStringPacketSize(string connectionString, int
{
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(connectionString);
builder.PersistSecurityInfo = true;
builder.PacketSize = 512; // force minimun packet size so that the test data spans multiple packets to test sequential access spanning
builder.PacketSize = packetSize;
return builder.ToString();
}

Expand Down

0 comments on commit 6eed7df

Please sign in to comment.