40 writes to ThreadHasParserLockForClose
System.Data (40)
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (14)
1191
internalConnection.
ThreadHasParserLockForClose
= true;
1196
internalConnection.
ThreadHasParserLockForClose
= false;
1205
internalConnection.
ThreadHasParserLockForClose
= true;
1210
internalConnection.
ThreadHasParserLockForClose
= false;
1217
internalConnection.
ThreadHasParserLockForClose
= true; // In case of error, let the connection know that we have the lock
1224
internalConnection.
ThreadHasParserLockForClose
= false;
1233
internalConnection.
ThreadHasParserLockForClose
= true; // In case of error, let the connection know that we have the lock
1238
internalConnection.
ThreadHasParserLockForClose
= false;
2237
internalConnection.
ThreadHasParserLockForClose
= true; // In case of error, tell the connection we already have the parser lock
2242
internalConnection.
ThreadHasParserLockForClose
= false;
2432
_parser.Connection.
ThreadHasParserLockForClose
= true;
2447
_parser.Connection.
ThreadHasParserLockForClose
= false;
2623
internalConnection.
ThreadHasParserLockForClose
= true; // In case of error, let the connection know that we already have the parser lock
2631
internalConnection.
ThreadHasParserLockForClose
= false;
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (10)
399
ThreadHasParserLockForClose
= true; // In case of error, let ourselves know that we already own the parser lock
459
ThreadHasParserLockForClose
= false;
1089
ThreadHasParserLockForClose
= true; // In case of error, let the connection know that we already own the parser lock
1121
ThreadHasParserLockForClose
= false;
1171
ThreadHasParserLockForClose
= false;
2007
ThreadHasParserLockForClose
= true;
2015
ThreadHasParserLockForClose
= false;
2030
ThreadHasParserLockForClose
= true; // In case of error, let the connection know that we already own the parser lock
2043
ThreadHasParserLockForClose
= false;
2074
ThreadHasParserLockForClose
= false;
fx\src\data\System\Data\SqlClient\TdsParser.cs (8)
1298
connHandler.
ThreadHasParserLockForClose
= true;
1303
connHandler.
ThreadHasParserLockForClose
= false;
1315
_connHandler.
ThreadHasParserLockForClose
= true;
1323
_connHandler.
ThreadHasParserLockForClose
= threadAlreadyHadParserLockForClose;
7722
_connHandler.
ThreadHasParserLockForClose
= true;
7888
_connHandler.
ThreadHasParserLockForClose
= false;
7916
_connHandler.
ThreadHasParserLockForClose
= true;
7925
_connHandler.
ThreadHasParserLockForClose
= originalThreadHasParserLock;
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (8)
595
_parser.Connection.
ThreadHasParserLockForClose
= true;
602
_parser.Connection.
ThreadHasParserLockForClose
= false;
2871
_parser.Connection.
ThreadHasParserLockForClose
= true; // In case of error, let the connection know that we are holding the lock
2881
_parser.Connection.
ThreadHasParserLockForClose
= false;
3030
_parser.Connection.
ThreadHasParserLockForClose
= true;
3045
_parser.Connection.
ThreadHasParserLockForClose
= false;
3081
_parser.Connection.
ThreadHasParserLockForClose
= true;
3091
_parser.Connection.
ThreadHasParserLockForClose
= false;
14 references to ThreadHasParserLockForClose
System.Data (14)
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (5)
1086
Debug.Assert(!
ThreadHasParserLockForClose
|| _parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken");
1087
if (!
ThreadHasParserLockForClose
) {
2003
bool obtainParserLock = !
ThreadHasParserLockForClose
;
2024
Debug.Assert(!
ThreadHasParserLockForClose
, "Cannot call this method if caller has parser lock");
2025
if (
ThreadHasParserLockForClose
) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (7)
1313
bool threadAlreadyHadParserLockForClose = _connHandler.
ThreadHasParserLockForClose
;
7718
Debug.Assert(!_connHandler.
ThreadHasParserLockForClose
|| _connHandler._parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken");
7719
bool callerHasConnectionLock = _connHandler.
ThreadHasParserLockForClose
; // If the thread already claims to have the parser lock, then we will let the caller handle releasing it
7912
bool originalThreadHasParserLock = _connHandler.
ThreadHasParserLockForClose
;
7952
bool needToTakeParserLock = (!callerHasConnectionLock) && (!_connHandler.
ThreadHasParserLockForClose
);
7953
Debug.Assert(!_connHandler.
ThreadHasParserLockForClose
|| sync, "Thread shouldn't claim to have the parser lock if we are doing async writes"); // Since we have the possibility of pending with async writes, make sure the thread doesn't claim to already have the lock
8052
Debug.Assert(!firstCall || !_connHandler.
ThreadHasParserLockForClose
, "Thread should not already have connection lock");
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (2)
601
if (_parser.Connection.
ThreadHasParserLockForClose
) {
3027
if ((mustTakeWriteLock) && (!_parser.Connection.
ThreadHasParserLockForClose
)) {