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