Skip to content
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Microsoft.Data.SqlClient
{
// The TdsParser Object controls reading/writing to the netlib, parsing the tds,
// and surfacing objects to the user.
sealed internal partial class TdsParser
internal sealed partial class TdsParser
{
private static int _objectTypeCount; // EventSource Counter
private readonly SqlClientLogger _logger = new SqlClientLogger();
Expand Down Expand Up @@ -160,8 +160,8 @@ internal static void Assert(string message)
//

// Constants
const int constBinBufferSize = 4096; // Size of the buffer used to read input parameter of type Stream
const int constTextBufferSize = 4096; // Size of the buffer (in chars) user to read input parameter of type TextReader
private const int constBinBufferSize = 4096; // Size of the buffer used to read input parameter of type Stream
private const int constTextBufferSize = 4096; // Size of the buffer (in chars) user to read input parameter of type TextReader
private const string enableTruncateSwitch = "Switch.Microsoft.Data.SqlClient.TruncateScaledDecimal"; // for applications that need to maintain backwards compatibility with the previous behavior

// State variables
Expand Down Expand Up @@ -3776,7 +3776,7 @@ private TdsOperationStatus TryProcessFeatureExtAck(TdsParserStateObject stateObj
}

// Check if column encryption was on and feature wasn't acknowledged and we aren't going to be routed to another server.
if (this.Connection.RoutingInfo == null
if (Connection.RoutingInfo == null
&& _connHandler.ConnectionOptions.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled
&& !IsColumnEncryptionSupported)
{
Expand Down Expand Up @@ -8353,7 +8353,7 @@ private TdsOperationStatus TryReadDecimalBits(int length, TdsParserStateObject s
return TdsOperationStatus.Done;
}

static internal SqlDecimal AdjustSqlDecimalScale(SqlDecimal d, int newScale)
internal static SqlDecimal AdjustSqlDecimalScale(SqlDecimal d, int newScale)
{
if (d.Scale != newScale)
{
Expand All @@ -8364,7 +8364,7 @@ static internal SqlDecimal AdjustSqlDecimalScale(SqlDecimal d, int newScale)
return d;
}

static internal decimal AdjustDecimalScale(decimal value, int newScale)
internal static decimal AdjustDecimalScale(decimal value, int newScale)
{
int oldScale = (Decimal.GetBits(value)[3] & 0x00ff0000) >> 0x10;

Expand Down Expand Up @@ -8882,7 +8882,7 @@ private void ProcessAttention(TdsParserStateObject stateObj)
Debug.Assert(!stateObj._attentionSent, "Invalid attentionSent state at end of ProcessAttention");
}

static private int StateValueLength(int dataLen)
private static int StateValueLength(int dataLen)
{
return dataLen < 0xFF ? (dataLen + 1) : (dataLen + 5);
}
Expand Down Expand Up @@ -12471,11 +12471,11 @@ private Task WriteUnterminatedSqlValue(object value, MetaType type, int actualLe
return null;
}

private class TdsOutputStream : Stream
private sealed class TdsOutputStream : Stream
{
TdsParser _parser;
TdsParserStateObject _stateObj;
byte[] _preambleToStrip;
private TdsParser _parser;
private TdsParserStateObject _stateObj;
private byte[] _preambleToStrip;

public TdsOutputStream(TdsParser parser, TdsParserStateObject stateObj, byte[] preambleToStrip)
{
Expand Down Expand Up @@ -12659,11 +12659,11 @@ internal static void ValidateWriteParameters(byte[] buffer, int offset, int coun

}

private class ConstrainedTextWriter : TextWriter
private sealed class ConstrainedTextWriter : TextWriter
{
TextWriter _next;
int _size;
int _written;
private TextWriter _next;
private int _size;
private int _written;

public ConstrainedTextWriter(TextWriter next, int size)
{
Expand Down Expand Up @@ -14094,7 +14094,7 @@ internal string TraceString()

private string TraceObjectClass(object instance)
{
if (null == instance)
if (instance == null)
{
return "(null)";
}
Expand Down