110 references to Parser
System.Data (110)
fx\src\data\System\Data\SqlClient\SqlCommand.cs (20)
943
Debug.Assert(null != _stateObj.
Parser
, "TdsParser class should not be null in Command.Execute!");
944
Debug.Assert(_stateObj.
Parser
== _activeConnection.Parser, "stateobject parser not same as connection parser");
1367
_stateObj.
Parser
.State = TdsParserState.Broken; // We failed to respond to attention, we have to quit!
1368
_stateObj.
Parser
.Connection.BreakConnection();
1369
_stateObj.
Parser
.ThrowExceptionAndWarning(_stateObj);
1549
bool result = _stateObj.
Parser
.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out dataReady);
3110
Task executeTask = _stateObj.
Parser
.TdsExecuteSQLBatch(this.CommandText, timeout, this.Notification, _stateObj, sync: true);
3120
bool result = _stateObj.
Parser
.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out dataReady);
4423
writeTask = _stateObj.
Parser
.TdsExecuteRPC(this, _sqlRPCParameterEncryptionReqArray, timeout, inSchema, this.Notification, _stateObj, CommandType.StoredProcedure == CommandType, sync: !asyncWrite);
4434
writeTask = _stateObj.
Parser
.TdsExecuteRPC(this, _SqlRPCBatchArray, timeout, inSchema, this.Notification, _stateObj, CommandType.StoredProcedure == CommandType, sync: !asyncWrite );
4451
writeTask = _stateObj.
Parser
.TdsExecuteSQLBatch(text, timeout, this.Notification, _stateObj,
4455
writeTask = _stateObj.
Parser
.TdsExecuteSQLBatch(text, timeout, this.Notification, _stateObj, sync: !asyncWrite);
4500
writeTask = _stateObj.
Parser
.TdsExecuteRPC(this, _rpcArrayOf1, timeout, inSchema, this.Notification, _stateObj, CommandType.StoredProcedure == CommandType, sync:!asyncWrite);
4520
Task executeTask = _stateObj.
Parser
.TdsExecuteSQLBatch(optionSettings, timeout, this.Notification, _stateObj, sync: true);
4524
bool result = _stateObj.
Parser
.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out dataReady);
4535
writeTask=_stateObj.
Parser
.TdsExecuteRPC(this, _rpcArrayOf1, timeout, inSchema, this.Notification, _stateObj, CommandType.StoredProcedure == CommandType, sync:!asyncWrite);
4699
bool result = _stateObj.
Parser
.TryRun(RunBehavior.UntilDone, this, ds, null, _stateObj, out dataReady);
5491
string paramList = BuildParamList(_stateObj.
Parser
, _parameters);
5645
string paramList = BuildParamList(_stateObj.
Parser
, BatchRPCMode ? parameters : _parameters);
5967
string paramList = BuildParamList(_stateObj.
Parser
, _parameters);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (4)
415
_parser = stateObj.
Parser
;
719
if (!_stateObj.
Parser
.TrySkipRow(_metaData, _stateObj)) {
732
if (!_stateObj.
Parser
.TrySkipRow(_metaData, _sharedState._nextColumnHeaderToRead, _stateObj)) {
3637
if (!_stateObj.
Parser
.TrySkipPlpValue(UInt64.MaxValue, _stateObj, out ignored)) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (4)
3791
if (!stateObj.
Parser
.TrySkipRow(stateObj._cleanupMetaData, stateObj)) {
3818
if (!stateObj.
Parser
.TrySkipRow(metadata, sharedState._nextColumnHeaderToRead, stateObj)) {
7701
Debug.Assert(this == stateObj.
Parser
, "different parsers");
7849
Debug.Assert(this == stateObj.
Parser
, "different parser");
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (10)
641
Parser
.ProcessPendingAck(this);
693
Parser
.PutSession(this);
718
Parser
.ProcessPendingAck(this);
772
TdsParserState state =
Parser
.State;
775
Parser
.DrainData(this); // This may throw - taking us to catch block.
2010
Parser
.State = TdsParserState.Broken;
2011
Parser
.Connection.BreakConnection();
2323
if (stateObj.
Parser
.State == TdsParserState.OpenLoggedIn) {
3076
Debug.Assert(
Parser
.Connection._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock");
3178
SqlStatistics statistics =
Parser
.Statistics;
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (72)
63
_stateObj.
Parser
.WriteUnsignedLong(TdsEnums.SQL_PLP_NULL, _stateObj);
96
_stateObj.
Parser
.WriteShort(TdsEnums.VARNULL, _stateObj);
103
_stateObj.
Parser
.WriteInt(TdsEnums.FIXEDNULL, _stateObj);
120
_stateObj.
Parser
.WriteSqlVariantHeader(3, TdsEnums.SQLBIT, 0, _stateObj);
138
_stateObj.
Parser
.WriteSqlVariantHeader(3, TdsEnums.SQLINT1, 0, _stateObj);
165
_stateObj.
Parser
.WriteUnsignedLong(TdsEnums.SQL_PLP_UNKNOWNLEN, _stateObj);
170
_stateObj.
Parser
.WriteInt(length, _stateObj);
183
_stateObj.
Parser
.WriteSqlVariantHeader(4 + length, TdsEnums.SQLBIGVARBINARY, 2, _stateObj);
185
_stateObj.
Parser
.WriteShort(length, _stateObj);
199
_stateObj.
Parser
.WriteLong(0, _stateObj);
207
_stateObj.
Parser
.WriteSqlVariantHeader(4, TdsEnums.SQLBIGVARBINARY, 2, _stateObj);
209
_stateObj.
Parser
.WriteShort(0, _stateObj);
213
_stateObj.
Parser
.WriteInt(TdsEnums.SQL_PLP_CHUNK_TERMINATOR, _stateObj);
234
_encoder = _stateObj.
Parser
._defaultEncoding.GetEncoder();
248
_stateObj.
Parser
.WriteUnsignedLong(TdsEnums.SQL_PLP_UNKNOWNLEN, _stateObj);
253
_stateObj.
Parser
.WriteInt(length*ADP.CharSize, _stateObj);
254
_stateObj.
Parser
.WriteCharArray(buffer, length, bufferOffset, _stateObj);
263
_stateObj.
Parser
.WriteSqlVariantValue(new String(buffer, bufferOffset, length), length, 0, _stateObj);
268
_stateObj.
Parser
.WriteShort(length*ADP.CharSize, _stateObj);
269
_stateObj.
Parser
.WriteCharArray(buffer, length, bufferOffset, _stateObj);
288
_stateObj.
Parser
.WriteLong(0, _stateObj);
295
_stateObj.
Parser
.WriteShort(0, _stateObj);
299
_stateObj.
Parser
.WriteInt(TdsEnums.SQL_PLP_CHUNK_TERMINATOR, _stateObj);
320
bytes = _stateObj.
Parser
._defaultEncoding.GetBytes(value);
324
bytes = _stateObj.
Parser
._defaultEncoding.GetBytes(chars);
340
bytes = _stateObj.
Parser
._defaultEncoding.GetBytes(value);
343
bytes = _stateObj.
Parser
._defaultEncoding.GetBytes(value.ToCharArray(offset, length));
345
_stateObj.
Parser
.WriteSqlVariantHeader(9 + bytes.Length, TdsEnums.SQLBIGVARCHAR, 7, _stateObj);
346
_stateObj.
Parser
.WriteUnsignedInt(collation.info, _stateObj); // propbytes: collation.Info
348
_stateObj.
Parser
.WriteShort(bytes.Length, _stateObj); // propbyte: varlen
352
_stateObj.
Parser
.WriteSqlVariantHeader(9 + length * ADP.CharSize, TdsEnums.SQLNVARCHAR, 7, _stateObj);
353
_stateObj.
Parser
.WriteUnsignedInt(collation.info, _stateObj); // propbytes: collation.Info
355
_stateObj.
Parser
.WriteShort(length * ADP.CharSize, _stateObj); // propbyte: varlen
356
_stateObj.
Parser
.WriteString(value, length, offset, _stateObj);
362
_stateObj.
Parser
.WriteLong(length*ADP.CharSize, _stateObj); // PLP total length
363
_stateObj.
Parser
.WriteInt(length*ADP.CharSize, _stateObj); // Chunk length
364
_stateObj.
Parser
.WriteString(value, length, offset, _stateObj); // Data
366
_stateObj.
Parser
.WriteInt(TdsEnums.SQL_PLP_CHUNK_TERMINATOR, _stateObj); // Terminator
370
_stateObj.
Parser
.WriteShort(length*ADP.CharSize, _stateObj);
371
_stateObj.
Parser
.WriteString(value, length, offset, _stateObj);
381
_stateObj.
Parser
.WriteSqlVariantHeader(4, TdsEnums.SQLINT2, 0, _stateObj);
386
_stateObj.
Parser
.WriteShort(value, _stateObj);
394
_stateObj.
Parser
.WriteSqlVariantHeader(6, TdsEnums.SQLINT4, 0, _stateObj);
399
_stateObj.
Parser
.WriteInt(value, _stateObj);
408
_stateObj.
Parser
.WriteSqlVariantHeader(10, TdsEnums.SQLINT8, 0, _stateObj);
409
_stateObj.
Parser
.WriteLong(value, _stateObj);
414
_stateObj.
Parser
.WriteSqlVariantHeader(10, TdsEnums.SQLMONEY, 0, _stateObj);
415
_stateObj.
Parser
.WriteInt((int)(value >> 0x20), _stateObj);
416
_stateObj.
Parser
.WriteInt((int)value, _stateObj);
423
_stateObj.
Parser
.WriteInt((int)value, _stateObj);
426
_stateObj.
Parser
.WriteInt((int)(value >> 0x20), _stateObj);
427
_stateObj.
Parser
.WriteInt((int)value, _stateObj);
430
_stateObj.
Parser
.WriteLong(value, _stateObj);
440
_stateObj.
Parser
.WriteSqlVariantHeader(6, TdsEnums.SQLFLT4, 0, _stateObj);
445
_stateObj.
Parser
.WriteFloat(value, _stateObj);
453
_stateObj.
Parser
.WriteSqlVariantHeader(10, TdsEnums.SQLFLT8, 0, _stateObj);
458
_stateObj.
Parser
.WriteDouble(value, _stateObj);
466
_stateObj.
Parser
.WriteSqlVariantHeader(21, TdsEnums.SQLNUMERICN, 2, _stateObj);
469
_stateObj.
Parser
.WriteSqlDecimal(value, _stateObj);
473
_stateObj.
Parser
.WriteSqlDecimal(SqlDecimal.ConvertToPrecScale(value, _metaData.Precision, _metaData.Scale), _stateObj);
484
_stateObj.
Parser
.WriteSqlVariantDateTime2(value, _stateObj);
488
_stateObj.
Parser
.WriteSqlVariantDate(value, _stateObj);
493
_stateObj.
Parser
.WriteSqlVariantHeader(10, TdsEnums.SQLDATETIME, 0, _stateObj);
494
_stateObj.
Parser
.WriteInt(dt.days, _stateObj);
495
_stateObj.
Parser
.WriteInt(dt.time, _stateObj);
509
_stateObj.
Parser
.WriteShort(dt.days, _stateObj);
510
_stateObj.
Parser
.WriteShort(dt.time, _stateObj);
513
_stateObj.
Parser
.WriteInt(dt.days, _stateObj);
514
_stateObj.
Parser
.WriteInt(dt.time, _stateObj);
535
_stateObj.
Parser
.WriteSqlVariantHeader(18, TdsEnums.SQLUNIQUEID, 0, _stateObj);
554
_stateObj.
Parser
.WriteSqlVariantHeader(8, TdsEnums.SQLTIME, 1, _stateObj);
577
_stateObj.
Parser
.WriteSqlVariantHeader(13, TdsEnums.SQLDATETIMEOFFSET, 1, _stateObj);