2 instantiations of TdsParserStateObject
System.Data (2)
fx\src\data\System\Data\SqlClient\TdsParser.cs (2)
266
_physicalStateObj = new
TdsParserStateObject
(this);
638
TdsParserStateObject session = new
TdsParserStateObject
(this, (SNIHandle)_pMarsPhysicalConObj.Handle, true);
205 references to TdsParserStateObject
System.Data (205)
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (2)
249
private
TdsParserStateObject
_stateObj;
1919
TdsParserStateObject
stateObj = _stateObj;
fx\src\data\System\Data\SqlClient\SqlCachedBuffer.cs (1)
46
static internal bool TryCreate(SqlMetaDataPriv metadata, TdsParser parser,
TdsParserStateObject
stateObj, out SqlCachedBuffer buffer) {
fx\src\data\System\Data\SqlClient\SqlCommand.cs (9)
267
private
TdsParserStateObject
_stateObj; // this is the TDS session we're using.
1063
TdsParserStateObject
stateObj = _stateObj;
4942
TdsParserStateObject
stateObj = parser.GetSession(this);
5001
TdsParserStateObject
stateObj = _stateObj;
5013
internal void OnDoneDescribeParameterEncryptionProc(
TdsParserStateObject
stateObj) {
5143
internal void OnReturnValue(SqlReturnValue rec,
TdsParserStateObject
stateObj) {
5987
var
stateObj = _stateObj;
5996
var
stateObj = _stateObj;
6003
internal
TdsParserStateObject
StateObject {
fx\src\data\System\Data\SqlClient\SqlConnection.cs (1)
1287
TdsParserStateObject
stateObj = tdsConn.Parser._physicalStateObj;
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (12)
48
private
TdsParserStateObject
_stateObj;
408
internal void Bind(
TdsParserStateObject
stateObj) {
687
TdsParserStateObject
stateObj = _stateObj;
805
TdsParserStateObject
stateObj = _stateObj;
881
TdsParserStateObject
stateObj = _stateObj;
1094
var
stateObj = _stateObj;
3680
private void RestoreServerSettings(TdsParser parser,
TdsParserStateObject
stateObj) {
3832
TdsParserStateObject
stateObj = _stateObj;
4583
TdsParserStateObject
stateObj = _stateObj;
4655
var
stateObj = _stateObj;
4717
var
stateObj = _stateObj;
4735
private void CleanupAfterAsyncInvocationInternal(
TdsParserStateObject
stateObj, bool resetNetworkPacketTaskSource = true)
fx\src\data\System\Data\SqlClient\SqlInternalConnection.cs (1)
669
internal SqlCommand FindLiveCommand(
TdsParserStateObject
stateObj) {
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (1)
1081
TdsParserStateObject
stateObj = _parser._physicalStateObj;
fx\src\data\System\Data\SqlClient\SqlReferenceCollection.cs (1)
48
internal SqlCommand FindLiveCommand(
TdsParserStateObject
stateObj) {
fx\src\data\System\Data\SqlClient\TdsParameterSetter.cs (1)
30
internal TdsParameterSetter(
TdsParserStateObject
stateObj, SmiMetaData md) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (155)
125
internal
TdsParserStateObject
_physicalStateObj = null; // Default stateObj and connection for Dbnetlib and non-MARS SNI.
128
internal
TdsParserStateObject
_pMarsPhysicalConObj = null; // With MARS enabled, cached physical stateObj and connection.
388
internal void ProcessPendingAck(
TdsParserStateObject
stateObj) {
637
internal
TdsParserStateObject
CreateSession() {
638
TdsParserStateObject
session = new TdsParserStateObject(this, (SNIHandle)_pMarsPhysicalConObj.Handle, true);
645
internal
TdsParserStateObject
GetSession(object owner) {
646
TdsParserStateObject
session = null;
668
internal void PutSession(
TdsParserStateObject
session) {
694
var
stateObj = _physicalStateObj;
708
var
marsStateObj = _pMarsPhysicalConObj;
1188
private void FireInfoMessageEvent(SqlConnection connection,
TdsParserStateObject
stateObj, SqlError error) {
1231
internal void ThrowExceptionAndWarning(
TdsParserStateObject
stateObj, bool callerHasConnectionLock = false, bool asyncClose = false) {
1330
internal SqlError ProcessSNIError(
TdsParserStateObject
stateObj) {
1432
internal void CheckResetConnection(
TdsParserStateObject
stateObj) {
1516
internal byte[] SerializeShort(int v,
TdsParserStateObject
stateObj) {
1531
internal void WriteShort(int v,
TdsParserStateObject
stateObj) {
1547
internal void WriteUnsignedShort(ushort us,
TdsParserStateObject
stateObj) {
1554
internal byte[] SerializeUnsignedInt(uint i,
TdsParserStateObject
stateObj) {
1558
internal void WriteUnsignedInt(uint i,
TdsParserStateObject
stateObj) {
1565
internal byte[] SerializeInt(int v,
TdsParserStateObject
stateObj) {
1582
internal void WriteInt(int v,
TdsParserStateObject
stateObj) {
1613
internal void WriteFloat(float v,
TdsParserStateObject
stateObj) {
1622
internal byte[] SerializeLong(long v,
TdsParserStateObject
stateObj) {
1643
internal void WriteLong(long v,
TdsParserStateObject
stateObj) {
1684
internal void WritePartialLong(long v, int length,
TdsParserStateObject
stateObj) {
1707
internal void WriteUnsignedLong(ulong uv,
TdsParserStateObject
stateObj) {
1722
internal void WriteDouble(double v,
TdsParserStateObject
stateObj) {
1734
internal bool RunReliably(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject
stateObj) {
1766
internal bool Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject
stateObj) {
1820
internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler,
TdsParserStateObject
stateObj, out bool dataReady) {
2356
private bool TryProcessEnvChange(int tokenLength,
TdsParserStateObject
stateObj, out SqlEnvChange[] sqlEnvChange) {
2624
private bool TryReadTwoBinaryFields(SqlEnvChange env,
TdsParserStateObject
stateObj) {
2649
private bool TryReadTwoStringFields(SqlEnvChange env,
TdsParserStateObject
stateObj) {
2676
private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavior run,
TdsParserStateObject
stateObj) {
2877
private bool TryProcessFeatureExtAck(
TdsParserStateObject
stateObj) {
2923
private bool TryProcessSessionState(
TdsParserStateObject
stateObj, int length, SessionData sdata) {
3016
private bool TryProcessLoginAck(
TdsParserStateObject
stateObj, out SqlLoginAck sqlLoginAck) {
3127
private bool TryProcessFedAuthInfo(
TdsParserStateObject
stateObj, int tokenLen, out SqlFedAuthInfo sqlFedAuthInfo) {
3254
internal bool TryProcessError(byte token,
TdsParserStateObject
stateObj, out SqlError error) {
3346
TdsParserStateObject
stateObj,
3568
internal bool TryProcessTceCryptoMetadata (
TdsParserStateObject
stateObj,
3659
internal bool TryProcessCollation(
TdsParserStateObject
stateObj, out SqlCollation collation) {
3675
private void WriteCollation(SqlCollation collation,
TdsParserStateObject
stateObj) {
3687
internal int GetCodePage(SqlCollation collation,
TdsParserStateObject
stateObj) {
3768
internal void DrainData(
TdsParserStateObject
stateObj) {
3852
internal void ThrowUnsupportedCollationEncountered(
TdsParserStateObject
stateObj) {
3866
internal bool TryProcessAltMetaData(int cColumns,
TdsParserStateObject
stateObj, out _SqlMetaDataSet metaData) {
3971
internal bool TryReadCipherInfoEntry (
TdsParserStateObject
stateObj, out SqlTceCipherInfoEntry entry) {
4081
internal bool TryProcessCipherInfoTable (
TdsParserStateObject
stateObj, out SqlTceCipherInfoTable? cipherTable) {
4108
internal bool TryProcessMetaData(int cColumns,
TdsParserStateObject
stateObj, out _SqlMetaDataSet metaData, SqlCommandColumnEncryptionSetting columnEncryptionSetting) {
4138
private bool TryProcessTypeInfo (
TdsParserStateObject
stateObj, SqlMetaDataPriv col, UInt32 userType) {
4282
private bool TryCommonProcessMetaData(
TdsParserStateObject
stateObj, _SqlMetaData col, SqlTceCipherInfoTable? cipherTable, bool fColMD, SqlCommandColumnEncryptionSetting columnEncryptionSetting) {
4371
private bool TryProcessUDTMetaData(SqlMetaDataPriv metaData,
TdsParserStateObject
stateObj) {
4423
TdsParserStateObject
stateObj) {
4452
internal bool TryProcessTableName(int length,
TdsParserStateObject
stateObj, out MultiPartTableName[] multiPartTableNames) {
4482
private bool TryProcessOneTable(
TdsParserStateObject
stateObj, ref int length, out MultiPartTableName multiPartTableName) {
4568
private bool TryProcessColInfo(_SqlMetaDataSet columns, SqlDataReader reader,
TdsParserStateObject
stateObj, out _SqlMetaDataSet metaData) {
4628
internal bool TryProcessColumnHeader(SqlMetaDataPriv col,
TdsParserStateObject
stateObj, int columnOrdinal, out bool isNull, out ulong length) {
4640
private bool TryProcessColumnHeaderNoNBC(SqlMetaDataPriv col,
TdsParserStateObject
stateObj, out bool isNull, out ulong length) {
4692
internal bool TryGetAltRowId(
TdsParserStateObject
stateObj, out int id) {
4717
private bool TryProcessRow(_SqlMetaDataSet columns, object[] buffer, int[] map,
TdsParserStateObject
stateObj) {
4892
internal bool TrySkipRow(_SqlMetaDataSet columns,
TdsParserStateObject
stateObj) {
4896
internal bool TrySkipRow(_SqlMetaDataSet columns, int startCol,
TdsParserStateObject
stateObj) {
4910
internal bool TrySkipValue(SqlMetaDataPriv md, int columnOrdinal,
TdsParserStateObject
stateObj) {
4978
private bool TryReadSqlStringValue(SqlBuffer value, byte type, int length, Encoding encoding, bool isPlp,
TdsParserStateObject
stateObj) {
5039
internal bool DeserializeUnencryptedValue (SqlBuffer value, byte[] unencryptedBytes, SqlMetaDataPriv md,
TdsParserStateObject
stateObj, byte normalizationVersion) {
5296
TdsParserStateObject
stateObj,
5410
private bool TryReadSqlDateTime(SqlBuffer value, byte tdsType, int length, byte scale,
TdsParserStateObject
stateObj) {
5446
internal bool TryReadSqlValueInternal(SqlBuffer value, byte tdsType, int length,
TdsParserStateObject
stateObj) {
5652
internal bool TryReadSqlVariant(SqlBuffer value, int lenTotal,
TdsParserStateObject
stateObj) {
5816
internal Task WriteSqlVariantValue(object value, int length, int offset,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
5980
internal Task WriteSqlVariantDataRowValue(object value,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
6131
internal void WriteSqlVariantHeader(int length, byte tdstype, byte propbytes,
TdsParserStateObject
stateObj) {
6137
internal void WriteSqlVariantDateTime2(DateTime value,
TdsParserStateObject
stateObj)
6146
internal void WriteSqlVariantDate(DateTime value,
TdsParserStateObject
stateObj)
6154
private byte[] SerializeSqlMoney(SqlMoney value, int length,
TdsParserStateObject
stateObj) {
6158
private void WriteSqlMoney(SqlMoney value, int length,
TdsParserStateObject
stateObj) {
6185
private byte[] SerializeCurrency(Decimal value, int length,
TdsParserStateObject
stateObj) {
6224
private void WriteCurrency(Decimal value, int length,
TdsParserStateObject
stateObj) {
6254
private void WriteDate(DateTime value,
TdsParserStateObject
stateObj) {
6273
private void WriteTime(TimeSpan value, byte scale, int length,
TdsParserStateObject
stateObj) {
6302
private void WriteDateTime2(DateTime value, byte scale, int length,
TdsParserStateObject
stateObj) {
6329
private void WriteDateTimeOffset(DateTimeOffset value, byte scale, int length,
TdsParserStateObject
stateObj) {
6336
private bool TryReadSqlDecimal(SqlBuffer value, int length, byte precision, byte scale,
TdsParserStateObject
stateObj) {
6356
private bool TryReadDecimalBits(int length,
TdsParserStateObject
stateObj, out int[] bits) {
6404
internal byte[] SerializeSqlDecimal(SqlDecimal d,
TdsParserStateObject
stateObj) {
6433
internal void WriteSqlDecimal(SqlDecimal d,
TdsParserStateObject
stateObj) {
6446
private byte[] SerializeDecimal(decimal value,
TdsParserStateObject
stateObj) {
6495
private void WriteDecimal(decimal value,
TdsParserStateObject
stateObj) {
6530
private void WriteIdentifier(string s,
TdsParserStateObject
stateObj) {
6540
private void WriteIdentifierWithShortLength(string s,
TdsParserStateObject
stateObj) {
6550
private Task WriteString(string s,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
6562
internal Task WriteCharArray(char[] carr, int length, int offset,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
6589
internal Task WriteString(string s, int length, int offset,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
6669
private Task WriteEncodingChar(string s, Encoding encoding,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
6690
private Task WriteEncodingChar(string s, int numChars, int offset, Encoding encoding,
TdsParserStateObject
stateObj, bool canAccumulate = true) {
6741
internal bool TryGetDataLength(SqlMetaDataPriv colmeta,
TdsParserStateObject
stateObj, out ulong length) {
6770
internal bool TryGetTokenLength(byte token,
TdsParserStateObject
stateObj, out int tokenLength) {
6844
private void ProcessAttention(
TdsParserStateObject
stateObj) {
7640
internal byte[] GetDTCAddress(int timeout,
TdsParserStateObject
stateObj) {
7682
internal void PropagateDistributedTransaction(byte[] buffer, int timeout,
TdsParserStateObject
stateObj) {
7698
TdsParserStateObject
stateObj,
7894
internal void FailureCleanup(
TdsParserStateObject
stateObj, Exception e) {
7932
internal Task TdsExecuteSQLBatch(string text, int timeout, SqlNotificationRequest notificationRequest,
TdsParserStateObject
stateObj, bool sync, bool callerHasConnectionLock = false, byte[] enclavePackage = null) {
8044
internal Task TdsExecuteRPC(SqlCommand cmd, _SqlRPC[] rpcArray, int timeout, bool inSchema, SqlNotificationRequest notificationRequest,
TdsParserStateObject
stateObj, bool isCommandProc, bool sync = true,
8633
private void WriteEnclaveInfo(
TdsParserStateObject
stateObj, byte[] enclavePackage) {
8649
private void FinalizeExecuteRPC(
TdsParserStateObject
stateObj) {
8654
private void TdsExecuteRPC_OnFailure(Exception exc,
TdsParserStateObject
stateObj) {
8688
private void ExecuteFlushTaskCallback(Task tsk,
TdsParserStateObject
stateObj, TaskCompletionSource<object> completion, bool releaseConnectionLock) {
8744
private void WriteParameterName(string parameterName,
TdsParserStateObject
stateObj) {
8759
private void WriteSmiParameter(SqlParameter param, int paramIndex, bool sendDefault,
TdsParserStateObject
stateObj) {
8831
private void WriteSmiParameterMetaData(MSS.SmiParameterMetaData metaData, bool sendDefault,
TdsParserStateObject
stateObj) {
8850
private void WriteSmiTypeInfo(MSS.SmiExtendedMetaData metaData,
TdsParserStateObject
stateObj) {
9016
private void WriteTvpTypeInfo(MSS.SmiExtendedMetaData metaData,
TdsParserStateObject
stateObj) {
9051
private void WriteTvpColumnMetaData(MSS.SmiExtendedMetaData md, bool isDefault,
TdsParserStateObject
stateObj) {
9086
private void WriteTvpOrderUnique(MSS.SmiExtendedMetaData metaData,
TdsParserStateObject
stateObj) {
9130
internal Task WriteBulkCopyDone(
TdsParserStateObject
stateObj) {
9168
internal void WriteEncryptionEntries (ref SqlTceCipherInfoTable cekTable,
TdsParserStateObject
stateObj) {
9192
internal void WriteCekTable (_SqlMetaDataSet metadataCollection,
TdsParserStateObject
stateObj) {
9219
internal void WriteTceUserTypeAndTypeInfo(SqlMetaDataPriv mdPriv,
TdsParserStateObject
stateObj) {
9256
internal void WriteCryptoMetadata(_SqlMetaData md,
TdsParserStateObject
stateObj) {
9286
internal void WriteBulkCopyMetaData(_SqlMetaDataSet metadataCollection, int count,
TdsParserStateObject
stateObj) {
9394
internal object EncryptColumnValue (object value, SqlMetaDataPriv metadata, string column,
TdsParserStateObject
stateObj, bool isDataFeed, bool isSqlType) {
9489
internal Task WriteBulkCopyValue(object value, SqlMetaDataPriv metadata,
TdsParserStateObject
stateObj, bool isSqlType, bool isDataFeed, bool isNull) {
9660
private void WriteMarsHeaderData(
TdsParserStateObject
stateObj, SqlInternalTransaction transaction) {
9728
private void WriteQueryNotificationHeaderData(SqlNotificationRequest notificationRequest,
TdsParserStateObject
stateObj) {
9761
private void WriteTraceHeaderData(
TdsParserStateObject
stateObj) {
9776
private void WriteRPCBatchHeaders(
TdsParserStateObject
stateObj, SqlNotificationRequest notificationRequest) {
9830
private void WriteTokenLength(byte token, int length,
TdsParserStateObject
stateObj) {
9924
private Task GetTerminationTask(Task unterminatedWriteTask, object value, MetaType type, int actualLength,
TdsParserStateObject
stateObj, bool isDataFeed) {
9931
return AsyncHelper.CreateContinuationTask<int,
TdsParserStateObject
>(unterminatedWriteTask,
9942
private Task WriteSqlValue(object value, MetaType type, int actualLength, int codePageByteSize, int offset,
TdsParserStateObject
stateObj) {
9950
private Task WriteUnterminatedSqlValue(object value, MetaType type, int actualLength, int codePageByteSize, int offset,
TdsParserStateObject
stateObj) {
10106
TdsParserStateObject
_stateObj;
10109
public TdsOutputStream(TdsParser parser,
TdsParserStateObject
stateObj, byte[] preambleToStrip) {
10360
private async Task WriteXmlFeed(XmlDataFeed feed,
TdsParserStateObject
stateObj, bool needBom, Encoding encoding, int size) {
10405
private async Task WriteTextFeed(TextDataFeed feed, Encoding encoding, bool needBom,
TdsParserStateObject
stateObj, int size) {
10454
private async Task WriteStreamFeed(StreamDataFeed feed,
TdsParserStateObject
stateObj, int len) {
10505
private Task WriteValue(object value, MetaType type, byte scale, int actualLength, int encodingByteSize, int offset,
TdsParserStateObject
stateObj, int paramSize, bool isDataFeed) {
10512
private Task WriteUnterminatedValue(object value, MetaType type, byte scale, int actualLength, int encodingByteSize, int offset,
TdsParserStateObject
stateObj, int paramSize, bool isDataFeed)
10711
private Task WriteEncryptionMetadata(Task terminatedWriteTask, SqlColumnEncryptionInputParameterInfo columnEncryptionParameterInfo,
TdsParserStateObject
stateObj) {
10722
return AsyncHelper.CreateContinuationTask<SqlColumnEncryptionInputParameterInfo,
TdsParserStateObject
>(terminatedWriteTask,
10731
private void WriteEncryptionMetadata(SqlColumnEncryptionInputParameterInfo columnEncryptionParameterInfo,
TdsParserStateObject
stateObj) {
10746
private byte[] SerializeUnencryptedValue(object value, MetaType type, byte scale, int actualLength, int offset, bool isDataFeed, byte normalizationVersion,
TdsParserStateObject
stateObj) {
10915
private byte[] SerializeUnencryptedSqlValue(object value, MetaType type, int actualLength, int offset, byte normalizationVersion,
TdsParserStateObject
stateObj) {
11066
internal void WriteParameterVarLen(MetaType type, int size, bool isNull,
TdsParserStateObject
stateObj, bool unknownLength=false) {
11119
private bool TryReadPlpUnicodeCharsChunk(char[] buff, int offst, int len,
TdsParserStateObject
stateObj, out int charsRead) {
11146
internal int ReadPlpUnicodeChars(ref char[] buff, int offst, int len,
TdsParserStateObject
stateObj) {
11158
internal bool TryReadPlpUnicodeChars(ref char[] buff, int offst, int len,
TdsParserStateObject
stateObj, out int totalCharsRead) {
11249
internal int ReadPlpAnsiChars(ref char[] buff, int offst, int len, SqlMetaDataPriv metadata,
TdsParserStateObject
stateObj) {
11314
internal ulong SkipPlpValue(ulong cb,
TdsParserStateObject
stateObj) {
11322
internal bool TrySkipPlpValue(ulong cb,
TdsParserStateObject
stateObj, out ulong totalBytesSkipped) {
11359
internal ulong PlpBytesLeft(
TdsParserStateObject
stateObj) {
11366
internal bool TryPlpBytesLeft(
TdsParserStateObject
stateObj, out ulong left) {
11379
internal ulong PlpBytesTotalLength(
TdsParserStateObject
stateObj) {
fx\src\data\System\Data\SqlClient\TdsParserSafeHandles.cs (4)
94
TdsParserStateObject
stateObj = (
TdsParserStateObject
)gcHandle.Target;
112
TdsParserStateObject
stateObj = (
TdsParserStateObject
)gcHandle.Target;
fx\src\data\System\Data\SqlClient\TdsParserSessionPool.cs (9)
36
private readonly List<
TdsParserStateObject
> _cache; // collection of all known sessions
38
private
TdsParserStateObject
[] _freeStateObjects; // collection of all sessions available for reuse
43
_cache = new List<
TdsParserStateObject
>();
44
_freeStateObjects = new
TdsParserStateObject
[MaxInactiveCount];
79
TdsParserStateObject
session = _cache[i];
105
TdsParserStateObject
session = _cache[i];
150
internal
TdsParserStateObject
GetSession(object owner) {
151
TdsParserStateObject
session;
185
internal void PutSession(
TdsParserStateObject
session) {
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (4)
497
internal bool TryInitialize(
TdsParserStateObject
stateObj, int columnsCount) {
2307
private void ReadSniError(
TdsParserStateObject
stateObj, UInt32 error) {
3558
private readonly
TdsParserStateObject
_stateObj;
3560
public StateSnapshot(
TdsParserStateObject
state) {
fx\src\data\System\Data\SqlClient\TdsRecordBufferSetter.cs (2)
27
private
TdsParserStateObject
_stateObj; // target to write to
41
internal TdsRecordBufferSetter(
TdsParserStateObject
stateObj, SmiMetaData md) {
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (2)
29
private
TdsParserStateObject
_stateObj; // target to write to
43
internal TdsValueSetter(
TdsParserStateObject
stateObj, SmiMetaData md) {