42 references to Exchange
mscorlib (1)
system\threading\Tasks\BeginEndAwaitableAdapter.cs (1)
86
Action continuation = Interlocked.
Exchange
(ref adapter._continuation, CALLBACK_RAN);
PresentationFramework (3)
src\Framework\MS\Internal\Data\CollectionViewProxy.cs (1)
176
IndexedEnumerable indexer = (IndexedEnumerable) Interlocked.
Exchange
(ref _indexer, null);
src\Framework\MS\Internal\Data\DataBindEngine.cs (1)
634
HybridDictionary asyncDispatchers = (HybridDictionary)Interlocked.
Exchange
(ref _asyncDispatchers, null);
src\Framework\System\Windows\Data\CollectionView.cs (1)
1452
IndexedEnumerable wrapper = (IndexedEnumerable) Interlocked.
Exchange
(ref _enumerableWrapper, null);
System (12)
net\System\Net\_SafeNetHandles.cs (2)
2507
InnerSafeCloseSocket innerSocket = m_InnerSocket == null ? null : Interlocked.
Exchange
<InnerSafeCloseSocket>(ref m_InnerSocket, null);
2526
InnerSafeCloseSocket innerSocket = m_InnerSocket == null ? null : Interlocked.
Exchange
<InnerSafeCloseSocket>(ref m_InnerSocket, null);
net\System\Net\_SSPISessionCache.cs (1)
45
newRef = Interlocked.
Exchange
<SafeCredentialReference>(ref _CacheSlots[index], newRef);
net\System\Net\Sockets\_BaseOverlappedAsyncResult.cs (4)
231
m_Cache = overlappedCache == null ? null : Interlocked.
Exchange
<OverlappedCache>(ref overlappedCache, null);
277
OverlappedCache cache = m_Cache == null ? null : Interlocked.
Exchange
<OverlappedCache>(ref m_Cache, null);
289
OverlappedCache oldCache = Interlocked.
Exchange
<OverlappedCache>(ref overlappedCache, cache);
748
OverlappedCache cache = overlappedCache == null ? null : Interlocked.
Exchange
<OverlappedCache>(ref overlappedCache, null);
net\System\Net\Sockets\Socket.cs (2)
2915
if (Interlocked.
Exchange
(ref m_RegisteredWait, null) == null)
7594
if (Interlocked.
Exchange
(ref me.m_RegisteredWait, null) != null)
net\System\Net\WebSockets\WebSocketBase.cs (1)
1452
Exception pendingException = Interlocked.
Exchange
<Exception>(ref m_PendingException, null);
services\monitoring\system\diagnosticts\ProcessManager.cs (2)
1075
long[] buffer = Interlocked.
Exchange
(ref CachedBuffer, null);
1115
Interlocked.
Exchange
(ref CachedBuffer, buffer);
System.Data (9)
fx\src\data\System\Data\OleDb\OleDbCommand.cs (1)
509
UnsafeNativeMethods.ICommandText ict = Interlocked.
Exchange
<UnsafeNativeMethods.ICommandText>(ref _icommandText, null);
fx\src\data\System\Data\ProviderBase\DbConnectionInternal.cs (2)
129
previousTransactionClone = Interlocked.
Exchange
(ref _enlistedTransaction, valueClone);
591
SysTx.Transaction enlistedTransaction = Interlocked.
Exchange
(ref _enlistedTransaction, null);
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (1)
681
TdsParser parser = Interlocked.
Exchange
(ref _parser, null); // guard against multiple concurrent dispose calls -- Delegated Transactions might cause this.
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (5)
2582
var delayedException = Interlocked.
Exchange
(ref _delayedWriteAsyncCallbackException, null);
2670
var delayedException = Interlocked.
Exchange
(ref _delayedWriteAsyncCallbackException, null);
2693
delayedException = Interlocked.
Exchange
(ref _delayedWriteAsyncCallbackException, null);
2889
var delayedException = Interlocked.
Exchange
(ref _delayedWriteAsyncCallbackException, null);
2934
delayedException = Interlocked.
Exchange
(ref _delayedWriteAsyncCallbackException, null);
System.Data.Entity.Design (4)
System\Data\Entity\Design\EntityCodeGenerator.cs (4)
502
Interlocked.
Exchange
(ref _csharpCodeGeneratorTypeV2, type);
513
Interlocked.
Exchange
(ref _csharpCodeGeneratorTypeV3, type);
524
Interlocked.
Exchange
(ref _vbCodeGeneratorTypeV2, type);
535
Interlocked.
Exchange
(ref _vbCodeGeneratorTypeV3, type);
System.Data.Services.Client (1)
System\Data\Services\Client\QueryResult.cs (1)
427
return System.Threading.Interlocked.
Exchange
(ref reusableAsyncCopyBuffer, null) ?? new byte[8000];
System.Runtime.Remoting (1)
channels\core\socketmanager.cs (1)
194
byte[] bufferToReturn = Interlocked.
Exchange
(ref _dataBuffer, null);
System.ServiceModel (3)
System\ServiceModel\Channels\ChannelDemuxer.cs (1)
3132
return Interlocked.
Exchange
<TItem>(ref this.firstItem, null);
System\ServiceModel\Channels\HttpChannelHelpers.cs (1)
1179
byte[] bufferToRecycleSnapshot = Interlocked.
Exchange
<byte[]>(ref this.bufferToRecycle, null);
System\ServiceModel\Channels\SharedTcpTransportManager.cs (1)
160
SharedConnectionListener currentListener = Interlocked.
Exchange
<SharedConnectionListener>(ref this.listener, null);
System.Web (6)
Hosting\AsyncResultBase.cs (1)
70
Thread originalThread = Interlocked.
Exchange
(ref _threadWhichStartedOperation, null);
HttpAsyncResult.cs (1)
116
Thread originalThread = Interlocked.
Exchange
(ref _threadWhichStartedOperation, null);
Util\DisposableAction.cs (1)
26
Action continuation = Interlocked.
Exchange
(ref _disposeAction, null);
Util\SynchronizationHelper.cs (3)
41
set { Interlocked.
Exchange
(ref _currentThread, value); }
51
Task completionTask = Interlocked.
Exchange
(ref _completionTask, null);
213
Interlocked.
Exchange
(ref _completionTask, new Task(continuation));
WindowsBase (2)
Shared\MS\Internal\ReaderWriterLockWrapper.cs (2)
172
Interlocked.
Exchange
<NonPumpingSynchronizationContext>(ref _defaultSynchronizationContext, null);
198
Interlocked.
Exchange
<NonPumpingSynchronizationContext>(ref _defaultSynchronizationContext, nonPumpingSynchronizationContext);