70 implementations of ISet
GenerateDocumentationAndConfigFiles (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.Build (6)
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\8b3a4ac2431f87ea\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\8b3a4ac2431f87ea\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
Microsoft.CodeAnalysis (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.CodeAnalysis.Analyzers (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.CodeAnalysis.Extensions.Package (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Microsoft.CodeAnalysis.Workspaces (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
Roslyn.Diagnostics.Analyzers (6)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (1)
66internal readonly partial struct ImmutableSegmentedHashSet<T> : IImmutableSet<T>, ISet<T>, ICollection, IEquatable<ImmutableSegmentedHashSet<T>>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+Builder.cs (1)
16public sealed class Builder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
18private struct ValueBuilder : ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedHashSet`1.cs (1)
26internal class SegmentedHashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.Empty.Set.cs (1)
17internal class Set<T> : Collection<T>, ISet<T>, IReadOnlySet<T>
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
16internal class Set<TUnderlying, T> : Collection<TUnderlying, T>, ISet<T>, IReadOnlySet<T>
System.Collections (1)
System\Collections\Generic\SortedSet.cs (1)
49public partial class SortedSet<T> : ISet<T>, ICollection<T>, ICollection, IReadOnlyCollection<T>, IReadOnlySet<T>, ISerializable, IDeserializationCallback
System.Collections.Immutable (7)
System\Collections\Frozen\FrozenSet.cs (1)
240public abstract partial class FrozenSet<T> : ISet<T>,
System\Collections\Immutable\ImmutableHashSet_1.Builder.cs (1)
30public sealed class Builder : IReadOnlyCollection<T>, ISet<T>
System\Collections\Immutable\ImmutableHashSet_1.cs (1)
19public sealed partial class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, ICollection<T>, ISet<T>, IReadOnlySet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>
System\Collections\Immutable\ImmutableHashSet_1.HashBucketByRefEqualityComparer.cs (1)
11public sealed partial class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, ICollection<T>, ISet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>
System\Collections\Immutable\ImmutableHashSet_1.HashBucketByValueEqualityComparer.cs (1)
11public sealed partial class ImmutableHashSet<T> : IImmutableSet<T>, IReadOnlyCollection<T>, ICollection<T>, ISet<T>, ICollection, IStrongEnumerable<T, ImmutableHashSet<T>.Enumerator>
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (1)
32public sealed class Builder : IReadOnlyCollection<T>, ISet<T>, ICollection
System\Collections\Immutable\ImmutableSortedSet_1.cs (1)
24public sealed partial class ImmutableSortedSet<T> : IImmutableSet<T>, IReadOnlySet<T>, IReadOnlyList<T>, IList<T>, ISet<T>, IList, IStrongEnumerable<T, ImmutableSortedSet<T>.Enumerator>
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
17public class HashSet<T> : ICollection<T>, ISet<T>, IReadOnlyCollection<T>, IReadOnlySet<T>, ISerializable, IDeserializationCallback
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (1)
14public class ReadOnlySet<T> : IReadOnlySet<T>, ISet<T>, ICollection
1047 references to ISet
aspire (1)
Utils\ConsoleActivityLogger.cs (1)
580ISet<string> visited,
Aspire.Dashboard (2)
Components\Controls\Chart\MetricTable.razor.cs (2)
61_metrics = UpdateMetrics(out var xValuesToAnnounce, traces, xValues, exemplars); 118private SortedList<DateTimeOffset, MetricViewBase> UpdateMetrics(out ISet<DateTimeOffset> addedXValues, List<ChartTrace> traces, List<DateTimeOffset> xValues, List<ChartExemplar> exemplars)
Aspire.Hosting (1)
ApplicationModel\EndpointReferenceAnnotation.cs (1)
27public ISet<string> EndpointNames { get; } = new HashSet<string>(StringComparers.EndpointAnnotationName);
Aspire.Hosting.Radius (1)
Publishing\SealedSecretApplyStep.cs (1)
784private static void CollectContextValues(YamlNode node, ISet<string> contexts)
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\KnownTypeSymbols.cs (1)
110ISet = compilation.GetBestTypeByMetadataName(typeof(ISet<>));
GenerateDocumentationAndConfigFiles (32)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
105var referencingStatements =
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
119public ISet<ICatchClauseOperation> CatchClausesForDisallowedTypesWithoutRethrow { get; } = new HashSet<ICatchClauseOperation>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (2)
16public static ISet<T> ToSet<T>(this IEnumerable<T> source) 23return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 239var safeImportsToAdd = await GetSafeToAddImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
32var unusableNames = parameterNames.Concat(outerTypeParameterNames).ToSet(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
166var nodesToVerify = nodesBySemanticBoundary.Where(group => group.Skip(1).Any()).Flatten().ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
137public static string GenerateUniqueName(string baseName, ISet<string> names, StringComparer comparer)
Microsoft.AspNetCore.Components.Endpoints (5)
Builder\RazorComponentDataSourceOptions.cs (1)
33internal ISet<IComponentRenderMode> ConfiguredRenderModes { get; } = new HashSet<IComponentRenderMode>(RenderModeComparer);
Discovery\RazorComponentApplication.cs (1)
37public ISet<IComponentRenderMode> GetDeclaredRenderModesByDiscoveredComponents()
FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (3)
86var _ when type == (typeof(ISet<TElement>)) => true, 193var _ when type.IsAssignableTo(typeof(ISet<TElement>)) => 194CreateConverter<ISet<TElement>, HashSet<TElement>>(elementTypeConverter),
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Logging\Internal\LoggingRedactionOptionsConfigureOptions.cs (1)
50private static void BindSet(IConfigurationSection section, ISet<string> destination)
Logging\LoggingRedactionOptions.cs (1)
94public ISet<string> ExcludePathStartsWith { get; set; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Http.Extensions (3)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\Factories\Collections\TypedCollectionConverterFactory.cs (3)
86var _ when type == (typeof(ISet<TElement>)) => true, 193var _ when type.IsAssignableTo(typeof(ISet<TElement>)) => 194CreateConverter<ISet<TElement>, HashSet<TElement>>(elementTypeConverter),
Microsoft.AspNetCore.HttpLogging (7)
FileLoggerProcessor.cs (1)
38private ISet<string> _additionalHeaders;
HttpLoggingOptions.cs (2)
30public ISet<string> RequestHeaders => _internalRequestHeaders; 69public ISet<string> ResponseHeaders => _internalResponseHeaders;
W3CLoggerOptions.cs (2)
115public ISet<string> AdditionalRequestHeaders { get; } = new SortedSet<string>(StringComparer.OrdinalIgnoreCase); 126internal static ISet<string> FilterRequestHeaders(W3CLoggerOptions options)
W3CLoggerProcessor.cs (1)
17private readonly ISet<string>? _additionalRequestHeaders;
W3CLoggingMiddleware.cs (1)
42private readonly ISet<string> _additionalRequestHeaders;
Microsoft.AspNetCore.Server.IntegrationTesting (1)
src\aspnetcore\src\Shared\Process\ProcessExtensions.cs (1)
41private static void GetAllChildIdsUnix(int parentId, ISet<int> children, TimeSpan timeout)
Microsoft.Build (88)
BackEnd\BuildManager\BuildManager.cs (3)
3290ISet<string> warningsAsErrors, 3291ISet<string> warningsNotAsErrors, 3292ISet<string> warningsAsMessages)
BackEnd\BuildManager\BuildParameters.cs (3)
625public ISet<string> WarningsAsErrors { get; set; } 630public ISet<string> WarningsNotAsErrors { get; set; } 635public ISet<string> WarningsAsMessages { get; set; }
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (5)
79public ISet<string> WarningsAsErrors 88public IDictionary<int, ISet<string>> WarningsAsErrorsByProject 97public ISet<string> WarningsAsMessages 106public IDictionary<int, ISet<string>> WarningsAsMessagesByProject 116public ISet<int> BuildSubmissionIdsThatHaveLoggedErrors { get; } = null;
BackEnd\Components\Logging\ILoggingService.cs (6)
185ISet<string> WarningsAsErrors 194ISet<string> WarningsNotAsErrors 203ISet<string> WarningsAsMessages 274void AddWarningsAsMessages(BuildEventContext buildEventContext, ISet<string> codes); 281void AddWarningsAsErrors(BuildEventContext buildEventContext, ISet<string> codes); 288void AddWarningsNotAsErrors(BuildEventContext buildEventContext, ISet<string> codes);
BackEnd\Components\Logging\LoggingService.cs (21)
224private readonly ISet<int> _buildSubmissionIdsThatHaveLoggedErrors = new HashSet<int>(); 229private readonly ISet<int> _buildSubmissionIdsThatHaveLoggedBuildcheckErrors = new HashSet<int>(); 239private IDictionary<WarningsConfigKey, ISet<string>> _warningsAsErrorsByProject; 244private IDictionary<WarningsConfigKey, ISet<string>> _warningsNotAsErrorsByProject; 249private IDictionary<WarningsConfigKey, ISet<string>> _warningsAsMessagesByProject; 533public ISet<string> WarningsAsErrors 542public ISet<string> WarningsNotAsErrors 551public ISet<string> WarningsAsMessages 721private ICollection<string> GetWarningsForProject(BuildEventContext context, IDictionary<WarningsConfigKey, ISet<string>> warningsByProject, ISet<string> warnings) 725if (warningsByProject != null && warningsByProject.TryGetValue(key, out ISet<string> newWarnings)) 745public void AddWarningsAsErrors(BuildEventContext buildEventContext, ISet<string> codes) 755public void AddWarningsNotAsErrors(BuildEventContext buildEventContext, ISet<string> codes) 765public void AddWarningsAsMessages(BuildEventContext buildEventContext, ISet<string> codes) 776private void AddWarningsAsMessagesOrErrors(ref IDictionary<WarningsConfigKey, ISet<string>> warningsByProject, BuildEventContext buildEventContext, ISet<string> codes) 787warningsByProject ??= new ConcurrentDictionary<WarningsConfigKey, ISet<string>>(); 2064if (_warningsAsMessagesByProject.TryGetValue(GetWarningsConfigKey(warningEvent), out ISet<string> codesByProject)) 2077return WarningsNotAsErrors?.Contains(warningEvent.Code) != true && !(_warningsNotAsErrorsByProject?.TryGetValue(key, out ISet<string> notToError) == true && notToError.Contains(warningEvent.Code)); 2103if (_warningsAsErrorsByProject.TryGetValue(key, out ISet<string> codesByProject)) 2107ISet<string> codesToIgnoreByProject = null;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (12)
153/// <param name="keepMetadata">An <see cref="ISet{String}"/> of metadata names to keep.</param> 154/// <param name="removeMetadata">An <see cref="ISet{String}"/> of metadata names to remove.</param> 156private void ExecuteAdd(ProjectItemGroupTaskItemInstance child, ItemBucket bucket, ISet<string> keepMetadata, ISet<string> removeMetadata, LoggingContext loggingContext = null) 296/// <param name="keepMetadata">An <see cref="ISet{String}"/> of metadata names to keep.</param> 297/// <param name="removeMetadata">An <see cref="ISet{String}"/> of metadata names to remove.</param> 299private void ExecuteModify(ProjectItemGroupTaskItemInstance child, ItemBucket bucket, ISet<string> keepMetadata, ISet<string> removeMetadata, LoggingContext loggingContext = null) 382/// <param name="keepMetadata">An <see cref="ISet{String}"/> of metadata names to keep.</param> 383/// <param name="removeMetadata">An <see cref="ISet{String}"/> of metadata names to remove.</param> 394ISet<string> keepMetadata, 395ISet<string> removeMetadata,
BackEnd\Components\RequestBuilder\RequestBuilder.cs (4)
1535ISet<string> warningsAsErrors = ParseWarningCodes(project.GetEngineRequiredPropertyValue(MSBuildConstants.WarningsAsErrors)); 1543ISet<string> warningsNotAsErrors = ParseWarningCodes(project.GetEngineRequiredPropertyValue(MSBuildConstants.WarningsNotAsErrors)); 1550ISet<string> warningsAsMessages = ParseWarningCodes(project.GetEngineRequiredPropertyValue(MSBuildConstants.WarningsAsMessages)); 1568private static ISet<string> ParseWarningCodes(string warnings)
Definition\Project.cs (8)
852internal ISet<string> GlobalPropertiesToTreatAsLocal => implementationInternal.GlobalPropertiesToTreatAsLocal; 2518public ISet<string> GlobalPropertiesToTreatAsLocal => _data.GlobalPropertiesToTreatAsLocal; 3842ISet<string> GlobalPropertiesToTreatAsLocal { get; } 3863public ISet<string> GlobalPropertiesToTreatAsLocal { get { throw new NotImplementedException(); } } 3902private ISet<string> _globalPropertiesToTreatAsLocal; 3953public ISet<string> GlobalPropertiesToTreatAsLocal => _globalPropertiesToTreatAsLocal ?? (_globalPropertiesToTreatAsLocal = 4566/// Gets an <see cref="ISet{String}"/> containing strings that were excluded. 4571/// Gets an <see cref="ISet{String}"/> containing strings that were later removed via the Remove element.
Evaluation\IEvaluatorData.cs (1)
98ISet<string> GlobalPropertiesToTreatAsLocal
Evaluation\LazyItemEvaluator.cs (3)
168private Dictionary<ISet<string>, OrderedItemDataCollection> _cache; 216public bool TryGetFromCache(ISet<string> globsToIgnore, out OrderedItemDataCollection items) 239_cache = new Dictionary<ISet<string>, OrderedItemDataCollection>();
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
99public ISet<string> GlobalPropertiesToTreatAsLocal => _wrappedData.GlobalPropertiesToTreatAsLocal;
Evaluation\LazyItemEvaluator.IncludeOperation.cs (2)
54ISet<string>? excludePatternsForGlobs = null; 181private static ISet<string> BuildExcludePatternsForGlobs(ImmutableHashSet<string> globsToIgnore, ImmutableList<string>.Builder excludePatterns)
Evaluation\Profiler\EvaluationProfiler.cs (1)
59public IDisposable TrackGlob(string rootDirectory, string glob, ISet<string> excludePatterns)
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (1)
145public ISet<string> GlobalPropertiesToTreatAsLocal => _wrapped.GlobalPropertiesToTreatAsLocal;
Instance\ProjectInstance.cs (2)
112private ISet<string> _globalPropertiesToTreatAsLocal; 1499ISet<string> IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.GlobalPropertiesToTreatAsLocal
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\8b3a4ac2431f87ea\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\8b3a4ac2431f87ea\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\9f0d3f3da306d8cf\IEnumerableExtensions.cs (3)
163public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 173public static ISet<T> ToSet<T>(this IEnumerable<T> source) 180return source as ISet<T> ?? new HashSet<T>(source);
Microsoft.Build.Framework (4)
ProjectStartedEventArgs.cs (4)
334internal ISet<string>? WarningsAsErrors { get; set; } 335internal ISet<string>? WarningsNotAsErrors { get; set; } 336internal ISet<string>? WarningsAsMessages { get; set; } 489private static ISet<string>? ReadStringSet(BinaryReader reader)
Microsoft.Build.NuGetSdkResolver (1)
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
Microsoft.Build.Tasks.Core (8)
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (4)
72internal static readonly IDictionary<string, ISet<string>> ValidCodeLanguages = new Dictionary<string, ISet<string>>(StringComparer.OrdinalIgnoreCase) 543foreach (KeyValuePair<string, ISet<string>> validLanguage in ValidCodeLanguages) 591ISet<string> resolvedAssemblyReferences = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
RoslynCodeTaskFactory\RoslynCodeTaskFactoryTaskInfo.cs (4)
29/// Gets a <see cref="ISet{String}"/> of namespaces to use. 31public ISet<string> Namespaces { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase); 34/// Gets an <see cref="ISet{String}"/> of assembly references. 36public ISet<string> References { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis (22)
Collections\IdentifierCollection.Collection.cs (1)
45_count = this.IdentifierCollection._map.Values.Sum(o => o is string ? 1 : ((ISet<string>)o).Count);
Emit\EditAndContinue\SymbolChanges.cs (2)
34private readonly ISet<ISymbolInternal> _replacedSymbols; 353out ISet<ISymbolInternal> replacedSymbols,
InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
Microsoft.CodeAnalysis.Analyzers (32)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
105var referencingStatements =
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
119public ISet<ICatchClauseOperation> CatchClausesForDisallowedTypesWithoutRethrow { get; } = new HashSet<ICatchClauseOperation>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (2)
16public static ISet<T> ToSet<T>(this IEnumerable<T> source) 23return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 239var safeImportsToAdd = await GetSafeToAddImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
32var unusableNames = parameterNames.Concat(outerTypeParameterNames).ToSet(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
166var nodesToVerify = nodesBySemanticBoundary.Where(group => group.Skip(1).Any()).Flatten().ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
137public static string GenerateUniqueName(string baseName, ISet<string> names, StringComparer comparer)
Microsoft.CodeAnalysis.AnalyzerUtilities (28)
src\2e2796bccd1466f6\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
632ISet<string> taintedParameterNames,
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
119public ISet<ICatchClauseOperation> CatchClausesForDisallowedTypesWithoutRethrow { get; } = new HashSet<ICatchClauseOperation>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (2)
16public static ISet<T> ToSet<T>(this IEnumerable<T> source) 23return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataSymbolMapExtensions.cs (1)
186ISet<string> taintedParameterNames,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
Microsoft.CodeAnalysis.CodeStyle (23)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
Microsoft.CodeAnalysis.CodeStyle.Fixes (23)
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
105var referencingStatements =
src\roslyn\src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
81var containers = diagnostics.Select(d => GetContainer(root, d.Location.FindNode(cancellationToken)))
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
175var documentsUpdated = locationsByDocument.Select(g => g.Key).ToSet();
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (3)
19protected static readonly ISet<TypeKind> EnumType = new HashSet<TypeKind> { TypeKind.Enum }; 20protected static readonly ISet<TypeKind> ClassInterfaceModuleStructTypes = new HashSet<TypeKind> 31ISet<TypeKind> typeKinds)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
24protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn); 25protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
124var reservedParameterNames = DetermineParameterNames(cancellationToken) 146var availableTypeParameterNames = allTypeParameters.Select(t => t.Name).ToSet();
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (6)
23ISet<string> availableTypeParameterNames, 34Compilation compilation, ISet<string> availableTypeParameterNames, Project project, CancellationToken cancellationToken) : AsyncSymbolVisitor 39private readonly ISet<string> _availableTypeParameterNames = availableTypeParameterNames; 91var commonTypes = await GetDerivedAndImplementedTypesAsync( 96var currentTypes = await GetDerivedAndImplementedTypesAsync( 123private async Task<ISet<INamedTypeSymbol>> GetDerivedAndImplementedTypesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
488var constructorSpans = field.ContainingType 553ISet<(string filePath, TextSpan span)> constructorSpans,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 239var safeImportsToAdd = await GetSafeToAddImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
32var unusableNames = parameterNames.Concat(outerTypeParameterNames).ToSet(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
166var nodesToVerify = nodesBySemanticBoundary.Where(group => group.Skip(1).Any()).Flatten().ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
137public static string GenerateUniqueName(string baseName, ISet<string> names, StringComparer comparer)
Microsoft.CodeAnalysis.CSharp (15)
Declarations\DeclarationTable.Cache.cs (4)
30private ISet<string>? _typeNames; 31private ISet<string>? _namespaceNames; 55public ISet<string> TypeNames 66public ISet<string> NamespaceNames
Declarations\DeclarationTable.cs (5)
131var cachedTypeNames = _cache.TypeNames; 145var cachedNamespaceNames = _cache.NamespaceNames; 174private static ISet<string> GetTypeNames(Declaration declaration) 179private static ISet<string> GetNamespaceNames(Declaration declaration) 184private static ISet<string> GetNames(Declaration declaration, Predicate<Declaration> predicate)
Symbols\Metadata\PE\PEEventSymbol.cs (1)
431var implementedEvents = PEPropertyOrEventHelpers.GetEventsForExplicitlyImplementedAccessor(_addMethod);
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
889var propertiesWithImplementedGetters = PEPropertyOrEventHelpers.GetPropertiesForExplicitlyImplementedAccessor(_getMethod); 890var propertiesWithImplementedSetters = PEPropertyOrEventHelpers.GetPropertiesForExplicitlyImplementedAccessor(_setMethod);
Symbols\PropertyOrEventSymbolExtensions.cs (3)
22internal static ISet<PropertySymbol> GetPropertiesForExplicitlyImplementedAccessor(MethodSymbol accessor) 27internal static ISet<EventSymbol> GetEventsForExplicitlyImplementedAccessor(MethodSymbol accessor) 33private static ISet<T> GetSymbolsForExplicitlyImplementedAccessor<T>(MethodSymbol accessor) where T : Symbol
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
204var reservedNames = semanticModel.LookupSymbols(container.SpanStart)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
161public static ISet<INamespaceSymbol> GetUsingNamespacesInScope(this SemanticModel semanticModel, SyntaxNode location)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (2)
17public static ISet<SyntaxKind> GetPrecedingModifiers(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken) 20public static ISet<SyntaxKind> GetPrecedingModifiers(
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (52)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (5)
56ISet<TypeKind> classInterfaceModuleStructTypes, 82ISet<TypeKind> classInterfaceModuleStructTypes, 108ISet<TypeKind> classInterfaceModuleStructTypes, 136ISet<TypeKind> classInterfaceModuleStructTypes, 167ISet<TypeKind> classInterfaceModuleStructTypes,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
72var identifierNames = fieldLocations.SelectMany(loc => loc.Locations.Select(loc => loc.Location.FindNode(getInnermostNodeForTie: true, cancellationToken) as IdentifierNameSyntax))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\UseAutoPropertyRewriter.cs (2)
16ISet<IdentifierNameSyntax> identifierNames) : CSharpSyntaxRewriter 19private readonly ISet<IdentifierNameSyntax> _identifierNames = identifierNames;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (3)
46var topmostUsingStatements = diagnostics.Select( 48var blockLikes = topmostUsingStatements.Select(u => u.Parent is GlobalStatementSyntax ? u.Parent.GetRequiredParent() : u.GetRequiredParent()).ToSet(); 63ISet<UsingStatementSyntax> topmostUsingStatements)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
543var blockStatements = block.Statements.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (10)
48public readonly ISet<SyntaxKind> PrecedingModifiers; 111ISet<SyntaxKind> precedingModifiers, 228var precedingModifiers = syntaxTree.GetPrecedingModifiers(position, cancellationToken); 324ISet<SyntaxKind>? validModifiers = null, 325ISet<SyntaxKind>? validTypeDeclarations = null, 332public bool IsRecordDeclarationContext(ISet<SyntaxKind> validModifiers, CancellationToken cancellationToken) 340var modifiers = SyntaxTree.GetPrecedingModifiers(positionBeforeRecordKeyword, cancellationToken); 346ISet<SyntaxKind> validTypeDeclarations, bool includingRecordParameters, CancellationToken cancellationToken) 403ISet<SyntaxKind>? validModifiers = null, 404ISet<SyntaxKind>? validTypeDeclarations = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (12)
21private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 80ISet<SyntaxKind> validModifiers, 92var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken); 243ISet<SyntaxKind>? validModifiers, 244ISet<SyntaxKind>? validTypeDeclarations, 290var modifierTokens = context?.PrecedingModifiers ?? syntaxTree.GetPrecedingModifiers(position, cancellationToken); 325var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken, out position); 342ISet<SyntaxKind> validModifiers, 345var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken, out position); 532ISet<SyntaxKind>? validModifiers, 533ISet<SyntaxKind>? validTypeDeclarations, 587var modifierTokens = context?.PrecedingModifiers ?? syntaxTree.GetPrecedingModifiers(position, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (6)
24private readonly ISet<UsingDirectiveSyntax> _unnecessaryUsingsDoNotAccessDirectly; 28ISet<UsingDirectiveSyntax> unnecessaryUsings, 44ISet<UsingDirectiveSyntax> usingsToRemove, 128private ISet<UsingDirectiveSyntax> GetUsingsToRemove( 150var usingsToRemove = GetUsingsToRemove(node.Usings, compilationUnit.Usings); 204var usingsToRemove = GetUsingsToRemove(node.Usings, namespaceDeclaration.Usings);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (12)
11public static readonly ISet<SyntaxKind> AllTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 30public static readonly ISet<SyntaxKind> AllMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 50public static readonly ISet<SyntaxKind> AllGlobalMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 64public static readonly ISet<SyntaxKind> AccessibilityModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 72public static readonly ISet<SyntaxKind> AllTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 85public static readonly ISet<SyntaxKind> ClassInterfaceStructRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 97public static readonly ISet<SyntaxKind> NonEnumTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 110public static readonly ISet<SyntaxKind> ClassInterfaceRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 117public static readonly ISet<SyntaxKind> ClassRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 123public static readonly ISet<SyntaxKind> ClassStructRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 134public static readonly ISet<SyntaxKind> StructOnlyTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 143public static readonly ISet<SyntaxKind> InterfaceOnlyTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Microsoft.CodeAnalysis.CSharp.Features (121)
AddImport\CSharpAddImportFeatureService.cs (1)
245protected override ISet<INamespaceSymbol> GetImportNamespacesInScope(
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (2)
160var conflictReferences = allReferences.Where(n => HasConflict(n, declarator)).ToSet(); 161var nonConflictReferences = allReferences.Where(n => !conflictReferences.Contains(n)).ToSet();
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (5)
88var existingNamedParameters = GetExistingNamedParameters(attributeArgumentList, position); 155SyntaxToken token, AttributeSyntax attributeSyntax, ISet<string> existingNamedParameters) 177CompletionContext context, SemanticModel semanticModel, SyntaxToken token, AttributeSyntax attributeSyntax, ISet<string> existingNamedParameters) 201private static bool IsValid(ImmutableArray<IParameterSymbol> parameterList, ISet<string> existingNamedParameters) 204private static ISet<string> GetExistingNamedParameters(AttributeArgumentListSyntax argumentList, int position)
Completion\CompletionProviders\ExternAliasCompletionProvider.cs (1)
68var aliases = compilation.ExternalReferences.SelectMany(r => r.Properties.Aliases).ToSet();
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (3)
75var existingNamedParameters = GetExistingNamedParameters(argumentList, position); 120private static bool IsValid(ImmutableArray<IParameterSymbol> parameterList, ISet<string> existingNamedParameters) 127private static ISet<string> GetExistingNamedParameters(BaseArgumentListSyntax argumentList, int position)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (2)
107if (IsAttributeNameContext(token, position, out var elementName, out var existingAttributes)) 211private bool IsAttributeNameContext(SyntaxToken token, int position, [NotNullWhen(true)] out string? elementName, [NotNullWhen(true)] out ISet<string>? attributeNames)
Completion\KeywordRecommenders\AbstractKeywordRecommender.cs (3)
14private static readonly ISet<SyntaxKind> s_validNonInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 25private static readonly ISet<SyntaxKind> s_validInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 37private static readonly ISet<SyntaxKind> s_validTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\AsyncKeywordRecommender.cs (1)
15private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\ClassKeywordRecommender.cs (1)
14private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\ClosedKeywordRecommender.cs (1)
16private static readonly ISet<SyntaxKind> s_validModifiers = SyntaxKindSet.AllTypeModifiers
Completion\KeywordRecommenders\ConstKeywordRecommender.cs (2)
14private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 23private static readonly ISet<SyntaxKind> s_validGlobalModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\DelegateKeywordRecommender.cs (1)
15private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\EnumKeywordRecommender.cs (1)
14private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\EventKeywordRecommender.cs (2)
15private static readonly ISet<SyntaxKind> s_validClassModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 31private static readonly ISet<SyntaxKind> s_validStructModifiers = new HashSet<SyntaxKind>(s_validClassModifiers, SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\ExplicitKeywordRecommender.cs (4)
14private static readonly ISet<SyntaxKind> s_validNonInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 22private static readonly ISet<SyntaxKind> s_validInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 35var modifiers = context.PrecedingModifiers; 44var modifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\ExtensionKeywordRecommender.cs (2)
13private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer); 14private static readonly ISet<SyntaxKind> s_validTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\ExternKeywordRecommender.cs (3)
15private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 29private static readonly ISet<SyntaxKind> s_validGlobalModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 39private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\FieldKeywordRecommender.cs (1)
16private static readonly ISet<SyntaxKind> s_validTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\FileKeywordRecommender.cs (1)
16private static readonly ISet<SyntaxKind> s_validModifiers = SyntaxKindSet.AllMemberModifiers
Completion\KeywordRecommenders\FixedKeywordRecommender.cs (2)
14private static readonly ISet<SyntaxKind> s_structDeclaration = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 19private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\ImplicitKeywordRecommender.cs (4)
14private static readonly ISet<SyntaxKind> s_validNonInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 22private static readonly ISet<SyntaxKind> s_validInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 35var modifiers = context.PrecedingModifiers; 44var modifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\InterfaceKeywordRecommender.cs (1)
14private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\InternalKeywordRecommender.cs (1)
58var precedingModifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\NewKeywordRecommender.cs (2)
17private static readonly ISet<SyntaxKind> s_validMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 33private static readonly ISet<SyntaxKind> ValidTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\OverrideKeywordRecommender.cs (2)
14private static readonly ISet<SyntaxKind> s_validMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 37var modifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\ParamKeywordRecommender.cs (1)
15private static readonly ISet<SyntaxKind> s_validTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer);
Completion\KeywordRecommenders\PrivateKeywordRecommender.cs (2)
40var modifiers = context.PrecedingModifiers; 77var precedingModifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\ProtectedKeywordRecommender.cs (1)
63var precedingModifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\PublicKeywordRecommender.cs (1)
48var precedingModifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\ReadOnlyKeywordRecommender.cs (1)
16private static readonly ISet<SyntaxKind> s_validMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\RecordKeywordRecommender.cs (1)
14private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (3)
21private static readonly ISet<SyntaxKind> RefMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 43private static readonly ISet<SyntaxKind> RefGlobalMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 61private static readonly ISet<SyntaxKind> RefGlobalMemberScriptModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\RequiredKeywordRecommender.cs (2)
16private static readonly ISet<SyntaxKind> s_validModifiers = SyntaxKindSet.AllMemberModifiers.Where(s => s is not (SyntaxKind.RequiredKeyword or SyntaxKind.StaticKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.ConstKeyword)).ToSet(); 18private static readonly ISet<SyntaxKind> s_validTypeDeclarations = SyntaxKindSet.ClassStructRecordTypeDeclarations;
Completion\KeywordRecommenders\SealedKeywordRecommender.cs (3)
14private static readonly ISet<SyntaxKind> s_validNonInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 25private static readonly ISet<SyntaxKind> s_validInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 37private static readonly ISet<SyntaxKind> s_validTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\StaticKeywordRecommender.cs (5)
15private static readonly ISet<SyntaxKind> s_validTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 26private static readonly ISet<SyntaxKind> s_validNonInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 40private static readonly ISet<SyntaxKind> s_validInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 57private static readonly ISet<SyntaxKind> s_validGlobalMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 69private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\StructKeywordRecommender.cs (1)
15private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\UnionKeywordRecommender.cs (1)
14private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\UnsafeKeywordRecommender.cs (4)
14private static readonly ISet<SyntaxKind> s_validTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 28private static readonly ISet<SyntaxKind> s_validMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 45private static readonly ISet<SyntaxKind> s_validGlobalMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 57private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\VirtualKeywordRecommender.cs (3)
14private static readonly ISet<SyntaxKind> s_validNonInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 25private static readonly ISet<SyntaxKind> s_validInterfaceMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 53var modifiers = context.PrecedingModifiers;
Completion\KeywordRecommenders\VoidKeywordRecommender.cs (2)
15private static readonly ISet<SyntaxKind> s_validClassInterfaceRecordModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 32private static readonly ISet<SyntaxKind> s_validStructModifiers = new HashSet<SyntaxKind>(s_validClassInterfaceRecordModifiers, SyntaxFacts.EqualityComparer)
Completion\KeywordRecommenders\VolatileKeywordRecommender.cs (1)
15private static readonly ISet<SyntaxKind> s_validMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
338var namespaces = semanticModel.GetUsingNamespacesInScope(converter.ForEachInfo.ForEachStatement);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (4)
306var matches = FindMatches( 377var matches = FindMatches(document, expression, document, [scope], allOccurrences, cancellationToken); 381ISet<StatementSyntax> allAffectedStatements = new HashSet<StatementSyntax>(matches.SelectMany(expr => GetApplicableStatementAncestors(expr))); 439private static int GetFirstStatementAffectedIndex(SyntaxNode innermostCommonBlock, ISet<ExpressionSyntax> matches, int firstStatementAffectedIndex)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (1)
39var matches = FindMatches(document, expression, document, [oldOutermostQuery], allOccurrences, cancellationToken);
IntroduceVariable\CSharpIntroduceVariableService.cs (1)
149ISet<ExpressionSyntax> matches)
IntroduceVariable\CSharpIntroduceVariableService.Rewriter.cs (3)
21private readonly ISet<ExpressionSyntax> _matches; 23private Rewriter(SyntaxNode replacementNode, ISet<ExpressionSyntax> matches) 93public static SyntaxNode Visit(SyntaxNode node, SyntaxNode replacementNode, ISet<ExpressionSyntax> matches)
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (2)
84var methodSet = accessibleMethods.ToSet(); 88private static bool IsHiddenByOtherMethod(IMethodSymbol method, ISet<IMethodSymbol> methodSet)
SimplifyThisOrMe\CSharpSimplifyThisOrMeCodeFixProvider.cs (3)
25protected override SyntaxNode Rewrite(SyntaxNode root, ISet<MemberAccessExpressionSyntax> memberAccessNodes) 28private sealed class Rewriter(ISet<MemberAccessExpressionSyntax> memberAccessNodes) : CSharpSyntaxRewriter 30private readonly ISet<MemberAccessExpressionSyntax> _memberAccessNodes = memberAccessNodes;
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
30protected abstract ISet<SyntaxKind> ValidModifiers { get; }
Snippets\CSharpClassSnippetProvider.cs (2)
21private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 40protected override ISet<SyntaxKind> ValidModifiers => s_validModifiers;
Snippets\CSharpConstructorSnippetProvider.cs (2)
30private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 43var precedingModifiers = syntaxContext.PrecedingModifiers;
Snippets\CSharpEnumSnippetProvider.cs (2)
21private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 34protected override ISet<SyntaxKind> ValidModifiers => s_validModifiers;
Snippets\CSharpInterfaceSnippetProvider.cs (2)
21private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 35protected override ISet<SyntaxKind> ValidModifiers => s_validModifiers;
Snippets\CSharpProprSnippetProvider.cs (1)
36var precedingModifiers = syntaxContext.PrecedingModifiers;
Snippets\CSharpStructSnippetProvider.cs (2)
21private static readonly ISet<SyntaxKind> s_validModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 37protected override ISet<SyntaxKind> ValidModifiers => s_validModifiers;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
204var reservedNames = semanticModel.LookupSymbols(container.SpanStart)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (5)
56ISet<TypeKind> classInterfaceModuleStructTypes, 82ISet<TypeKind> classInterfaceModuleStructTypes, 108ISet<TypeKind> classInterfaceModuleStructTypes, 136ISet<TypeKind> classInterfaceModuleStructTypes, 167ISet<TypeKind> classInterfaceModuleStructTypes,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
72var identifierNames = fieldLocations.SelectMany(loc => loc.Locations.Select(loc => loc.Location.FindNode(getInnermostNodeForTie: true, cancellationToken) as IdentifierNameSyntax))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\UseAutoPropertyRewriter.cs (2)
16ISet<IdentifierNameSyntax> identifierNames) : CSharpSyntaxRewriter 19private readonly ISet<IdentifierNameSyntax> _identifierNames = identifierNames;
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (3)
46var topmostUsingStatements = diagnostics.Select( 48var blockLikes = topmostUsingStatements.Select(u => u.Parent is GlobalStatementSyntax ? u.Parent.GetRequiredParent() : u.GetRequiredParent()).ToSet(); 63ISet<UsingStatementSyntax> topmostUsingStatements)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
139var reservedNames = semanticModel
Microsoft.CodeAnalysis.CSharp.Workspaces (46)
Recommendations\CSharpRecommendationServiceRunner.cs (2)
437var contextOuterTypes = ComputeOuterTypes(_context, _cancellationToken); 447ISet<INamedTypeSymbol> outerTypes,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
161public static ISet<INamespaceSymbol> GetUsingNamespacesInScope(this SemanticModel semanticModel, SyntaxNode location)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (2)
17public static ISet<SyntaxKind> GetPrecedingModifiers(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken) 20public static ISet<SyntaxKind> GetPrecedingModifiers(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
543var blockStatements = block.Statements.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (10)
48public readonly ISet<SyntaxKind> PrecedingModifiers; 111ISet<SyntaxKind> precedingModifiers, 228var precedingModifiers = syntaxTree.GetPrecedingModifiers(position, cancellationToken); 324ISet<SyntaxKind>? validModifiers = null, 325ISet<SyntaxKind>? validTypeDeclarations = null, 332public bool IsRecordDeclarationContext(ISet<SyntaxKind> validModifiers, CancellationToken cancellationToken) 340var modifiers = SyntaxTree.GetPrecedingModifiers(positionBeforeRecordKeyword, cancellationToken); 346ISet<SyntaxKind> validTypeDeclarations, bool includingRecordParameters, CancellationToken cancellationToken) 403ISet<SyntaxKind>? validModifiers = null, 404ISet<SyntaxKind>? validTypeDeclarations = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (12)
21private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 80ISet<SyntaxKind> validModifiers, 92var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken); 243ISet<SyntaxKind>? validModifiers, 244ISet<SyntaxKind>? validTypeDeclarations, 290var modifierTokens = context?.PrecedingModifiers ?? syntaxTree.GetPrecedingModifiers(position, cancellationToken); 325var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken, out position); 342ISet<SyntaxKind> validModifiers, 345var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken, out position); 532ISet<SyntaxKind>? validModifiers, 533ISet<SyntaxKind>? validTypeDeclarations, 587var modifierTokens = context?.PrecedingModifiers ?? syntaxTree.GetPrecedingModifiers(position, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (6)
24private readonly ISet<UsingDirectiveSyntax> _unnecessaryUsingsDoNotAccessDirectly; 28ISet<UsingDirectiveSyntax> unnecessaryUsings, 44ISet<UsingDirectiveSyntax> usingsToRemove, 128private ISet<UsingDirectiveSyntax> GetUsingsToRemove( 150var usingsToRemove = GetUsingsToRemove(node.Usings, compilationUnit.Usings); 204var usingsToRemove = GetUsingsToRemove(node.Usings, namespaceDeclaration.Usings);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (12)
11public static readonly ISet<SyntaxKind> AllTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 30public static readonly ISet<SyntaxKind> AllMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 50public static readonly ISet<SyntaxKind> AllGlobalMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 64public static readonly ISet<SyntaxKind> AccessibilityModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 72public static readonly ISet<SyntaxKind> AllTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 85public static readonly ISet<SyntaxKind> ClassInterfaceStructRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 97public static readonly ISet<SyntaxKind> NonEnumTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 110public static readonly ISet<SyntaxKind> ClassInterfaceRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 117public static readonly ISet<SyntaxKind> ClassRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 123public static readonly ISet<SyntaxKind> ClassStructRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 134public static readonly ISet<SyntaxKind> StructOnlyTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 143public static readonly ISet<SyntaxKind> InterfaceOnlyTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Microsoft.CodeAnalysis.Extensions.Package (18)
Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
Microsoft.CodeAnalysis.Features (59)
AddImport\AbstractAddImportFeatureService.cs (1)
52protected abstract ISet<INamespaceSymbol> GetImportNamespacesInScope(SemanticModel semanticModel, SyntaxNode node, CancellationToken cancellationToken);
AddImport\SymbolReferenceFinder.cs (3)
33private readonly ISet<INamespaceSymbol> _namespacesInScope; 74private ISet<INamespaceSymbol> GetNamespacesInScope(CancellationToken cancellationToken) 77var set = _owner.GetImportNamespacesInScope(_semanticModel, _node, cancellationToken);
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (4)
34var uniqueIdentities = await GetUniqueIdentitiesAsync(context).ConfigureAwait(false); 36var assemblyNames = uniqueIdentities.Select(i => i.Name).ToSet(); 44private static async Task<ImmutableArray<CodeAction>> GetAddReferencesCodeActionsAsync(CodeFixContext context, ISet<AssemblyIdentity> uniqueIdentities) 57private static async Task<ISet<AssemblyIdentity>> GetUniqueIdentitiesAsync(CodeFixContext context)
AddPackage\AbstractAddPackageCodeFixProvider.cs (2)
30CodeFixContext context, ISet<string> assemblyNames) 75ISet<string> assemblyNames,
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (1)
29private static readonly ISet<string> s_predefinedProviderNames =
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (4)
134var membersToRemove = GetMembersToRemove(root); 146var leadingTrivia = this.TypeDeclaration.GetLeadingTrivia().ToSet(); 256private ISet<SyntaxNode> GetMembersToRemove(SyntaxNode root) 264var removableCandidates = root
Completion\Providers\AbstractDocCommentCompletionProvider.cs (2)
123protected IEnumerable<CompletionItem> GetAttributeItems(string tagName, ISet<string> existingAttributes, bool addEqualsAndQuotes) 275var names = symbols.Select(p => p.Name).ToSet();
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (2)
63var inferredTypes = context.InferredTypes.Where(t => t.SpecialType != SpecialType.System_Void).ToSet<ITypeSymbol>(SymbolEqualityComparer.Default); 92ISet<ITypeSymbol> inferredTypes,
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.cs (2)
58ISet<string> namespaceInScope, 99ISet<string> namespaceInScope,
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer.cs (2)
38private readonly ISet<string> _namespaceInScope; 50ISet<string> namespaceInScope)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
461var allProjects = dependentProjects.Select<ProjectId, Project>(solution.GetRequiredProject)
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (1)
125var projectAnalyzers = analyzers.Where(a => !hostAnalyzerInfo.IsHostAnalyzer(a)).ToSet();
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (3)
24ISet<INamedTypeSymbol> typesOfInterest) 34var types = s_typeNamesOfInterest.Select(compilation.GetTypeByMetadataName).WhereNotNull().ToSet(); 50private readonly ISet<INamedTypeSymbol> _typesOfInterest = typesOfInterest;
EncapsulateField\AbstractEncapsulateFieldService.cs (3)
244var constructorLocations = GetConstructorLocations(solution, field.ContainingType); 297private static bool IntersectsWithAny(DocumentId documentId, TextSpan span, ISet<(DocumentId documentId, TextSpan span)> constructorLocations) 311private ISet<(DocumentId documentId, TextSpan span)> GetConstructorLocations(Solution solution, INamedTypeSymbol containingType)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
564private readonly ISet<object>? _projectOrDocumentIds;
FindUsages\DefinitionsAndReferences.cs (1)
36var definitionSet = definitions.ToSet();
IntroduceVariable\AbstractIntroduceVariableService.cs (6)
296protected ISet<TExpressionSyntax> FindMatches( 361var matches = FindMatches(originalDocument, expressionInOriginal, currentDocument, [withinNodeInCurrent], allOccurrences, cancellationToken); 374ISet<TExpressionSyntax> matches) 422protected static async Task<(SemanticDocument newSemanticDocument, ISet<TExpressionSyntax> newMatches)> ComplexifyParentingStatementsAsync( 424ISet<TExpressionSyntax> matches, 431var newMatches = newSemanticDocument.Root.GetCurrentNodes(matches.AsEnumerable()).ToSet();
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
15private readonly ISet<INamedTypeSymbol> _seenTypes = new HashSet<INamedTypeSymbol>();
SimplifyThisOrMe\AbstractSimplifyThisOrMeCodeFixProvider.cs (2)
25protected abstract SyntaxNode Rewrite(SyntaxNode root, ISet<TMemberAccessExpressionSyntax> memberAccessNodes); 43var memberAccessNodes = diagnostics.Select(
src\roslyn\src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
81var containers = diagnostics.Select(d => GetContainer(root, d.Location.FindNode(cancellationToken)))
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
175var documentsUpdated = locationsByDocument.Select(g => g.Key).ToSet();
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberService.cs (3)
19protected static readonly ISet<TypeKind> EnumType = new HashSet<TypeKind> { TypeKind.Enum }; 20protected static readonly ISet<TypeKind> ClassInterfaceModuleStructTypes = new HashSet<TypeKind> 31ISet<TypeKind> typeKinds)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
24protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn); 25protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, [NotNullWhen(true)] out IMethodSymbol? methodSymbol, [NotNullWhen(true)] out INamedTypeSymbol? typeToGenerateIn);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
124var reservedParameterNames = DetermineParameterNames(cancellationToken) 146var availableTypeParameterNames = allTypeParameters.Select(t => t.Name).ToSet();
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (6)
23ISet<string> availableTypeParameterNames, 34Compilation compilation, ISet<string> availableTypeParameterNames, Project project, CancellationToken cancellationToken) : AsyncSymbolVisitor 39private readonly ISet<string> _availableTypeParameterNames = availableTypeParameterNames; 91var commonTypes = await GetDerivedAndImplementedTypesAsync( 96var currentTypes = await GetDerivedAndImplementedTypesAsync( 123private async Task<ISet<INamedTypeSymbol>> GetDerivedAndImplementedTypesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
488var constructorSpans = field.ContainingType 553ISet<(string filePath, TextSpan span)> constructorSpans,
Microsoft.CodeAnalysis.NetAnalyzers (13)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumsShouldHaveZeroValue.Fixer.cs (1)
109ISet<IFieldSymbol> set = EnumsShouldHaveZeroValueAnalyzer.GetZeroValuedFields(enumType).ToSet();
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotMatchKeywords.cs (1)
121private readonly ISet<string> _namespaceWithKeywordSet = new HashSet<string>();
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypesThatOwnDisposableFieldsShouldBeDisposable.cs (2)
65var disposableFields = namedType 81private static void AnalyzeOperation(OperationAnalysisContext ctx, INamedTypeSymbol parent, ISet<IFieldSymbol> disposableFields, ref TemporarySet<string> disposableFieldNamesBuilder)
Microsoft.NetCore.Analyzers\Performance\PreferDictionaryTryMethodsOverContainsKeyGuardFixer.cs (1)
86public ISet<string> GetReservedNames(SemanticModel semanticModel, int position, CancellationToken cancellationToken)
Microsoft.NetCore.Analyzers\Runtime\AvoidConstArrays.Fixer.cs (1)
191private static string GetExtractedMemberName(ISet<string> identifierNames, string parameterName)
src\40daf5e1cab76dff\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (1)
630ISet<string> taintedParameterNames,
src\40daf5e1cab76dff\TaintedDataSymbolMapExtensions.cs (1)
185ISet<string> taintedParameterNames,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
117public ISet<ICatchClauseOperation> CatchClausesForDisallowedTypesWithoutRethrow { get; } = new HashSet<ICatchClauseOperation>();
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (2)
35public static ISet<T> ToSet<T>(this IEnumerable<T> source) 42return source as ISet<T> ?? new HashSet<T>(source);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ISetExtensions.cs (1)
8public static void AddRange<T>(this ISet<T> set, IEnumerable<T> values)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Workspaces\SyntaxGeneratorExtensions.cs (1)
481public static SyntaxNode FirstUnusedIdentifierName(this SyntaxGenerator generator, SemanticModel semanticModel, int position, string baseName, int maxTries = int.MaxValue, ISet<string>? reservedNames = null)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Legacy\KeywordSet.cs (1)
8internal readonly struct KeywordSet(ISet<string> set)
Microsoft.CodeAnalysis.ResxSourceGenerator (26)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
119public ISet<ICatchClauseOperation> CatchClausesForDisallowedTypesWithoutRethrow { get; } = new HashSet<ICatchClauseOperation>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (2)
16public static ISet<T> ToSet<T>(this IEnumerable<T> source) 23return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
Microsoft.CodeAnalysis.VisualBasic (12)
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
277Dim symbolsCapturedWithoutCtor As ISet(Of Symbol) = Nothing
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (3)
124Friend ReadOnly symbolsCapturedWithoutCopyCtor As ISet(Of Symbol) 126Private Sub New(method As MethodSymbol, symbolsCapturedWithoutCopyCtor As ISet(Of Symbol), diagnostics As BindingDiagnosticBag) 137Public Shared Function AnalyzeMethodBody(node As BoundBlock, method As MethodSymbol, symbolsCapturedWithoutCtor As ISet(Of Symbol), diagnostics As BindingDiagnosticBag) As Analysis
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
169symbolsCapturedWithoutCopyCtor As ISet(Of Symbol),
Lowering\LocalRewriter\LocalRewriter.vb (3)
24Private _symbolsCapturedWithoutCopyCtor As ISet(Of Symbol) 158<Out> ByRef symbolsCapturedWithoutCtor As ISet(Of Symbol), 215<Out> ByRef symbolsCapturedWithoutCopyCtor As ISet(Of Symbol),
Lowering\Rewriter.vb (1)
44Dim symbolsCapturedWithoutCopyCtor As ISet(Of Symbol) = Nothing
Symbols\Metadata\PE\PEPropertyOrEventHelpers.vb (3)
18Friend Shared Function GetPropertiesForExplicitlyImplementedAccessor(accessor As MethodSymbol) As ISet(Of PropertySymbol) 22Friend Shared Function GetEventsForExplicitlyImplementedAccessor(accessor As MethodSymbol) As ISet(Of EventSymbol) 27Private Shared Function GetSymbolsForExplicitlyImplementedAccessor(Of T As Symbol)(accessor As MethodSymbol) As ISet(Of T)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\45a5dce26ceffa63\VisualBasicRemoveUnnecessaryImportsRewriter.vb (2)
15Private ReadOnly _unnecessaryImports As ISet(Of ImportsClauseSyntax) 19Public Sub New(unnecessaryImports As ISet(Of ImportsClauseSyntax),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
73Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (6)
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (5)
55Protected Overrides Function TryInitializeExplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 69Protected Overrides Function TryInitializeImplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 83Private Shared Function TryGetConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 113Private Shared Function TryGetExplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, castExpression As CastExpressionSyntax, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 129Private Shared Function TryGetImplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\SyntaxKindSet.vb (1)
8Public ReadOnly AllOperators As ISet(Of SyntaxKind) = New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer) From
Microsoft.CodeAnalysis.VisualBasic.Features (16)
AddImport\VisualBasicAddImportFeatureService.vb (1)
219Protected Overrides Function GetImportNamespacesInScope(semanticModel As SemanticModel, node As SyntaxNode, cancellationToken As CancellationToken) As ISet(Of INamespaceSymbol)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (2)
114Private Shared Function IsValid(parameterList As ImmutableArray(Of ISymbol), existingNamedParameters As ISet(Of String)) As Boolean 120Private Shared Function GetExistingNamedParameters(argumentList As ArgumentListSyntax, position As Integer) As ISet(Of String)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceLocal.vb (1)
102lambdas As ISet(Of SingleLineLambdaExpressionSyntax)) As SingleLineLambdaExpressionSyntax
IntroduceVariable\VisualBasicIntroduceVariableService.Rewriter.vb (3)
17Private ReadOnly _matches As ISet(Of ExpressionSyntax) 19Private Sub New(replacementNode As SyntaxNode, matches As ISet(Of ExpressionSyntax)) 49Public Overloads Shared Function Visit(node As SyntaxNode, replacementNode As SyntaxNode, matches As ISet(Of ExpressionSyntax)) As SyntaxNode
IntroduceVariable\VisualBasicIntroduceVariableService.vb (1)
154Protected Overrides Function RewriteCore(Of TNode As SyntaxNode)(node As TNode, replacementNode As SyntaxNode, matches As ISet(Of ExpressionSyntax)) As TNode
SimplifyThisOrMe\VisualBasicSimplifyThisOrMeCodeFixProvider.vb (3)
27Protected Overrides Function Rewrite(root As SyntaxNode, memberAccessNodes As ISet(Of MemberAccessExpressionSyntax)) As SyntaxNode 34Private ReadOnly memberAccessNodes As ISet(Of MemberAccessExpressionSyntax) 36Public Sub New(memberAccessNodes As ISet(Of MemberAccessExpressionSyntax))
src\roslyn\src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (5)
55Protected Overrides Function TryInitializeExplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 69Protected Overrides Function TryInitializeImplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 83Private Shared Function TryGetConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 113Private Shared Function TryGetExplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, castExpression As CastExpressionSyntax, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 129Private Shared Function TryGetImplicitConversionMethodAndTypeToGenerateIn(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Workspaces (4)
src\45a5dce26ceffa63\VisualBasicRemoveUnnecessaryImportsRewriter.vb (2)
15Private ReadOnly _unnecessaryImports As ISet(Of ImportsClauseSyntax) 19Public Sub New(unnecessaryImports As ISet(Of ImportsClauseSyntax),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
73Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\SyntaxKindSet.vb (1)
8Public ReadOnly AllOperators As ISet(Of SyntaxKind) = New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer) From
Microsoft.CodeAnalysis.Workspaces (40)
Classification\Classifier.cs (1)
104var semanticSet = semanticClassifications.Select(s => s.TextSpan).ToSet();
FindSymbols\FindReferences\DependentTypeFinder.cs (5)
93var projectsThatCouldReferenceType = await GetProjectsThatCouldReferenceTypeAsync( 399private static async Task<ISet<ProjectId>> GetProjectsThatCouldReferenceTypeAsync( 417var projectsThatCouldReferenceType = 433var projectsThatCouldReferenceType = GetProjectsThatCouldReferenceType( 495var allProjectsThatTheseProjectsDependOn = projects
Recommendations\AbstractRecommendationService.cs (1)
41protected static ISet<INamedTypeSymbol> ComputeOuterTypes(SyntaxContext context, CancellationToken cancellationToken)
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
366var complexifiedLocationSpanForThisDocument = conflictLocations 769ISet<ConflictLocationInfo> conflictLocations,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
361ISet<RenameLocation> renameLocations,
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
105var referencingStatements =
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 239var safeImportsToAdd = await GetSafeToAddImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
32var unusableNames = parameterNames.Concat(outerTypeParameterNames).ToSet(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
166var nodesToVerify = nodesBySemanticBoundary.Where(group => group.Skip(1).Any()).Flatten().ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
137public static string GenerateUniqueName(string baseName, ISet<string> names, StringComparer comparer)
Workspace\Solution\SolutionCompilationState.cs (1)
660var newDocumentIdSet = newDocumentInfos.Select(static d => d.Id).ToSet();
Microsoft.DotNet.Build.Tasks.Packaging (1)
CreateTrimDependencyGroups.cs (1)
228public ISet<TaskItemPackageDependency> Packages { get; }
Microsoft.DotNet.Cli.Utils (2)
Extensions\MSBuildProjectExtensions.cs (2)
17var condChain = el.ConditionChain(); 21public static ISet<string> ConditionChain(this ProjectElement projectElement)
Microsoft.DotNet.TemplateLocator (4)
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\IWorkloadResolver.cs (2)
16ISet<WorkloadResolver.WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packId, out ISet<WorkloadPackId> unsatisfiablePacks);
parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (2)
513public ISet<WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packIds, out ISet<WorkloadPackId> unsatisfiablePacks)
Microsoft.DotNet.XliffTasks (1)
Model\XlfDocument.cs (1)
276public ISet<string> GetUntranslatedResourceIDs()
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
1079return genericTypeDefinition == typeof(ISet<>)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
Parser\KnownTypeSymbols.cs (1)
113ISet = compilation.GetBestTypeByMetadataName(typeof(ISet<>));
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (1)
HealthCheckRegistration.cs (1)
190public ISet<string> Tags { get; }
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
ResourceMonitoringOptions.Windows.cs (1)
20public ISet<string> SourceIpAddresses { get; set; } = new HashSet<string>();
Windows\Network\WindowsTcpStateInfo.cs (1)
30var stringAddresses = options.Value.SourceIpAddresses;
Microsoft.Extensions.Diagnostics.Testing (2)
Logging\FakeLogCollectorOptions.cs (2)
24public ISet<string> FilteredCategories { get; set; } = new HashSet<string>(); 34public ISet<LogLevel> FilteredLevels { get; set; } = new HashSet<LogLevel>();
Microsoft.Extensions.FileProviders.Embedded.Manifest.Task (3)
Entry.cs (3)
23public ISet<Entry> Children { get; } = new SortedSet<Entry>(NameComparer.Instance); 93private static bool SameChildren(ISet<Entry> left, ISet<Entry> right)
Microsoft.Extensions.Http.Diagnostics (3)
Logging\Internal\LoggingOptionsConfigureOptions.cs (1)
67private static void BindSet(IConfigurationSection section, ISet<string> destination)
Logging\LoggingOptions.cs (2)
92public ISet<string> RequestBodyContentTypes { get; set; } = new HashSet<string>(); 98public ISet<string> ResponseBodyContentTypes { get; set; } = new HashSet<string>();
Microsoft.Extensions.Http.Diagnostics.Tests (10)
Logging\HttpRequestReaderTest.cs (2)
951public ISet<string> UniqueHostNameSuffixes { get; } = new HashSet<string> { RequestedHost }; 953public ISet<RequestMetadata> RequestMetadata { get; } = new HashSet<RequestMetadata>
Telemetry\BackslashDownstreamDependencyMetadata.cs (4)
11private static readonly ISet<string> _uniqueHostNameSuffixes = new HashSet<string> 16private static readonly ISet<RequestMetadata> _requestMetadataSet = new HashSet<RequestMetadata> 26public ISet<string> UniqueHostNameSuffixes => _uniqueHostNameSuffixes; 28public ISet<RequestMetadata> RequestMetadata => _requestMetadataSet;
Telemetry\EmptyRouteDependencyMetadata.cs (4)
11private static readonly ISet<string> _uniqueHostNameSuffixes = new HashSet<string> 16private static readonly ISet<RequestMetadata> _requestMetadataSet = new HashSet<RequestMetadata> 24public ISet<string> UniqueHostNameSuffixes => _uniqueHostNameSuffixes; 26public ISet<RequestMetadata> RequestMetadata => _requestMetadataSet;
Microsoft.Extensions.Telemetry.Abstractions (2)
Http\IDownstreamDependencyMetadata.cs (2)
21ISet<string> UniqueHostNameSuffixes { get; } 26ISet<RequestMetadata> RequestMetadata { get; }
Microsoft.Gen.Logging (1)
Parsing\Parser.LogProperties.cs (1)
85ISet<ITypeSymbol> typesChain,
Microsoft.Gen.MetadataExtractor (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
690ISet<ITypeSymbol> typesChain, 866ISet<ITypeSymbol> typesChain,
Microsoft.Gen.Metrics (2)
Parser.cs (2)
690ISet<ITypeSymbol> typesChain, 866ISet<ITypeSymbol> typesChain,
Microsoft.Gen.MetricsReports (2)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
690ISet<ITypeSymbol> typesChain, 866ISet<ITypeSymbol> typesChain,
Microsoft.ML.AutoML (3)
Sweepers\SweeperBase.cs (1)
73protected static bool AlreadyGenerated(ParameterSet paramSet, ISet<ParameterSet> previousRuns)
TrainerExtensions\SweepableParams.cs (2)
68public static ISet<string> AllHyperparameterNames = GetAllSweepableParameterNames(); 199public static ISet<string> GetAllSweepableParameterNames()
Microsoft.ML.Data (4)
Commands\TypeInfoCommand.cs (4)
54private sealed class SetOfKindsComparer : IEqualityComparer<ISet<InternalDataKind>> 56public bool Equals(ISet<InternalDataKind> x, ISet<InternalDataKind> y) 65public int GetHashCode(ISet<InternalDataKind> obj)
Microsoft.NET.Build.Tasks (6)
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\IWorkloadResolver.cs (2)
16ISet<WorkloadResolver.WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packId, out ISet<WorkloadPackId> unsatisfiablePacks);
parent\parent\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (2)
513public ISet<WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packIds, out ISet<WorkloadPackId> unsatisfiablePacks)
ShowMissingWorkloads.cs (2)
50var suggestedWorkloads = workloadResolver.GetWorkloadSuggestionForMissingPacks( 52out ISet<WorkloadPackId> unsatisfiablePacks
Microsoft.NET.Sdk.WorkloadManifestReader (4)
IWorkloadResolver.cs (2)
16ISet<WorkloadResolver.WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packId, out ISet<WorkloadPackId> unsatisfiablePacks);
WorkloadResolver.cs (2)
513public ISet<WorkloadInfo>? GetWorkloadSuggestionForMissingPacks(IList<WorkloadPackId> packIds, out ISet<WorkloadPackId> unsatisfiablePacks)
Microsoft.TemplateEngine.Core (12)
Expressions\IOperatorMap.cs (4)
9ISet<TToken> BadSyntaxTokens { get; } 15ISet<TToken> LiteralSequenceBoundsMarkers { get; } 19ISet<TToken> NoOpTokens { get; } 25ISet<TToken> Terminators { get; }
Expressions\OperatorSetBuilder.cs (4)
29public ISet<TToken> BadSyntaxTokens { get; } 35public ISet<TToken> LiteralSequenceBoundsMarkers { get; } 39public ISet<TToken> NoOpTokens { get; } 45public ISet<TToken> Terminators { get; }
Expressions\ScopeBuilder.cs (4)
13private readonly ISet<TToken> _badSyntaxTokens; 19private readonly ISet<TToken> _literalSequenceBoundsMarkers; 20private readonly ISet<TToken> _noops; 26private readonly ISet<TToken> _terminators;
Microsoft.TemplateEngine.Utils (1)
Glob.cs (1)
269public ISet<char> Char { get; }
Microsoft.TestPlatform.Filter.Source (6)
FastFilter.cs (6)
32internal FastFilter(Dictionary<string, ISet<string>> filterProperties, Operation filterOperation, Operator filterOperator) 55internal Dictionary<string, ISet<string>> FilterProperties { get; } 85var filterValues = kvp.Value; 208private readonly Dictionary<string, ISet<string>> _filterDictionaryBuilder = new Dictionary<string, ISet<string>>(StringComparer.OrdinalIgnoreCase); 274if (!_filterDictionaryBuilder.TryGetValue(name, out var values))
Microsoft.VisualStudio.TestPlatform.Common (4)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FastFilter.cs (4)
30internal FastFilter(ImmutableDictionary<string, ISet<string>> filterProperties, Operation filterOperation, Operator filterOperator) 53internal ImmutableDictionary<string, ISet<string>> FilterProperties { get; } 85var filterValues = kvp.Value; 292_filterDictionaryBuilder.ToImmutableDictionary(kvp => kvp.Key, kvp => (ISet<string>)_filterDictionaryBuilder[kvp.Key].ToImmutable()),
MSBuild (14)
XMake.cs (14)
925ISet<string> warningsAsErrors = null; 926ISet<string> warningsNotAsErrors = null; 927ISet<string> warningsAsMessages = null; 1597ISet<string> warningsAsErrors, 1598ISet<string> warningsNotAsErrors, 1599ISet<string> warningsAsMessages, 2439ref ISet<string> warningsAsErrors, 2440ref ISet<string> warningsNotAsErrors, 2441ref ISet<string> warningsAsMessages, 3254private static ISet<string> ProcessWarningRelatedSwitch(CommandLineSwitches commandLineSwitches, CommandLineSwitches.ParameterizedSwitch warningSwitch) 3263ISet<string> warningSwitches = new HashSet<string>(StringComparer.OrdinalIgnoreCase); 3283internal static ISet<string> ProcessWarnAsErrorSwitch(CommandLineSwitches commandLineSwitches) 3288internal static ISet<string> ProcessWarnAsMessageSwitch(CommandLineSwitches commandLineSwitches) 3293internal static ISet<string> ProcessWarnNotAsErrorSwitch(CommandLineSwitches commandLineSwitches)
netstandard (1)
netstandard.cs (1)
122[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ISet<>))]
NuGet.Build.Tasks (1)
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
NuGet.Build.Tasks.Pack (7)
PackTaskLogic.cs (7)
438var tfmSpecificRefs = new Dictionary<string, ISet<string>>(); 572private static ISet<NuGetFramework> ParseFrameworks(IPackTaskRequest<IMSBuildItem> request, IDictionary<string, string> targetAliasToNuGetFramework) 659var excludeFiles = CalculateFilesToExcludeInPack(request); 834private ISet<string> CalculateFilesToExcludeInPack(IPackTaskRequest<IMSBuildItem> request) 871ISet<string> frameworksWithSuppressedDependencies, 908ISet<string> frameworkWithSuppressedDependencies) 993ISet<string> frameworkWithSuppressedDependencies)
NuGet.CommandLine.XPlat (1)
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
NuGet.Commands (54)
CommandRunners\PackCommandRunner.cs (3)
320ISet<PackageDependency> packageDependencies = new HashSet<PackageDependency>(); 998public static void AddLibraryDependency(LibraryDependency dependency, ISet<LibraryDependency> list) 1033public static void AddPackageDependency(PackageDependency dependency, ISet<PackageDependency> set)
MSBuildPackTargetArgs.cs (1)
20public ISet<NuGetFramework> TargetFrameworks { get; set; }
PackCommand\Logging\PackageSpecificWarningProperties.cs (6)
22internal IDictionary<NuGetLogCode, IDictionary<string, ISet<NuGetFramework>>> Properties { get; private set; } 60Properties ??= new Dictionary<NuGetLogCode, IDictionary<string, ISet<NuGetFramework>>>(); 62if (!Properties.TryGetValue(code, out IDictionary<string, ISet<NuGetFramework>> frameworksByLibraryId)) 64frameworksByLibraryId = new Dictionary<string, ISet<NuGetFramework>>(StringComparer.OrdinalIgnoreCase); 68if (!frameworksByLibraryId.TryGetValue(libraryId, out ISet<NuGetFramework> frameworks)) 88libraryIdsAndFrameworks.TryGetValue(libraryId, out var frameworkSet) &&
RestoreCommand\Diagnostics\UnexpectedDependencyMessages.cs (2)
71public static IEnumerable<RestoreLogMessage> GetMissingLowerBounds(IEnumerable<IRestoreTargetGraph> graphs, ISet<string> ignoreIds) 132ISet<string> ignoreIds)
RestoreCommand\DownloadDependencyResolutionResult.cs (4)
29public ISet<RemoteMatch> Install { get; } 34public ISet<LibraryRange> Unresolved { get; } 37private DownloadDependencyResolutionResult(NuGetFramework framework, IList<Tuple<LibraryRange, RemoteMatch>> dependencies, ISet<RemoteMatch> install, ISet<LibraryRange> unresolved)
RestoreCommand\IRestoreTargetGraph.cs (4)
54ISet<RemoteMatch> Install { get; } 56ISet<GraphItem<RemoteResolveResult>> Flattened { get; } 58ISet<LibraryRange> Unresolved { get; } 66ISet<ResolvedDependencyKey> ResolvedDependencies { get; }
RestoreCommand\Logging\PackageSpecificWarningProperties.cs (6)
25public IDictionary<NuGetLogCode, IDictionary<string, ISet<string>>> Properties { get; private set; } 81Properties ??= new Dictionary<NuGetLogCode, IDictionary<string, ISet<string>>>(); 83if (!Properties.TryGetValue(code, out IDictionary<string, ISet<string>> frameworksByLibraryId)) 85frameworksByLibraryId = new Dictionary<string, ISet<string>>(StringComparer.OrdinalIgnoreCase); 89if (!frameworksByLibraryId.TryGetValue(libraryId, out ISet<string> frameworks)) 137libraryIdsAndFrameworks.TryGetValue(libraryId, out var frameworkSet) &&
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (4)
451var frameworks = libraryPair.Value; 468var frameworks = libraryPair.Value; 553var frameworks = libraryPair.Value; 601var frameworks = libraryPair.Value;
RestoreCommand\RequestFactory\NoOpRestoreResult.cs (1)
66public override ISet<LibraryIdentity> GetAllInstalled()
RestoreCommand\RestoreCommand.cs (3)
2064var runtimeIds = RequestRuntimeUtility.GetRestoreRuntimes(_request); 2471/// <param name="runtimeIds">An <see cref="ISet{T}" /> containing the list of runtime identifiers.</param> 2473internal static List<FrameworkRuntimeDefinition> CreateFrameworkRuntimeDefinitions(PackageSpec packageSpec, ISet<string> runtimeIds)
RestoreCommand\RestoreRequest.cs (3)
123public ISet<FrameworkRuntimePair> CompatibilityProfiles { get; } 136public ISet<string> RequestedRuntimes { get; } = new SortedSet<string>(StringComparer.Ordinal); 143public ISet<string> FallbackRuntimes { get; } = new SortedSet<string>(StringComparer.Ordinal);
RestoreCommand\RestoreResult.cs (2)
156public virtual ISet<LibraryIdentity> GetAllInstalled() 168public ISet<LibraryRange> GetAllUnresolved()
RestoreCommand\RestoreTargetGraph.cs (8)
49public ISet<RemoteMatch> Install { get; } 51public ISet<GraphItem<RemoteResolveResult>> Flattened { get; } 53public ISet<LibraryRange> Unresolved { get; } 64public ISet<ResolvedDependencyKey> ResolvedDependencies { get; } 72ISet<RemoteMatch> install, 73ISet<GraphItem<RemoteResolveResult>> flattened, 74ISet<LibraryRange> unresolved, 76ISet<ResolvedDependencyKey> resolvedDependencies)
RestoreCommand\Utility\BuildAssetsUtils.cs (1)
877ISet<GraphItem<RemoteResolveResult>> items)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
Utility\Extensions.cs (2)
19public static ISet<LibraryDependency> GetAllPackageDependencies(this PackageSpec project) 26public static ISet<LibraryDependency> GetPackageDependenciesForFramework(this PackageSpec project, NuGetFramework framework)
Utility\RequestRuntimeUtility.cs (1)
17internal static ISet<string> GetRestoreRuntimes(RestoreRequest request)
NuGet.Configuration (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
NuGet.DependencyResolver.Core (1)
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
NuGet.Frameworks (1)
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
NuGet.LibraryModel (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
NuGet.PackageManagement (3)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
NuGet.Packaging (9)
PackageCreation\Authoring\ManifestMetadata.cs (1)
274ISet<PackageDependency> dependencies;
PackageCreation\Authoring\ManifestReader.cs (2)
347var dependencies = ReadDependencies(dependenciesElement); 383private static ISet<PackageDependency> ReadDependencies(XElement containerElement)
PackageCreation\Authoring\PackageBuilder.cs (3)
243public ISet<string> Authors { get; private set; } 245public ISet<string> Owners { get; private set; } 273public ISet<string> Tags { get; private set; }
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
NuGet.ProjectModel (9)
JsonPackageSpecReader.Utf8JsonStreamReader.cs (1)
665ISet<FrameworkDependency> frameworkReferences,
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
WarningProperties.cs (6)
20public ISet<NuGetLogCode> WarningsAsErrors { get; } 25public ISet<NuGetLogCode> NoWarn { get; } 35public ISet<NuGetLogCode> WarningsNotAsErrors { get; } 45public WarningProperties(ISet<NuGetLogCode> warningsAsErrors, ISet<NuGetLogCode> noWarn, bool allWarningsAsErrors, ISet<NuGetLogCode> warningsNotAsErrors)
NuGet.Protocol (3)
Plugins\InboundRequestProcessingHandler.cs (1)
14private readonly ISet<MessageMethod> _fastProccessingMethods;
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
NuGet.Resolver (2)
PackageResolver.cs (2)
242private static IEnumerable<SourcePackageDependencyInfo> RemoveImpossiblePackages(IEnumerable<SourcePackageDependencyInfo> packages, ISet<string> mustKeep) 257private static List<SourcePackageDependencyInfo> InnerPruneImpossiblePackages(List<SourcePackageDependencyInfo> packages, ISet<string> mustKeep)
NuGet.Versioning (3)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
222this ISet<T>? self, 223ISet<T>? other,
src\nuget-client\build\Shared\SharedExtensions.cs (1)
34public static HashSet<T>? AsHashSet<T>(this ISet<T> enumerable, IEqualityComparer<T>? comparer = null)
PresentationBuildTasks (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
23private static readonly ISet<char> _restrictedCharSet = new SortedSet<char>((new char[] { '=', ',', '\'', '"', '{', '}', '\\' }));
PresentationFramework (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
23private static readonly ISet<char> _restrictedCharSet = new SortedSet<char>((new char[] { '=', ',', '\'', '"', '{', '}', '\\' }));
Roslyn.Diagnostics.Analyzers (34)
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (2)
75var badNamespaces = exportAttributes.Except(appliedExportAttributes).Select(s => s.ContainingNamespace).ToSet(); 76var goodNamespaces = appliedExportAttributes.Select(s => s.ContainingNamespace).ToSet();
src\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (1)
105var referencingStatements =
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs (4)
12public static bool AddAll<T>(this ISet<T> set, IEnumerable<T> values) 23public static bool AddAll<T>(this ISet<T> set, ImmutableArray<T> values) 34public static bool RemoveAll<T>(this ISet<T> set, IEnumerable<T> values) 45public static bool RemoveAll<T>(this ISet<T> set, ImmutableArray<T> values)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
135public static ISet<T> ToSet<T>(this IEnumerable<T> source, IEqualityComparer<T>? comparer) 145public static ISet<T> ToSet<T>(this IEnumerable<T> source) 152return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1.cs (5)
370bool ISet<T>.Add(T item) 373void ISet<T>.UnionWith(IEnumerable<T> other) 376void ISet<T>.IntersectWith(IEnumerable<T> other) 379void ISet<T>.ExceptWith(IEnumerable<T> other) 382void ISet<T>.SymmetricExceptWith(IEnumerable<T> other)
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.cs (6)
43public static ISet<T> EmptySet<T>() 102public static ISet<T> ReadOnlySet<T>(ISet<T>? set) 106: new ReadOnly.Set<ISet<T>, T>(set); 109public static IReadOnlySet<T> StronglyTypedReadOnlySet<T>(ISet<T>? set) 113: new ReadOnly.Set<ISet<T>, T>(set);
src\roslyn\src\Dependencies\Collections\Specialized\SpecializedCollections.ReadOnly.Set.cs (1)
17where TUnderlying : ISet<T>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (1)
119public ISet<ICatchClauseOperation> CatchClausesForDisallowedTypesWithoutRethrow { get; } = new HashSet<ICatchClauseOperation>();
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (2)
16public static ISet<T> ToSet<T>(this IEnumerable<T> source) 23return source as ISet<T> ?? new HashSet<T>(source);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (1)
29var existingConstants = orderedExistingConstants.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
181=> compilation.GetTypeByMetadataName(typeof(ISet<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
816ISet<string> availableTypeParameterNames)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.UnavailableTypeParameterRemover.cs (1)
18private sealed class UnavailableTypeParameterRemover(Compilation compilation, ISet<string> availableTypeParameterNames) : SymbolVisitor<ITypeSymbol>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (2)
75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 239var safeImportsToAdd = await GetSafeToAddImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
32var unusableNames = parameterNames.Concat(outerTypeParameterNames).ToSet(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (1)
166var nodesToVerify = nodesBySemanticBoundary.Where(group => group.Skip(1).Any()).Flatten().ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
137public static string GenerateUniqueName(string baseName, ISet<string> names, StringComparer comparer)
Roslyn.Diagnostics.CSharp.Analyzers (44)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
161public static ISet<INamespaceSymbol> GetUsingNamespacesInScope(this SemanticModel semanticModel, SyntaxNode location)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (2)
17public static ISet<SyntaxKind> GetPrecedingModifiers(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken) 20public static ISet<SyntaxKind> GetPrecedingModifiers(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
543var blockStatements = block.Statements.ToSet();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (10)
48public readonly ISet<SyntaxKind> PrecedingModifiers; 111ISet<SyntaxKind> precedingModifiers, 228var precedingModifiers = syntaxTree.GetPrecedingModifiers(position, cancellationToken); 324ISet<SyntaxKind>? validModifiers = null, 325ISet<SyntaxKind>? validTypeDeclarations = null, 332public bool IsRecordDeclarationContext(ISet<SyntaxKind> validModifiers, CancellationToken cancellationToken) 340var modifiers = SyntaxTree.GetPrecedingModifiers(positionBeforeRecordKeyword, cancellationToken); 346ISet<SyntaxKind> validTypeDeclarations, bool includingRecordParameters, CancellationToken cancellationToken) 403ISet<SyntaxKind>? validModifiers = null, 404ISet<SyntaxKind>? validTypeDeclarations = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (12)
21private static readonly ISet<SyntaxKind> s_validLocalFunctionModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 80ISet<SyntaxKind> validModifiers, 92var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken); 243ISet<SyntaxKind>? validModifiers, 244ISet<SyntaxKind>? validTypeDeclarations, 290var modifierTokens = context?.PrecedingModifiers ?? syntaxTree.GetPrecedingModifiers(position, cancellationToken); 325var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken, out position); 342ISet<SyntaxKind> validModifiers, 345var modifierTokens = syntaxTree.GetPrecedingModifiers(position, cancellationToken, out position); 532ISet<SyntaxKind>? validModifiers, 533ISet<SyntaxKind>? validTypeDeclarations, 587var modifierTokens = context?.PrecedingModifiers ?? syntaxTree.GetPrecedingModifiers(position, cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (6)
24private readonly ISet<UsingDirectiveSyntax> _unnecessaryUsingsDoNotAccessDirectly; 28ISet<UsingDirectiveSyntax> unnecessaryUsings, 44ISet<UsingDirectiveSyntax> usingsToRemove, 128private ISet<UsingDirectiveSyntax> GetUsingsToRemove( 150var usingsToRemove = GetUsingsToRemove(node.Usings, compilationUnit.Usings); 204var usingsToRemove = GetUsingsToRemove(node.Usings, namespaceDeclaration.Usings);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (12)
11public static readonly ISet<SyntaxKind> AllTypeModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 30public static readonly ISet<SyntaxKind> AllMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 50public static readonly ISet<SyntaxKind> AllGlobalMemberModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 64public static readonly ISet<SyntaxKind> AccessibilityModifiers = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 72public static readonly ISet<SyntaxKind> AllTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 85public static readonly ISet<SyntaxKind> ClassInterfaceStructRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 97public static readonly ISet<SyntaxKind> NonEnumTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 110public static readonly ISet<SyntaxKind> ClassInterfaceRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 117public static readonly ISet<SyntaxKind> ClassRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 123public static readonly ISet<SyntaxKind> ClassStructRecordTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 134public static readonly ISet<SyntaxKind> StructOnlyTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer) 143public static readonly ISet<SyntaxKind> InterfaceOnlyTypeDeclarations = new HashSet<SyntaxKind>(SyntaxFacts.EqualityComparer)
Roslyn.Diagnostics.VisualBasic.Analyzers (4)
src\45a5dce26ceffa63\VisualBasicRemoveUnnecessaryImportsRewriter.vb (2)
15Private ReadOnly _unnecessaryImports As ISet(Of ImportsClauseSyntax) 19Public Sub New(unnecessaryImports As ISet(Of ImportsClauseSyntax),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (1)
73Public Function GetImportNamespacesInScope(semanticModel As SemanticModel, location As SyntaxNode) As ISet(Of INamespaceSymbol)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\SyntaxKindSet.vb (1)
8Public ReadOnly AllOperators As ISet(Of SyntaxKind) = New HashSet(Of SyntaxKind)(SyntaxFacts.EqualityComparer) From
System (1)
parent\ref\System.cs (1)
134[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ISet<>))]
System.Collections.Immutable (31)
System\Collections\Frozen\FrozenSet.cs (11)
401bool ISet<T>.Add(T item) => throw new NotSupportedException(); 404void ISet<T>.ExceptWith(IEnumerable<T> other) => throw new NotSupportedException(); 407void ISet<T>.IntersectWith(IEnumerable<T> other) => throw new NotSupportedException(); 410void ISet<T>.SymmetricExceptWith(IEnumerable<T> other) => throw new NotSupportedException(); 413void ISet<T>.UnionWith(IEnumerable<T> other) => throw new NotSupportedException(); 424/// <inheritdoc cref="ISet{T}.IsProperSubsetOf(IEnumerable{T})" /> 434/// <inheritdoc cref="ISet{T}.IsProperSupersetOf(IEnumerable{T})" /> 444/// <inheritdoc cref="ISet{T}.IsSubsetOf(IEnumerable{T})" /> 454/// <inheritdoc cref="ISet{T}.IsSupersetOf(IEnumerable{T})" /> 464/// <inheritdoc cref="ISet{T}.Overlaps(IEnumerable{T})" /> 474/// <inheritdoc cref="ISet{T}.SetEquals(IEnumerable{T})" />
System\Collections\Immutable\ImmutableHashSet_1.cs (10)
438/// See <see cref="ISet{T}"/> 440bool ISet<T>.Add(T item) 446/// See <see cref="ISet{T}"/> 448void ISet<T>.ExceptWith(IEnumerable<T> other) 454/// See <see cref="ISet{T}"/> 456void ISet<T>.IntersectWith(IEnumerable<T> other) 462/// See <see cref="ISet{T}"/> 464void ISet<T>.SymmetricExceptWith(IEnumerable<T> other) 470/// See <see cref="ISet{T}"/> 472void ISet<T>.UnionWith(IEnumerable<T> other)
System\Collections\Immutable\ImmutableSortedSet_1.cs (10)
694/// See <see cref="ISet{T}"/> 696bool ISet<T>.Add(T item) 702/// See <see cref="ISet{T}"/> 704void ISet<T>.ExceptWith(IEnumerable<T> other) 710/// See <see cref="ISet{T}"/> 712void ISet<T>.IntersectWith(IEnumerable<T> other) 718/// See <see cref="ISet{T}"/> 720void ISet<T>.SymmetricExceptWith(IEnumerable<T> other) 726/// See <see cref="ISet{T}"/> 728void ISet<T>.UnionWith(IEnumerable<T> other)
System.Private.CoreLib (10)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (2)
74/// <returns>An object that acts as a read-only wrapper around the current <see cref="ISet{T}"/>.</returns> 76public static ReadOnlySet<T> AsReadOnly<T>(this ISet<T> set) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlySet.cs (8)
17private readonly ISet<T> _set; 21public ReadOnlySet(ISet<T> set) 31protected ISet<T> Set => _set; 81bool ISet<T>.Add(T item) => throw new NotSupportedException(); 84void ISet<T>.ExceptWith(IEnumerable<T> other) => throw new NotSupportedException(); 87void ISet<T>.IntersectWith(IEnumerable<T> other) => throw new NotSupportedException(); 90void ISet<T>.SymmetricExceptWith(IEnumerable<T> other) => throw new NotSupportedException(); 93void ISet<T>.UnionWith(IEnumerable<T> other) => throw new NotSupportedException();
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
90[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ISet<>))]
System.Text.Json (4)
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (1)
106else if ((actualTypeToConvert = typeToConvert.GetCompatibleGenericInterface(typeof(ISet<>))) != null)
System\Text\Json\Serialization\Converters\Collection\ISetOfTConverter.cs (1)
12where TCollection : ISet<TElement>
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (2)
197/// Creates serialization metadata for types assignable to <see cref="ISet{T}"/>. 208where TCollection : ISet<TElement>
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
52public INamedTypeSymbol? ISetOfTType => GetOrResolveType(typeof(ISet<>), ref _ISetOfTType);
System.Xaml (1)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Xaml\Parser\SpecialBracketCharacters.cs (1)
23private static readonly ISet<char> _restrictedCharSet = new SortedSet<char>((new char[] { '=', ',', '\'', '"', '{', '}', '\\' }));