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