386 references to ImmutableInterlocked
Aspire.Dashboard (2)
ResourceService\DashboardClient.cs (2)
442ImmutableInterlocked.Update(ref _outgoingChannels, static (set, channel) => set.Add(channel), channel); 468ImmutableInterlocked.Update(ref _outgoingChannels, static (set, channel) => set.Remove(channel), channel);
Aspire.Hosting (2)
Dashboard\ResourcePublisher.cs (2)
52ImmutableInterlocked.Update(ref _outgoingChannels, static (set, channel) => set.Add(channel), channel); 71ImmutableInterlocked.Update(ref _outgoingChannels, static (set, channel) => set.Remove(channel), channel);
Microsoft.Build (1)
Collections\CopyOnWritePropertyDictionary.cs (1)
329return ImmutableInterlocked.TryRemove(ref _backing, name, out _);
Microsoft.Build.Framework (8)
RoslynImmutableInterlocked.cs (8)
266/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 286/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 306/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 334/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 372/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 408/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 434/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 462/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Microsoft.CodeAnalysis (38)
CryptographicHashProvider.cs (1)
160ImmutableInterlocked.InterlockedCompareExchange(ref lazyHash, ComputeHash(algorithm), default(ImmutableArray<byte>));
Diagnostic\DiagnosticInfo.cs (1)
76return ImmutableInterlocked.GetOrAdd(
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActionsForAnalyzer.cs (2)
113ImmutableInterlocked.InterlockedInitialize(ref _lazyCodeBlockStartActions, codeBlockActions); 149ImmutableInterlocked.InterlockedInitialize(ref lazyCodeBlockActions, codeBlockActions);
DiagnosticAnalyzer\AnalyzerFileReference.cs (2)
393ImmutableInterlocked.InterlockedInitialize(ref _lazyAllExtensions, CreateExtensionsForAllLanguages(this, includeDuplicates)); 440return ImmutableInterlocked.GetOrAdd(ref _lazyExtensionsPerLanguage, language, CreateLanguageSpecificExtensions, this);
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (1)
349return ImmutableInterlocked.GetOrAdd(ref s_localizableStringToException, localizableString, computeException);
Emit\CommonPEModuleBuilder.cs (1)
452ImmutableInterlocked.InterlockedCompareExchange(ref _lazyAssemblyReferenceAliases, CalculateAssemblyReferenceAliases(context), default(ImmutableArray<Cci.AssemblyReferenceAlias>));
Emit\EditAndContinue\DefinitionMap.cs (1)
539=> ImmutableInterlocked.GetOrAdd(
Emit\NoPia\CommonEmbeddedMember.cs (1)
98if (ImmutableInterlocked.InterlockedInitialize(ref _lazyAttributes, attributes))
Emit\NoPia\CommonEmbeddedParameter.cs (1)
200if (ImmutableInterlocked.InterlockedInitialize(ref _lazyAttributes, attributes))
Emit\NoPia\CommonEmbeddedType.cs (5)
261ImmutableInterlocked.InterlockedInitialize(ref _lazyEvents, builder.ToImmutableAndFree()); 290ImmutableInterlocked.InterlockedInitialize(ref _lazyFields, builder.ToImmutableAndFree()); 480ImmutableInterlocked.InterlockedInitialize(ref _lazyMethods, builder.ToImmutableAndFree()); 509ImmutableInterlocked.InterlockedInitialize(ref _lazyProperties, builder.ToImmutableAndFree()); 539if (ImmutableInterlocked.InterlockedInitialize(ref _lazyAttributes, attributes))
Emit\NoPia\EmbeddedTypesManager.cs (1)
99if (ImmutableInterlocked.InterlockedInitialize(ref _frozen, builder.ToImmutableAndFree()))
InternalUtilities\InterlockedOperations.cs (2)
157var oldValue = ImmutableInterlocked.InterlockedCompareExchange(ref target, initializedValue, default(ImmutableArray<T>)); 195ImmutableInterlocked.Update(
InternalUtilities\StringExtensions.cs (1)
23ImmutableInterlocked.InterlockedInitialize(ref s_lazyNumerals, numerals);
MetadataReference\AssemblyIdentity.cs (1)
328ImmutableInterlocked.InterlockedCompareExchange(ref _lazyPublicKeyToken, CalculatePublicKeyToken(_publicKey), default);
MetadataReference\AssemblyMetadata.cs (1)
291ImmutableInterlocked.InterlockedInitialize(ref _lazyPublishedModules, newModules);
Operations\ControlFlowBranch.cs (3)
75ImmutableInterlocked.InterlockedInitialize(ref _lazyLeavingRegions, result); 120ImmutableInterlocked.InterlockedInitialize(ref _lazyEnteringRegions, result); 156ImmutableInterlocked.InterlockedInitialize(ref _lazyFinallyRegions, result);
SourceGeneration\RunResults.cs (2)
51ImmutableInterlocked.InterlockedInitialize(ref _lazyDiagnostics, Results.Where(r => !r.Diagnostics.IsDefaultOrEmpty).SelectMany(r => r.Diagnostics).ToImmutableArray()); 69ImmutableInterlocked.InterlockedInitialize(ref _lazyGeneratedTrees, Results.Where(r => !r.GeneratedSources.IsDefaultOrEmpty).SelectMany(r => r.GeneratedSources.Select(g => g.SyntaxTree)).ToImmutableArray());
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Symbols\Attributes\CustomAttributesBag.cs (1)
101var setOnOurThread = ImmutableInterlocked.InterlockedCompareExchange(ref _customAttributes, newCustomAttributes, default(ImmutableArray<T>)) == default(ImmutableArray<T>);
Text\SourceText.cs (2)
601ImmutableInterlocked.InterlockedInitialize(ref _lazyChecksum, CalculateChecksum(stream, _checksumAlgorithm)); 624ImmutableInterlocked.InterlockedInitialize(ref _lazyContentHash, computeContentHash());
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (2)
157var oldValue = ImmutableInterlocked.InterlockedCompareExchange(ref target, initializedValue, default(ImmutableArray<T>)); 195ImmutableInterlocked.Update(
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
23ImmutableInterlocked.InterlockedInitialize(ref s_lazyNumerals, numerals);
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
133service = ImmutableInterlocked.GetOrAdd(ref _serviceMap, serviceType, serviceType => LayeredServiceUtilities.PickService(serviceType, _workspaceServices.WorkspaceKind, _services));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (3)
142service = ImmutableInterlocked.GetOrAdd(ref _serviceMap, serviceType, serviceType => LayeredServiceUtilities.PickService(serviceType, _workspace.Kind, _services)); 159ImmutableInterlocked.InterlockedCompareExchange(ref _languages, list, localLanguages); 181languageServices = ImmutableInterlocked.GetOrAdd(ref _languageServicesMap, languageName, static (languageName, self) => new MefLanguageServices(self, languageName), this);
Microsoft.CodeAnalysis.Collections.Package (8)
RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Microsoft.CodeAnalysis.CSharp (125)
Binder\LocalScopeBinder.cs (3)
41ImmutableInterlocked.InterlockedCompareExchange(ref _locals, BuildLocals(), default(ImmutableArray<LocalSymbol>)); 59ImmutableInterlocked.InterlockedCompareExchange(ref _localFunctions, BuildLocalFunctions(), default(ImmutableArray<LocalFunctionSymbol>)); 77ImmutableInterlocked.InterlockedCompareExchange(ref _labels, BuildLabels(), default(ImmutableArray<LabelSymbol>));
Binder\ScriptLocalScopeBinder.cs (1)
74ImmutableInterlocked.InterlockedInitialize(ref _lazyLabels, GetLabels(_scriptInitializer, _syntax));
Binder\SwitchBinder.cs (2)
67ImmutableInterlocked.InterlockedInitialize(ref _switchGoverningDiagnostics, immutableSwitchGoverningDiagnostics.Diagnostics); 68ImmutableInterlocked.InterlockedInitialize(ref _switchGoverningDependencies, immutableSwitchGoverningDiagnostics.Dependencies);
Binder\WithExternAliasesBinder.cs (1)
102ImmutableInterlocked.InterlockedInitialize(ref _lazyExternAliases, _declaringSymbol.GetExternAliases(_declarationSyntax));
Binder\WithExternAndUsingAliasesBinder.cs (2)
131ImmutableInterlocked.InterlockedInitialize(ref _lazyExternAliases, _declaringSymbol.GetExternAliases(_declarationSyntax)); 144ImmutableInterlocked.InterlockedInitialize(ref _lazyUsingAliases, _declaringSymbol.GetUsingAliases(_declarationSyntax, basesBeingResolved: null));
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
285ImmutableInterlocked.InterlockedInitialize(ref _lazyUsings, _declaringSymbol.GetUsingNamespacesOrTypes(_declarationSyntax, basesBeingResolved));
BoundTree\UnboundLambda.cs (2)
604result = ImmutableInterlocked.GetOrAdd(ref _bindingCache, (delegateType, inExpressionTree), result); 1014result = ImmutableInterlocked.GetOrAdd(ref _returnInferenceCache, cacheKey, result);
Compilation\CSharpCompilation.cs (2)
3262ImmutableInterlocked.InterlockedInitialize(ref _lazyClsComplianceDependencies, result.Dependencies); 3263ImmutableInterlocked.InterlockedInitialize(ref _lazyClsComplianceDiagnostics, result.Diagnostics);
Compilation\SpeculativeSemanticModelWithMemberModel.cs (2)
180return ImmutableInterlocked.GetOrAdd(ref _childMemberModels, attribute, 194return ImmutableInterlocked.GetOrAdd(ref _childMemberModels, defaultValueSyntax,
Compilation\SyntaxTreeSemanticModel.cs (3)
984return ImmutableInterlocked.GetOrAdd(ref _memberModels, attribute, 1019return ImmutableInterlocked.GetOrAdd(ref _memberModels, defaultValueSyntax, 1064return ImmutableInterlocked.GetOrAdd(ref _memberModels, node, createMemberModelFunction);
CSharpParseOptions.cs (1)
194ImmutableInterlocked.InterlockedInitialize(ref _interceptorsNamespaces, previewNamespaces);
Declarations\DeclarationTable.Cache.cs (1)
83ImmutableInterlocked.InterlockedInitialize(
Declarations\MergedNamespaceDeclaration.cs (1)
247ImmutableInterlocked.InterlockedInitialize(ref _lazyChildren, MakeChildren());
Declarations\MergedTypeDeclaration.cs (1)
228ImmutableInterlocked.InterlockedInitialize(ref _lazyChildren, MakeChildren());
Emitter\Model\PEAssemblyBuilder.cs (1)
147if (ImmutableInterlocked.InterlockedInitialize(ref lazyFiles, builder.ToImmutable()) && lazyFiles.Length > 0)
FlowAnalysis\ControlFlowAnalysis.cs (2)
47ImmutableInterlocked.InterlockedInitialize(ref _entryPoints, result); 66ImmutableInterlocked.InterlockedInitialize(ref _exitPoints, result);
FlowAnalysis\CSharpDataFlowAnalysis.cs (15)
69ImmutableInterlocked.InterlockedInitialize(ref _variablesDeclared, result); 104ImmutableInterlocked.InterlockedInitialize(ref _dataFlowsIn, result); 141ImmutableInterlocked.InterlockedInitialize(ref _definitelyAssignedOnEntry, entryResult); 142ImmutableInterlocked.InterlockedInitialize(ref _definitelyAssignedOnExit, exitResult); 162ImmutableInterlocked.InterlockedInitialize(ref _dataFlowsOut, result); 181ImmutableInterlocked.InterlockedInitialize(ref _alwaysAssigned, result); 270ImmutableInterlocked.InterlockedInitialize(ref _readInside, Normalize(readInside)); 271ImmutableInterlocked.InterlockedInitialize(ref _writtenInside, Normalize(writtenInside)); 272ImmutableInterlocked.InterlockedInitialize(ref _readOutside, Normalize(readOutside)); 273ImmutableInterlocked.InterlockedInitialize(ref _writtenOutside, Normalize(writtenOutside)); 274ImmutableInterlocked.InterlockedInitialize(ref _captured, Normalize(captured)); 275ImmutableInterlocked.InterlockedInitialize(ref _capturedInside, Normalize(capturedInside)); 276ImmutableInterlocked.InterlockedInitialize(ref _capturedOutside, Normalize(capturedOutside)); 277ImmutableInterlocked.InterlockedInitialize(ref _unsafeAddressTaken, Normalize(unsafeAddressTaken)); 278ImmutableInterlocked.InterlockedInitialize(ref _usedLocalFunctions, Normalize(usedLocalFunctions));
Lowering\StateMachineRewriter\StateMachineTypeSymbol.cs (1)
77ImmutableInterlocked.InterlockedCompareExchange(ref _attributes,
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (1)
96ImmutableInterlocked.InterlockedCompareExchange(ref _attributes,
Lowering\SynthesizedMethodBaseSymbol.cs (1)
113ImmutableInterlocked.InterlockedInitialize(ref _parameters, MakeParameters());
Symbols\AnonymousTypes\PublicSymbols\AnonymousType.DelegatePublicSymbol.cs (1)
47ImmutableInterlocked.InterlockedInitialize(ref _lazyMembers, CreateMembers());
Symbols\Attributes\PEAttributeData.cs (2)
112ImmutableInterlocked.InterlockedInitialize(ref _lazyConstructorArguments, 115ImmutableInterlocked.InterlockedInitialize(ref _lazyNamedArguments,
Symbols\ErrorTypeSymbol.cs (1)
317ImmutableInterlocked.InterlockedCompareExchange(ref _lazyTypeParameters,
Symbols\Metadata\PE\PEFieldSymbol.cs (2)
340ImmutableInterlocked.InterlockedInitialize(ref _lazyRefCustomModifiers, CSharpCustomModifier.Convert(fieldInfo.RefCustomModifiers)); 593ImmutableInterlocked.InterlockedInitialize(ref _lazyCustomAttributes, attributes);
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
842ImmutableInterlocked.InterlockedInitialize(ref _lazyTypeParameters,
Symbols\Metadata\PE\PEModuleSymbol.cs (3)
288ImmutableInterlocked.InterlockedCompareExchange( 299ImmutableInterlocked.InterlockedInitialize(ref customAttributes, loaded); 306ImmutableInterlocked.InterlockedInitialize(ref customAttributes, loadedCustomAttributes);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (7)
487ImmutableInterlocked.InterlockedCompareExchange(ref _lazyInterfaces, MakeAcyclicInterfaces(), default(ImmutableArray<NamedTypeSymbol>)); 534ImmutableInterlocked.InterlockedCompareExchange(ref _lazyDeclaredInterfaces, MakeDeclaredInterfaces(), default(ImmutableArray<NamedTypeSymbol>)); 725ImmutableInterlocked.InterlockedInitialize(ref uncommon.lazyCustomAttributes, loadedCustomAttributes); 948ImmutableInterlocked.InterlockedInitialize(ref uncommon.lazyInstanceEnumFields, builder.ToImmutableAndFree()); 1431if (!ImmutableInterlocked.InterlockedInitialize(ref _lazyMembersInDeclarationOrder, membersInDeclarationOrder)) 2382ImmutableInterlocked.InterlockedCompareExchange(ref uncommon.lazyConditionalAttributeSymbols, conditionalSymbols, default(ImmutableArray<string>)); 2708ImmutableInterlocked.InterlockedInitialize(ref _lazyTypeParameters,
Symbols\Metadata\PE\PENamespaceSymbol.cs (2)
72ImmutableInterlocked.InterlockedExchange(ref _lazyFlattenedNamespacesAndTypes, calculateMembers()); 102ImmutableInterlocked.InterlockedExchange(ref _lazyFlattenedTypes, flattened);
Symbols\Metadata\PE\PEParameterSymbol.cs (4)
854var initialized = ImmutableInterlocked.InterlockedCompareExchange(ref _lazyInterpolatedStringHandlerAttributeIndexes, value: indexes, comparand: s_defaultStringHandlerAttributeIndexes); 1124ImmutableInterlocked.InterlockedInitialize(ref _lazyHiddenAttributes, builder.ToImmutableAndFree()); 1128ImmutableInterlocked.InterlockedInitialize(ref _lazyHiddenAttributes, ImmutableArray<CSharpAttributeData>.Empty); 1151ImmutableInterlocked.InterlockedInitialize(
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
745ImmutableInterlocked.InterlockedInitialize(ref AccessUncommonFields()._lazyCustomAttributes, attributes); 763ImmutableInterlocked.InterlockedInitialize(ref uncommonFields._lazyCustomAttributes, result);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (2)
243ImmutableInterlocked.InterlockedInitialize(ref _lazyDeclaredConstraintTypes, declaredConstraintTypes); 651ImmutableInterlocked.InterlockedInitialize(ref _lazyCustomAttributes, loadedCustomAttributes);
Symbols\NativeIntegerTypeSymbol.cs (3)
73ImmutableInterlocked.InterlockedInitialize(ref _lazyMembers, makeMembers(_underlyingType.GetMembers())); 221ImmutableInterlocked.InterlockedInitialize(ref _lazyInterfaces, interfaces); 360ImmutableInterlocked.InterlockedInitialize(ref _lazyParameters, parameters);
Symbols\PublicModel\NamedTypeSymbol.cs (1)
79ImmutableInterlocked.InterlockedCompareExchange(ref _lazyTypeArguments, UnderlyingNamedTypeSymbol.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.GetPublicSymbols(), default);
Symbols\ReducedExtensionMethodSymbol.cs (1)
524ImmutableInterlocked.InterlockedInitialize(ref _lazyParameters, this.MakeParameters());
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
98ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Retargeting\RetargetingMethodSymbol.cs (3)
105ImmutableInterlocked.InterlockedCompareExchange(ref _lazyTypeParameters, 157ImmutableInterlocked.InterlockedInitialize(ref _lazyParameters, this.RetargetParameters()); 301ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (3)
75ImmutableInterlocked.InterlockedCompareExchange(ref _lazyTypeParameters, 317ImmutableInterlocked.InterlockedCompareExchange(ref _lazyInterfaces, result, default(ImmutableArray<NamedTypeSymbol>)); 346ImmutableInterlocked.InterlockedCompareExchange(ref _lazyDeclaredInterfaces, result, default(ImmutableArray<NamedTypeSymbol>));
Symbols\Retargeting\RetargetingPropertySymbol.cs (2)
94ImmutableInterlocked.InterlockedCompareExchange(ref _lazyParameters, this.RetargetParameters(), default(ImmutableArray<ParameterSymbol>)); 157ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Retargeting\RetargetingSymbolTranslator.cs (2)
1137ImmutableInterlocked.InterlockedCompareExchange(ref lazyCustomModifiers, newModifiers, default(ImmutableArray<CustomModifier>)); 1311ImmutableInterlocked.InterlockedCompareExchange(ref lazyCustomAttributes, retargetedAttributes, default(ImmutableArray<CSharpAttributeData>));
Symbols\Source\LocalFunctionSymbol.cs (1)
510ImmutableInterlocked.InterlockedInitialize(ref _lazyTypeParameterConstraintKinds, constraints);
Symbols\Source\SourceAssemblySymbol.cs (1)
2773ImmutableInterlocked.InterlockedInitialize(ref _unusedFieldWarnings, diagnostics.ToReadOnlyAndFree());
Symbols\Source\SourceMemberContainerSymbol.cs (7)
815ImmutableInterlocked.InterlockedInitialize(ref _managedKindUseSiteDiagnostics, managedKindUseSiteInfo.Diagnostics?.ToImmutableArray() ?? ImmutableArray<DiagnosticInfo>.Empty); 816ImmutableInterlocked.InterlockedInitialize(ref _managedKindUseSiteDependencies, managedKindUseSiteInfo.Dependencies?.ToImmutableArray() ?? ImmutableArray<AssemblySymbol>.Empty); 824useSiteDiagnostics = ImmutableInterlocked.InterlockedCompareExchange(ref _managedKindUseSiteDiagnostics, useSiteDiagnostics, useSiteDiagnostics); 833useSiteDependencies = ImmutableInterlocked.InterlockedCompareExchange(ref _managedKindUseSiteDependencies, useSiteDependencies, useSiteDependencies); 1450ImmutableInterlocked.InterlockedInitialize(ref _lazyMembersFlattened, result); 1471ImmutableInterlocked.InterlockedExchange(ref _lazyMembersFlattened, allMembers); 3284if (ImmutableInterlocked.InterlockedInitialize(ref _lazySimpleProgramEntryPoints, simpleProgramEntryPoints))
Symbols\Source\SourceMemberMethodSymbol.cs (1)
316diagsWritten = ImmutableInterlocked.InterlockedInitialize(ref _cachedDiagnostics, newSet);
Symbols\Source\SourceModuleSymbol.cs (2)
142ImmutableInterlocked.InterlockedCompareExchange(ref _lazyAssembliesToEmbedTypesFrom, 409ImmutableInterlocked.InterlockedInitialize(
Symbols\Source\SourceNamedTypeSymbol.cs (3)
278if (ImmutableInterlocked.InterlockedInitialize( 304ImmutableInterlocked.InterlockedInitialize( 750if (ImmutableInterlocked.InterlockedInitialize(
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
77if (ImmutableInterlocked.InterlockedCompareExchange(ref _lazyInterfaces, acyclicInterfaces, default(ImmutableArray<NamedTypeSymbol>)).IsDefault)
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (1)
92return ImmutableInterlocked.GetOrAdd(
Symbols\Source\SourceNamespaceSymbol.cs (4)
94ImmutableInterlocked.InterlockedCompareExchange(ref _locations, 142ImmutableInterlocked.InterlockedInitialize(ref _lazyAllMembers, members); 163ImmutableInterlocked.InterlockedExchange(ref _lazyAllMembers, allMembers); 184ImmutableInterlocked.InterlockedInitialize(ref _lazyTypeMembersUnordered, members);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
1046if (ImmutableInterlocked.InterlockedInitialize( 1073ImmutableInterlocked.InterlockedInitialize(
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
626ImmutableInterlocked.InterlockedInitialize(ref _lazyExplicitInterfaceImplementations, explicitInterfaceImplementations);
Symbols\SubstitutedEventSymbol.cs (1)
102ImmutableInterlocked.InterlockedCompareExchange(
Symbols\SubstitutedMethodSymbol.cs (3)
121ImmutableInterlocked.InterlockedCompareExchange(ref _lazyTypeParameters, typeParameters, default(ImmutableArray<TypeParameterSymbol>)); 254ImmutableInterlocked.InterlockedInitialize(ref _lazyParameters, SubstituteParameters()); 277ImmutableInterlocked.InterlockedCompareExchange(
Symbols\SubstitutedNamedTypeSymbol.cs (2)
117ImmutableInterlocked.InterlockedCompareExchange(ref _lazyTypeParameters, typeParameters, default(ImmutableArray<TypeParameterSymbol>)); 262ImmutableInterlocked.InterlockedInitialize(ref _lazyMembers, result);
Symbols\SubstitutedPropertySymbol.cs (2)
79ImmutableInterlocked.InterlockedCompareExchange(ref _lazyParameters, SubstituteParameters(), default(ImmutableArray<ParameterSymbol>)); 120ImmutableInterlocked.InterlockedCompareExchange(
Symbols\SymbolDistinguisher.cs (1)
137ImmutableInterlocked.InterlockedInitialize(ref _lazyDescriptions, ImmutableArray.Create(description0, description1));
Symbols\Tuples\TupleTypeSymbol.cs (2)
973ImmutableInterlocked.InterlockedInitialize(ref _lazyElementTypes, collectTupleElementTypesWithAnnotations(tuple)); 1005ImmutableInterlocked.InterlockedInitialize(ref _lazyDefaultElementFields, collectTupleElementFields(tuple));
Symbols\TypeSymbol.cs (1)
327ImmutableInterlocked.InterlockedInitialize(ref info.allInterfaces, MakeAllInterfaces());
Syntax\CSharpSyntaxTree.cs (2)
299ImmutableInterlocked.InterlockedInitialize(ref _preprocessorStates, states.ToImmutableAndFree()); 300ImmutableInterlocked.InterlockedInitialize(ref _preprocessorStateChangePositions, positions.ToImmutableAndFree());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
StubSettingsManagerHost.cs (1)
139if (ImmutableInterlocked.TryRemove(ref _values, name, out _))
Microsoft.CodeAnalysis.Features (6)
CodeRefactorings\CodeRefactoringService.cs (1)
248provider, () => ImmutableInterlocked.GetOrAdd(ref _fixAllProviderMap, provider, FixAllProviderInfo.Create), defaultValue: null);
Common\AbstractProjectExtensionProvider.cs (1)
140=> ImmutableInterlocked.GetOrAdd(ref _extensionsPerLanguage, language, (language, provider) => provider.CreateExtensions(language), this);
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (1)
65ImmutableInterlocked.InterlockedInitialize(ref _languageProviders, languagesProvider?.Languages ?? []);
EditAndContinue\ActiveStatementsMap.cs (1)
184return ImmutableInterlocked.GetOrAdd(
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
102ImmutableInterlocked.AddOrUpdate(ref _analyzerProviders, metadata.Name, n => [lazyProvider], (n, v) => v.Add(lazyProvider));
QuickInfo\QuickInfoServiceWithProviders.cs (1)
42ImmutableInterlocked.InterlockedCompareExchange(ref _providers, providers, default);
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
317ImmutableInterlocked.Update(ref _disposalVerifiedStreams, s => s.Add(stream)); 325ImmutableInterlocked.Update(ref _disposalVerifiedStreams, s => s.Add(stream));
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Features\CodeFixes\CodeFixService.cs (4)
598return ImmutableInterlocked.GetOrAdd( 765fixer, () => ImmutableInterlocked.GetOrAdd(ref _fixAllProviderMap, fixer, FixAllProviderInfo.Create), defaultValue: null); 834() => ImmutableInterlocked.GetOrAdd(ref _fixerToFixableIdsMap, fixer, f => GetAndTestFixableDiagnosticIds(f)), 840return ImmutableInterlocked.GetOrAdd(ref _fixerToFixableIdsMap, fixer, f => GetAndTestFixableDiagnosticIds(f));
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.HostStates.cs (1)
39var hostStateSets = ImmutableInterlocked.GetOrAdd(ref _hostAnalyzerStateMap, key, CreateLanguageSpecificAnalyzerMap, (project.Solution.SolutionState.Analyzers, referenceIdsToRedirect));
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Services\ClientOptionsProvider.cs (1)
21var lazyOptions = ImmutableInterlocked.GetOrAdd(ref _cache, languageServices.Language, _ => AsyncLazy.Create(
src\VisualStudio\Core\Def\Telemetry\Shared\AbstractAggregatingLog.cs (1)
68(var aggregator, _, var aggregatorLock) = ImmutableInterlocked.GetOrAdd(ref _aggregations, name, name =>
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogProvider.cs (3)
58return ImmutableInterlocked.GetOrAdd(ref _logs, functionId, functionId => new VisualStudioTelemetryLog(_telemetryLogger, functionId)); 69return ImmutableInterlocked.GetOrAdd( 81return ImmutableInterlocked.GetOrAdd(
Microsoft.CodeAnalysis.Remote.Workspaces (2)
VisualStudioMefHostServices.cs (2)
49exports = ImmutableInterlocked.GetOrAdd(ref _exportsMap, key, _ => 66exports = ImmutableInterlocked.GetOrAdd(ref _exportsMap, key, _ =>
Microsoft.CodeAnalysis.Scripting (1)
ScriptState.cs (1)
67ImmutableInterlocked.InterlockedInitialize(ref _lazyVariables, CreateVariables());
Microsoft.CodeAnalysis.VisualBasic (87)
Analysis\FlowAnalysis\ControlFlowAnalysis.vb (2)
45ImmutableInterlocked.InterlockedCompareExchange(_entryPoints, result, Nothing) 59ImmutableInterlocked.InterlockedCompareExchange(_exitPoints, result, Nothing)
Analysis\FlowAnalysis\VisualBasicDataFlowAnalysis.vb (13)
52ImmutableInterlocked.InterlockedCompareExchange(_variablesDeclared, result, Nothing) 78ImmutableInterlocked.InterlockedCompareExchange(_dataFlowsIn, result, Nothing) 111ImmutableInterlocked.InterlockedInitialize(_definitelyAssignedOnEntry, entry) 112ImmutableInterlocked.InterlockedInitialize(_definitelyAssignedOnExit, ex) 127ImmutableInterlocked.InterlockedCompareExchange(_dataFlowsOut, result, Nothing) 141ImmutableInterlocked.InterlockedCompareExchange(_alwaysAssigned, result, Nothing) 224ImmutableInterlocked.InterlockedCompareExchange(Me._readInside, Normalize(readInside), Nothing) 225ImmutableInterlocked.InterlockedCompareExchange(Me._writtenInside, Normalize(writtenInside), Nothing) 226ImmutableInterlocked.InterlockedCompareExchange(Me._readOutside, Normalize(readOutside), Nothing) 227ImmutableInterlocked.InterlockedCompareExchange(Me._writtenOutside, Normalize(writtenOutside), Nothing) 228ImmutableInterlocked.InterlockedCompareExchange(Me._captured, Normalize(captured), Nothing) 229ImmutableInterlocked.InterlockedCompareExchange(Me._capturedInside, Normalize(capturedInside), Nothing) 230ImmutableInterlocked.InterlockedCompareExchange(Me._capturedOutside, Normalize(capturedOutside), Nothing)
Binding\Binder_XmlLiterals.vb (1)
1935ImmutableInterlocked.InterlockedInitialize(_lazyParameters, ReducedAccessorParameterSymbol.MakeParameters(Me, _originalDefinition.Parameters))
Binding\CatchBlockBinder.vb (1)
33ImmutableInterlocked.InterlockedCompareExchange(_locals, BuildLocals(), Nothing)
Binding\ExecutableCodeBinder.vb (1)
42ImmutableInterlocked.InterlockedCompareExchange(_labels, BuildLabels(), Nothing)
Binding\ForOrForEachBlockBinder.vb (1)
33ImmutableInterlocked.InterlockedCompareExchange(_locals, BuildLocals(), Nothing)
Binding\StatementListBinder.vb (1)
33ImmutableInterlocked.InterlockedCompareExchange(_locals, BuildLocals(), Nothing)
Binding\UsingBlockBinder.vb (1)
33ImmutableInterlocked.InterlockedCompareExchange(_locals, BuildLocals(), Nothing)
BoundTree\BoundMethodGroup.vb (1)
82ImmutableInterlocked.InterlockedCompareExchange(_lazyMethods, methods, Nothing)
Compilation\VisualBasicCompilation.vb (3)
899ImmutableInterlocked.InterlockedInitialize(_lazyAllSyntaxTrees, builder.ToImmutableAndFree()) 2223ImmutableInterlocked.InterlockedInitialize(_lazyClsComplianceDependencies, result.Dependencies) 2224ImmutableInterlocked.InterlockedInitialize(_lazyClsComplianceDiagnostics, result.Diagnostics)
Declarations\DeclarationTable.vb (1)
110ImmutableInterlocked.InterlockedInitialize(_lazyAllRootDeclarations, builder.ToImmutableAndFree())
Declarations\MergedNamespaceDeclaration.vb (1)
154ImmutableInterlocked.InterlockedInitialize(Me._children, MakeChildren())
Emit\PEAssemblyBuilder.vb (1)
100If ImmutableInterlocked.InterlockedInitialize(lazyFiles, builder.ToImmutable()) AndAlso lazyFiles.Length > 0 Then
Emit\PEModuleBuilder.vb (1)
107ImmutableInterlocked.InterlockedInitialize(
Lowering\StateMachineRewriter\StateMachineTypeSymbol.vb (1)
81ImmutableInterlocked.InterlockedCompareExchange(_attributes,
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.vb (1)
223ImmutableInterlocked.InterlockedCompareExchange(_attributes,
Symbols\InstanceErrorTypeSymbol.vb (1)
113ImmutableInterlocked.InterlockedCompareExchange(_lazyTypeParameters,
Symbols\MergedNamespaceSymbol.vb (1)
289ImmutableInterlocked.InterlockedCompareExchange(_lazyModuleMembers,
Symbols\Metadata\PE\PEFieldSymbol.vb (2)
153ImmutableInterlocked.InterlockedInitialize(_lazyCustomAttributes, attributes) 380ImmutableInterlocked.InterlockedCompareExchange(_lazyCustomModifiers, VisualBasicCustomModifier.Convert(customModifiers), Nothing)
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
1011ImmutableInterlocked.InterlockedInitialize(_lazyTypeParameters,
Symbols\Metadata\PE\PEModuleSymbol.vb (2)
177ImmutableInterlocked.InterlockedCompareExchange( 242ImmutableInterlocked.InterlockedCompareExchange(Of VisualBasicAttributeData)(
Symbols\Metadata\PE\PENamedTypeSymbol.vb (3)
426ImmutableInterlocked.InterlockedInitialize(_lazyCustomAttributes, attributes) 866ImmutableInterlocked.InterlockedCompareExchange(_lazyTypeParameters, 1451ImmutableInterlocked.InterlockedCompareExchange(_lazyConditionalAttributeSymbols, conditionalSymbols, Nothing)
Symbols\Metadata\PE\PENamespaceSymbol.vb (2)
65ImmutableInterlocked.InterlockedCompareExchange(_lazyModules, modules, Nothing) 79ImmutableInterlocked.InterlockedExchange(_lazyFlattenedNamespacesAndTypes, m_lazyMembers.Flatten())
Symbols\Metadata\PE\PEParameterSymbol.vb (4)
400ImmutableInterlocked.InterlockedInitialize(_lazyHiddenAttributes, builder.ToImmutableAndFree()) 402ImmutableInterlocked.InterlockedInitialize(_lazyHiddenAttributes, ImmutableArray(Of VisualBasicAttributeData).Empty) 410ImmutableInterlocked.InterlockedInitialize(_lazyCustomAttributes, attributes) 412ImmutableInterlocked.InterlockedInitialize(_lazyHiddenAttributes, ImmutableArray(Of VisualBasicAttributeData).Empty)
Symbols\Metadata\PE\PETypeParameterSymbol.vb (1)
361ImmutableInterlocked.InterlockedInitialize(_lazyConstraintTypes, GetConstraintTypesOnly(constraints))
Symbols\NamedTypeSymbol.vb (1)
783ImmutableInterlocked.InterlockedCompareExchange(variable, value, Nothing)
Symbols\ReducedExtensionMethodSymbol.vb (1)
419ImmutableInterlocked.InterlockedCompareExchange(_lazyParameters,
Symbols\Retargeting\RetargetingEventSymbol.vb (1)
102ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Retargeting\RetargetingMethodSymbol.vb (3)
113ImmutableInterlocked.InterlockedCompareExchange(_lazyTypeParameters, 195ImmutableInterlocked.InterlockedCompareExchange(_lazyParameters, RetargetParameters(), Nothing) 455ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (1)
93ImmutableInterlocked.InterlockedCompareExchange(_lazyTypeParameters,
Symbols\Retargeting\RetargetingPropertySymbol.vb (2)
202ImmutableInterlocked.InterlockedCompareExchange(_lazyParameters, RetargetParameters(), Nothing) 271ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Retargeting\RetargetingSymbolTranslator.vb (2)
636ImmutableInterlocked.InterlockedCompareExchange(lazyCustomModifiers, newModifiers, Nothing) 806ImmutableInterlocked.InterlockedCompareExchange(lazyCustomAttributes, retargetedAttributes, Nothing)
Symbols\Source\CustomEventAccessorSymbol.vb (1)
88ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Source\SourceAssemblySymbol.vb (2)
1279ImmutableInterlocked.InterlockedInitialize(_lazyAssemblyLevelDeclarationDependencies, immutableBindingDiagnostic.Dependencies) 1280ImmutableInterlocked.InterlockedInitialize(_lazyAssemblyLevelDeclarationErrors, immutableBindingDiagnostic.Diagnostics)
Symbols\Source\SourceMemberContainerTypeSymbol.vb (2)
3146ImmutableInterlocked.InterlockedInitialize(Me._lazyMembersFlattened, result) 3161ImmutableInterlocked.InterlockedExchange(_lazyMembersFlattened, allMembers)
Symbols\Source\SourceMethodSymbol.vb (2)
575Return ImmutableInterlocked.InterlockedInitialize(_cachedDiagnostics, diags) 839ImmutableInterlocked.InterlockedCompareExchange(Me._lazyLocations,
Symbols\Source\SourceModuleSymbol.vb (5)
207ImmutableInterlocked.InterlockedInitialize( 291ImmutableInterlocked.InterlockedInitialize(_lazyAssembliesToEmbedTypesFrom, assemblies.ToImmutableAndFree()) 768ImmutableInterlocked.InterlockedInitialize(_lazyLinkedAssemblyDiagnostics, diagnostics.ToReadOnlyAndFree) 938Return ImmutableInterlocked.InterlockedInitialize(variable, value) 943Dim stored = ImmutableInterlocked.InterlockedInitialize(variable, value)
Symbols\Source\SourceNamedTypeSymbol.vb (1)
772ImmutableInterlocked.InterlockedInitialize(_lazyTypeParameters, MakeTypeParameters())
Symbols\Source\SourceNamespaceSymbol.vb (3)
208ImmutableInterlocked.InterlockedExchange(_lazyAllMembers, allMembers) 220ImmutableInterlocked.InterlockedCompareExchange(_lazyAllMembers, members, Nothing) 264ImmutableInterlocked.InterlockedCompareExchange(_lazyModuleMembers,
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
336ImmutableInterlocked.InterlockedCompareExchange(
Symbols\Source\SourceTypeParameterSymbol.vb (2)
117ImmutableInterlocked.InterlockedInitialize(_lazyConstraints, constraints) 119If ImmutableInterlocked.InterlockedInitialize(_lazyConstraintTypes, GetConstraintTypesOnly(constraints)) Then
Symbols\Source\SynthesizedEventAccessorSymbol.vb (1)
39ImmutableInterlocked.InterlockedInitialize(
Symbols\Source\SynthesizedWithEventsAccessorSymbol.vb (2)
33ImmutableInterlocked.InterlockedInitialize( 81ImmutableInterlocked.InterlockedInitialize(_lazyParameters, GetParameters())
Symbols\SubstitutedEventSymbol.vb (1)
194ImmutableInterlocked.InterlockedCompareExchange(_lazyExplicitInterfaceImplementations,
Symbols\SynthesizedSymbols\SynthesizedClonedTypeParameterSymbol.vb (1)
73ImmutableInterlocked.InterlockedInitialize(_lazyConstraints, constraints)
Symbols\Tuples\TupleTypeSymbol.vb (2)
117ImmutableInterlocked.InterlockedInitialize(Of FieldSymbol)(Me._lazyFields, Me.CollectTupleElementFields()) 687ImmutableInterlocked.InterlockedInitialize(Of Symbol)(Me._lazyMembers, Me.CreateMembers())
Symbols\TypeSymbol.vb (1)
137ImmutableInterlocked.InterlockedInitialize(_lazyAllInterfaces, MakeAllInterfaces())
Symbols\UnboundGenericType.vb (1)
451ImmutableInterlocked.InterlockedInitialize(_lazyTypeArguments, arguments.AsImmutableOrNull())
Microsoft.CodeAnalysis.Workspaces (41)
Diagnostics\HostDiagnosticAnalyzers.cs (1)
213ImmutableInterlocked.GetOrAdd(ref _compilerDiagnosticAnalyzerMap, language, analyzer);
FindSymbols\FindReferences\FindReferenceCache.cs (2)
218ImmutableInterlocked.InterlockedInitialize(ref _constructorInitializerCache, GetConstructorInitializerTokensWorker()); 242ImmutableInterlocked.InterlockedInitialize(ref _newKeywordsCache, GetNewKeywordTokensWorker());
Options\DocumentOptionSet.cs (1)
56return ImmutableInterlocked.GetOrAdd(ref _values, optionKey, value);
Options\GlobalOptionService.cs (1)
48ImmutableInterlocked.InterlockedInitialize(
Options\LegacyWorkspaceOptionService.cs (3)
68ImmutableInterlocked.Update( 106ImmutableInterlocked.Update( 119ImmutableInterlocked.Update(
Options\SolutionOptionSet.cs (1)
58return ImmutableInterlocked.GetOrAdd(ref _values, optionKey, value);
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (2)
157var oldValue = ImmutableInterlocked.InterlockedCompareExchange(ref target, initializedValue, default(ImmutableArray<T>)); 195ImmutableInterlocked.Update(
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
23ImmutableInterlocked.InterlockedInitialize(ref s_lazyNumerals, numerals);
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefLanguageServices.cs (1)
133service = ImmutableInterlocked.GetOrAdd(ref _serviceMap, serviceType, serviceType => LayeredServiceUtilities.PickService(serviceType, _workspaceServices.WorkspaceKind, _services));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (3)
142service = ImmutableInterlocked.GetOrAdd(ref _serviceMap, serviceType, serviceType => LayeredServiceUtilities.PickService(serviceType, _workspace.Kind, _services)); 159ImmutableInterlocked.InterlockedCompareExchange(ref _languages, list, localLanguages); 181languageServices = ImmutableInterlocked.GetOrAdd(ref _languageServicesMap, languageName, static (languageName, self) => new MefLanguageServices(self, languageName), this);
Workspace\Host\Mef\MefHostServices.cs (1)
98ImmutableInterlocked.InterlockedInitialize(ref s_defaultAssemblies, LoadDefaultAssemblies());
Workspace\Host\Metadata\MetadataReferenceCache.cs (1)
29referenceSet = ImmutableInterlocked.GetOrAdd(ref _referenceSets, path, new ReferenceSet(this));
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (6)
60/// <remarks>Should be updated with <see cref="ImmutableInterlocked"/>.</remarks> 63/// <remarks>Should be updated with <see cref="ImmutableInterlocked"/>.</remarks> 413ImmutableInterlocked.TryRemove<ProjectId, string?>(ref _projectToMaxSupportedLangVersionMap, projectId, out _); 414ImmutableInterlocked.TryRemove(ref _projectToDependencyNodeTargetIdentifier, projectId, out _); 475ImmutableInterlocked.Update( 484ImmutableInterlocked.Update(
Workspace\Solution\DocumentState.cs (1)
109ImmutableInterlocked.InterlockedCompareExchange(ref _contentHash, text.GetContentHash(), default);
Workspace\Solution\Project.cs (6)
242=> ImmutableInterlocked.GetOrAdd(ref _idToDocumentMap, documentId, s_tryCreateDocumentFunction, this); 248=> ImmutableInterlocked.GetOrAdd(ref _idToAdditionalDocumentMap, documentId, s_tryCreateAdditionalDocumentFunction, this); 254=> ImmutableInterlocked.GetOrAdd(ref _idToAnalyzerConfigDocumentMap, documentId, s_tryCreateAnalyzerConfigDocumentFunction, this); 291ImmutableInterlocked.GetOrAdd(ref _idToSourceGeneratedDocumentMap, state.Id, s_createSourceGeneratedDocumentFunction, (state, this))); 328=> ImmutableInterlocked.GetOrAdd(ref _idToSourceGeneratedDocumentMap, state.Id, s_createSourceGeneratedDocumentFunction, (state, this)); 359return ImmutableInterlocked.GetOrAdd(ref _idToSourceGeneratedDocumentMap, documentId, s_createSourceGeneratedDocumentFunction, (documentState, this));
Workspace\Solution\Solution.cs (1)
147return ImmutableInterlocked.GetOrAdd(ref _projectIdToProjectMap, projectId, s_createProjectFunction, this);
Workspace\Solution\SolutionState.cs (1)
1172return ImmutableInterlocked.GetOrAdd(
Microsoft.CodeAnalysis.Workspaces.Desktop (2)
Workspace\Host\Mef\MefV1HostServices.cs (2)
86exports = ImmutableInterlocked.GetOrAdd(ref _exportsMap, key, _ => 103exports = ImmutableInterlocked.GetOrAdd(ref _exportsMap, key, _ =>
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\DiagnosticReporter.cs (1)
49ImmutableInterlocked.Update(ref Diagnostics, (list, d) => list.Add(d), diagnostic);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (2)
157var oldValue = ImmutableInterlocked.InterlockedCompareExchange(ref target, initializedValue, default(ImmutableArray<T>)); 195ImmutableInterlocked.Update(
src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
23ImmutableInterlocked.InterlockedInitialize(ref s_lazyNumerals, numerals);
src\Dependencies\Collections\RoslynImmutableInterlocked.cs (8)
387/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 407/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 427/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 455/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 493/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 529/// <inheritdoc cref="ImmutableInterlocked.TryAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue)"/> 555/// <inheritdoc cref="ImmutableInterlocked.TryUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, TValue)"/> 583/// <inheritdoc cref="ImmutableInterlocked.TryRemove{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, out TValue)"/>
Microsoft.ML.Core (6)
Utilities\FuncMethodInfo1`1.cs (1)
39return ImmutableInterlocked.GetOrAdd(
Utilities\FuncMethodInfo1`2.cs (1)
40return ImmutableInterlocked.GetOrAdd(
Utilities\FuncMethodInfo1`3.cs (1)
41return ImmutableInterlocked.GetOrAdd(
Utilities\FuncMethodInfo2`3.cs (1)
41return ImmutableInterlocked.GetOrAdd(
Utilities\FuncMethodInfo3`2.cs (1)
40return ImmutableInterlocked.GetOrAdd(
Utilities\FuncMethodInfo3`3.cs (1)
41return ImmutableInterlocked.GetOrAdd(
Microsoft.VisualStudio.IntegrationTest.Setup (1)
TestTraceListener.cs (1)
125ImmutableInterlocked.Update(ref _failures, static (failures, exception) => failures.Add(exception), exception);
Microsoft.VisualStudio.LanguageServices (10)
Options\VisualStudioSettingsOptionPersister.cs (1)
92ImmutableInterlocked.GetOrAdd(ref _storageKeysToMonitorForChanges, storageKey, static (_, arg) => arg, factoryArgument: (primaryOptionKey, primaryStorageKey));
ProjectSystem\OpenTextBufferProvider.cs (2)
110public void AddListener(IOpenTextBufferEventListener listener) => ImmutableInterlocked.Update(ref _listeners, static (array, listener) => array.Add(listener), listener); 111public void RemoveListener(IOpenTextBufferEventListener listener) => ImmutableInterlocked.Update(ref _listeners, static (array, listener) => array.Remove(listener), listener);
ProjectSystem\VisualStudioWorkspaceImpl.cs (3)
92/// <remarks>Should be updated with <see cref="ImmutableInterlocked"/>.</remarks> 244Contract.ThrowIfFalse(ImmutableInterlocked.TryAdd(ref _projectToRuleSetFilePath, project.Id, ruleSetFilePathFunc)); 1562ImmutableInterlocked.TryRemove(ref _projectToRuleSetFilePath, project.Id, out _);
Telemetry\Shared\AbstractAggregatingLog.cs (1)
68(var aggregator, _, var aggregatorLock) = ImmutableInterlocked.GetOrAdd(ref _aggregations, name, name =>
Telemetry\Shared\TelemetryLogProvider.cs (3)
58return ImmutableInterlocked.GetOrAdd(ref _logs, functionId, functionId => new VisualStudioTelemetryLog(_telemetryLogger, functionId)); 69return ImmutableInterlocked.GetOrAdd( 81return ImmutableInterlocked.GetOrAdd(
Microsoft.VisualStudio.LanguageServices.DevKit (4)
src\VisualStudio\Core\Def\Telemetry\Shared\AbstractAggregatingLog.cs (1)
68(var aggregator, _, var aggregatorLock) = ImmutableInterlocked.GetOrAdd(ref _aggregations, name, name =>
src\VisualStudio\Core\Def\Telemetry\Shared\TelemetryLogProvider.cs (3)
58return ImmutableInterlocked.GetOrAdd(ref _logs, functionId, functionId => new VisualStudioTelemetryLog(_telemetryLogger, functionId)); 69return ImmutableInterlocked.GetOrAdd( 81return ImmutableInterlocked.GetOrAdd(
System.Collections.Immutable (1)
System\Collections\Immutable\ImmutableArray_1.Minimal.cs (1)
20/// Our own <see cref="System.Collections.Immutable.ImmutableInterlocked"/> class depends on it, as well as others externally.
System.Windows.Forms.UI.IntegrationTests (1)
Infra\DataCollectionService.cs (1)
83ImmutableInterlocked.Update(