4 writes to _stateObj
System.Data (4)
fx\src\data\System\Data\SqlClient\SqlCommand.cs (4)
4725
_stateObj
= null; // the reader now owns this...
4914
_stateObj
= null; // Session was re-claimed by session pool upon connection close.
4945
_stateObj
= stateObj;
5002
_stateObj
= null;
72 references to _stateObj
System.Data (72)
fx\src\data\System\Data\SqlClient\SqlCommand.cs (72)
942
Debug.Assert(null !=
_stateObj
, "TdsParserStateObject should not be null");
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");
1063
TdsParserStateObject stateObj =
_stateObj
;
1329
_stateObj
.ReadSni(completion);
1366
if (
_stateObj
!= null) {
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
);
1409
if (
_stateObj
!= null) {
1410
_stateObj
._networkPacketTaskSource = null;
1433
if (
_stateObj
== null) {
1443
Debug.Assert(!_internalEndExecuteInitiated ||
_stateObj
== null);
1456
lock (
_stateObj
) {
1533
Debug.Assert(
_stateObj
== null);
1548
Debug.Assert(
_stateObj
._syncOverAsync, "Should not attempt pends in a synchronous call");
1549
bool result =
_stateObj
.Parser.TryRun(RunBehavior.UntilDone, this, null, null,
_stateObj
, out dataReady);
1576
Debug.Assert(null ==
_stateObj
, "non-null state object in EndExecuteNonQuery");
1668
Debug.Assert(async || null ==
_stateObj
, "non-null state object in InternalExecuteNonQuery");
1822
_stateObj
.ReadSni(completion);
1868
Debug.Assert(!_internalEndExecuteInitiated ||
_stateObj
== null);
1881
lock (
_stateObj
) {
2074
Debug.Assert(!_internalEndExecuteInitiated ||
_stateObj
== null);
2087
lock (
_stateObj
) {
2225
lock (
_stateObj
) {
2319
_stateObj
.ReadSni(completion);
2381
Debug.Assert(null ==
_stateObj
, "non-null state object in InternalEndExecuteReader");
3110
Task executeTask =
_stateObj
.Parser.TdsExecuteSQLBatch(this.CommandText, timeout, this.Notification,
_stateObj
, sync: true);
3119
Debug.Assert(
_stateObj
._syncOverAsync, "Should not attempt pends in a synchronous call");
3120
bool result =
_stateObj
.Parser.TryRun(RunBehavior.UntilDone, this, null, null,
_stateObj
, out dataReady);
3395
Debug.Assert(null ==
_stateObj
, "non-null state object in PrepareForTransparentEncryption.");
3466
Debug.Assert(null ==
_stateObj
, "non-null state object in PrepareForTransparentEncryption.");
3775
Debug.Assert(
_stateObj
== null, "_stateObj should be null at this time, in PrepareDescribeParameterEncryptionRequest.");
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);
4523
Debug.Assert(
_stateObj
._syncOverAsync, "Should not attempt pends in a synchronous call");
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);
4578
Debug.Assert(async || null ==
_stateObj
, "non-null state object in RunExecuteReader");
4690
Debug.Assert(
_stateObj
== null);
4698
Debug.Assert(
_stateObj
._syncOverAsync, "Should not attempt pends in a synchronous call");
4699
bool result =
_stateObj
.Parser.TryRun(RunBehavior.UntilDone, this, ds, null,
_stateObj
, out dataReady);
4724
ds.Bind(
_stateObj
);
4921
Debug.Assert (null ==
_stateObj
,"StateObject not null on GetStateObject");
5001
TdsParserStateObject stateObj =
_stateObj
;
5069
_SqlRPCBatchArray[_currentlyExecutingBatch].errorsIndexEnd =
_stateObj
.ErrorCount;
5070
_SqlRPCBatchArray[_currentlyExecutingBatch].errors =
_stateObj
._errors;
5078
_SqlRPCBatchArray[_currentlyExecutingBatch].warningsIndexEnd =
_stateObj
.WarningCount;
5079
_SqlRPCBatchArray[_currentlyExecutingBatch].warnings =
_stateObj
._warnings;
5491
string paramList = BuildParamList(
_stateObj
.Parser, _parameters);
5645
string paramList = BuildParamList(
_stateObj
.Parser, BatchRPCMode ? parameters : _parameters);
5967
string paramList = BuildParamList(
_stateObj
.Parser, _parameters);
5987
var stateObj =
_stateObj
;
5996
var stateObj =
_stateObj
;
6005
return
_stateObj
;