263 references to Read
GenerateDocumentationAndConfigFiles (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Metrics (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Metrics.Legacy (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.AspNetCore.Cryptography.Internal (1)
WeakReferenceHelpers.cs (1)
16WeakReference<T>? existingWeakRef = Volatile.Read(ref weakReference);
Microsoft.AspNetCore.DataProtection (9)
KeyManagement\KeyRing.cs (2)
78IAuthenticatedEncryptor? encryptor = Volatile.Read(ref _encryptor); 83encryptor = Volatile.Read(ref _encryptor);
KeyManagement\KeyRingBasedDataProtector.cs (1)
333var existingTemplate = Volatile.Read(ref _aadTemplate);
KeyManagement\KeyRingProvider.cs (6)
234existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 256existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 337var cached = Volatile.Read(ref _cacheableKeyRing); 353existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 422var newCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 465var existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing);
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
39var retVal = Volatile.Read(ref _innerProtectorWithTimeLimitedPurpose);
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionSelector.cs (1)
50var cache = Volatile.Read(ref _cache);
Microsoft.AspNetCore.Server.IIS (1)
Core\IO\AsyncIOOperation.cs (1)
23if (ReferenceEquals(Volatile.Read(ref _continuation), null))
Microsoft.Build.Framework (2)
ImmutableSegmentedDictionary`2+PrivateInterlocked.cs (1)
19var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
ImmutableSegmentedList`1+PrivateInterlocked.cs (1)
19var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis (8)
CodeGen\TokenMap.cs (1)
113object[] items = Volatile.Read(ref _items);
InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis.Analyzers (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
51var lastParsed = Volatile.Read(ref _lastParsed);
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.Collections.Package (3)
Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis.CSharp (18)
Compilation\CSharpCompilation.cs (1)
145internal ImmutableHashSet<SyntaxTree>? UsageOfUsingsRecordedInTrees => Volatile.Read(ref _usageOfUsingsRecordedInTrees);
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (2)
86if (Volatile.Read(ref lazyTypes) == null || Volatile.Read(ref lazyNamespaces) == null)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1459if (Volatile.Read(ref _lazyMembersByName) == null) 1639if (Volatile.Read(ref _lazyMembersByName) == null)
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (1)
128var typesByNS = Volatile.Read(ref _typesByNS);
Symbols\Source\SourceMemberContainerSymbol.cs (12)
1581if (Volatile.Read(ref _lazyMembersDictionary) is Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> result) 1695RoslynDebug.AssertOrFailFast(Volatile.Read(ref _lazyTypeMembers)?.Values.Any(types => types.Contains(t => t == (object)type)) == true); 1719var membersAndInitializers = Volatile.Read(ref _lazyMembersAndInitializers); 1734var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 1747membersAndInitializers = Volatile.Read(ref _lazyMembersAndInitializers); 3510if (Volatile.Read(ref _lazyMembersAndInitializers) != null) 3527if (Volatile.Read(ref _lazyMembersAndInitializers) is not null) 3580if (Volatile.Read(ref _lazyDeclaredMembersAndInitializers) != DeclaredMembersAndInitializers.UninitializedSentinel) 3692var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 3713var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 3758var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 3783var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers);
Microsoft.CodeAnalysis.Extensions.Package (3)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis.Features (3)
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (2)
53cachedIndexMap = Volatile.Read(ref s_cachedIndexMap); 54stringTable = Volatile.Read(ref s_stringTable);
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
51var lastParsed = Volatile.Read(ref _lastParsed);
Microsoft.CodeAnalysis.InteractiveHost (4)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.PublicApiAnalyzers (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.Threading.Package (4)
CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis.VisualBasic (5)
Symbols\Attributes\PEAttributeData.vb (1)
123If Volatile.Read(_lazyConstructorArguments) Is Nothing Then
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.vb (2)
66If Volatile.Read(m_lazyTypes) Is Nothing OrElse Volatile.Read(m_lazyMembers) Is Nothing Then
Symbols\Metadata\PE\PENestedNamespaceSymbol.vb (1)
121Dim typesByNS = Volatile.Read(_typesByNS)
Symbols\WellKnownMembers.vb (1)
126ctorError = DirectCast(Volatile.Read(_lazyExtensionAttributeConstructorErrorInfo), DiagnosticInfo)
Microsoft.CodeAnalysis.Workspaces (11)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
86=> Volatile.Read(ref _stateDoNotAccessDirectly);
Workspace\Workspace.cs (2)
158return Volatile.Read(ref _latestSolution); 511var oldSolution = Volatile.Read(ref _latestSolution);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.ImmutableCacheItem.cs (1)
30ImmutableCacheItem<T>? obj = Volatile.Read(ref _sharedDefault);
Microsoft.Extensions.Primitives (1)
ChangeToken.cs (1)
115IDisposable? current = Volatile.Read(ref _disposable);
Microsoft.ML.Tokenizers (3)
Model\CodeGenTokenizer.cs (1)
266IReadOnlyDictionary<string, int>? publicVocab = Volatile.Read(ref _vocabOriginal);
Model\EnglishRobertaTokenizer.cs (1)
236Dictionary<string, int>? publicVocab = Volatile.Read(ref _vocabOriginal);
Model\SentencePieceBpeModel.cs (1)
48IReadOnlyDictionary<string, int>? publicVocab = Volatile.Read(ref _publicVocab);
Roslyn.Diagnostics.Analyzers (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
System.Collections.Immutable (16)
System\Collections\Immutable\ImmutableInterlocked.cs (16)
39T oldValue = Volatile.Read(ref location); 86T oldValue = Volatile.Read(ref location); 128T[]? oldArray = Volatile.Read(ref Unsafe.AsRef(in location.array)); 175T[]? oldArray = Volatile.Read(ref Unsafe.AsRef(in location.array)); 258ImmutableDictionary<TKey, TValue> map = Volatile.Read(ref location); 287ImmutableDictionary<TKey, TValue> map = Volatile.Read(ref location); 311ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 350ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 397ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 440ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 473ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 506ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 539ImmutableStack<T> priorCollection = Volatile.Read(ref location); 568ImmutableStack<T> priorCollection = Volatile.Read(ref location); 594ImmutableQueue<T> priorCollection = Volatile.Read(ref location); 623ImmutableQueue<T> priorCollection = Volatile.Read(ref location);
System.ComponentModel.TypeConverter (2)
System\ComponentModel\TypeDescriptor.cs (2)
2296RefreshEventHandler? handler = Volatile.Read(ref Refreshed); 2303RefreshEventHandler? handler = Volatile.Read(ref Refreshed);
System.Diagnostics.TraceSource (1)
System\Diagnostics\Trace.cs (1)
25Volatile.Read(ref s_correlationManager) ??
System.Linq.Expressions (2)
System\Dynamic\Utils\CacheDict.cs (2)
58Entry entry = Volatile.Read(ref _entries[idx]); 78Entry entry = Volatile.Read(ref _entries[idx]);
System.Net.WebClient (1)
src\libraries\Common\src\System\Threading\Tasks\RendezvousAwaitable.cs (1)
44Action? c = Volatile.Read(ref _continuation);
System.Private.CoreLib (37)
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (2)
767ConcurrentQueueSegment<T>? next = Volatile.Read(ref s._nextSegment); 785else if (Volatile.Read(ref s._nextSegment) == null)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
27IntPtr[] innerTable = Volatile.Read(ref m_innerTable);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\Opcode.cs (1)
112string name = Volatile.Read(ref nameCache[idx]);
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (2)
131return Volatile.Read(ref Unsafe.As<byte, object>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset))); 152return Volatile.Read(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset));
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (3)
329Registrations? registrations = Volatile.Read(ref _registrations); 500Volatile.Read(ref _registrations)?.UnregisterAll(); 605Registrations? registrations = Volatile.Read(ref _registrations);
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (4)
51Volatile.Read(ref target!) ?? EnsureInitializedCore(ref target); 103Volatile.Read(ref target!) ?? EnsureInitializedCore(ref target, valueFactory); 243Volatile.Read(ref target!) ?? EnsureInitializedCore(ref target, ref syncLock, valueFactory); 262if (Volatile.Read(ref target) == null)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
149return Volatile.Read(ref m_completionState) ?? InitializeCompletionState();
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (1)
477Volatile.Read(ref s_Factory) ??
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (2)
88Volatile.Read(ref _continuation) is null || !_completed ? ValueTaskSourceStatus.Pending : 219Volatile.Read(ref _continuation) ??
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (13)
188Volatile.Read(ref s_currentActiveTasks) ?? 1317ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 1331return Volatile.Read(ref m_contingentProperties) ?? InitializeContingentProperties(); 1356ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 1509ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 1614ContingentProperties? cp = Volatile.Read(ref m_contingentProperties); 1872return Volatile.Read(ref m_contingentProperties)?.m_exceptionsHolder?.GetCancellationExceptionDispatchInfo(); // may be null 1878Volatile.Read(ref m_contingentProperties)?.m_exceptionsHolder?.MarkAsHandled(calledFromFinalizer: false); 2048ContingentProperties? cp = Volatile.Read(ref m_contingentProperties); 2096cp = Volatile.Read(ref m_contingentProperties); // need to re-read after updating state 2158ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 2219TaskExceptionHolder? exceptionHolder = Volatile.Read(ref task.m_contingentProperties)!.m_exceptionsHolder; 3305ContingentProperties? cp = Volatile.Read(ref m_contingentProperties);
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
593public static object? VolatileRead([NotNullIfNotNull(nameof(address))] ref object? address) => Volatile.Read(ref address);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (3)
281object? obj = Volatile.Read(ref m_array[idx]); 301object? obj = Volatile.Read(ref m_array[idx]); 346object? obj = Volatile.Read(ref m_array[idx]);
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (1)
78OverlappedData[]? dataArray = Volatile.Read(ref s_dataArray);
src\System\RuntimeType.CoreCLR.cs (2)
4462Table table = Volatile.Read(ref m_Table); 4476K hit = Volatile.Read(ref keys[index]);
System.Reflection.Metadata (1)
System\Reflection\PortableExecutable\PEReader.cs (1)
390AbstractMemoryBlock? existingBlock = Volatile.Read(ref _lazyPESectionBlocks[index]);
System.Reflection.MetadataLoadContext (4)
System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs (2)
53RoModule? module = Volatile.Read(ref _loadedModules[i]); 79RoModule? prior = Volatile.Read(ref _loadedModules[loadedModulesIndex]);
System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs (1)
36T? result = Volatile.Read(ref table[index]);
System\Reflection\TypeLoading\RuntimeTypeInfo.TypeComponentsCache.cs (1)
65object result = Volatile.Read(ref _nameAgnosticQueryCaches[index]);
System.Text.Json (2)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
168Func<ICustomAttributeProvider>? attributeProviderFactory = Volatile.Read(ref AttributeProviderFactory);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
647Func<ICustomAttributeProvider>? ctorAttrProviderFactory = Volatile.Read(ref ConstructorAttributeProviderFactory);
System.Threading.Tasks.Dataflow (5)
Blocks\BroadcastBlock.cs (1)
1142(Volatile.Read(ref _exceptions) != null && _decliningPermanently);
Internal\SourceCore.cs (1)
497return Volatile.Read(ref _exceptions) != null;
Internal\TargetCore.cs (3)
708return _dataflowBlockOptions.CancellationToken.IsCancellationRequested || Volatile.Read(ref _exceptions) != null; 776if (Volatile.Read(ref _exceptions) != null) 781_completionSource.TrySetException(Volatile.Read(ref _exceptions!));
System.Xaml (1)
System\Xaml\Schema\TypeBits.cs (1)
78object value = Volatile.Read(ref _value);
Test.Utilities (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Text.Analyzers (8)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);