Skip to content

Commit d4d5eba

Browse files
authored
Merge | Align Task usage / ArrayPool / IsColumnEncryptionSupported netcore/netfx (#2982)
* Align IsColumnEncryptionSupported between netfx and netcore * Align code styles * Align variable order * Align Task return * Coding style alignments * Align IsColumnEncryptionSupported between netfx and netcore * Align code styles * Align variable order * Align Task return * Coding style alignments * Align Array renting netcore/netfx * Align more ArrayPool usages * Fix code review suggestions
1 parent 5519887 commit d4d5eba

File tree

2 files changed

+195
-168
lines changed
  • src/Microsoft.Data.SqlClient

2 files changed

+195
-168
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6002,7 +6002,7 @@ private TdsOperationStatus TryReadSqlStringValue(SqlBuffer value, byte type, int
60026002
}
60036003
else
60046004
{
6005-
s = "";
6005+
s = string.Empty;
60066006
}
60076007
}
60086008

@@ -12869,7 +12869,14 @@ internal int ReadPlpUnicodeChars(ref char[] buff, int offst, int len, TdsParserS
1286912869
// requested length is -1 or larger than the actual length of data. First call to this method
1287012870
// should be preceeded by a call to ReadPlpLength or ReadDataLength.
1287112871
// Returns the actual chars read.
12872-
internal TdsOperationStatus TryReadPlpUnicodeChars(ref char[] buff, int offst, int len, TdsParserStateObject stateObj, out int totalCharsRead, bool supportRentedBuff, ref bool rentedBuff)
12872+
internal TdsOperationStatus TryReadPlpUnicodeChars(
12873+
ref char[] buff,
12874+
int offst,
12875+
int len,
12876+
TdsParserStateObject stateObj,
12877+
out int totalCharsRead,
12878+
bool supportRentedBuff,
12879+
ref bool rentedBuff)
1287312880
{
1287412881
int charsRead = 0;
1287512882
int charsLeft = 0;
@@ -12882,7 +12889,7 @@ internal TdsOperationStatus TryReadPlpUnicodeChars(ref char[] buff, int offst, i
1288212889
return TdsOperationStatus.Done; // No data
1288312890
}
1288412891

12885-
Debug.Assert(((ulong)stateObj._longlen != TdsEnums.SQL_PLP_NULL), "Out of sync plp read request");
12892+
Debug.Assert((ulong)stateObj._longlen != TdsEnums.SQL_PLP_NULL, "Out of sync plp read request");
1288612893

1288712894
Debug.Assert((buff == null && offst == 0) || (buff.Length >= offst + len), "Invalid length sent to ReadPlpUnicodeChars()!");
1288812895
charsLeft = len;

0 commit comments

Comments
 (0)