118 references to HashSet
Aspire.Hosting.Sdk.Tests (2)
src\Aspire.AppHost.Sdk\Aspire.RuntimeIdentifier.Tool\NuGetUtils.cs (2)
32HashSet<string> availableRids = new(availableRuntimeIdentifiers, StringComparer.Ordinal); 33HashSet<string>? excludedRids = runtimeIdentifiersToExclude switch { null => null, _ => new HashSet<string>(runtimeIdentifiersToExclude, StringComparer.Ordinal) };
Aspire.RuntimeIdentifier.Tool (2)
NuGetUtils.cs (2)
32HashSet<string> availableRids = new(availableRuntimeIdentifiers, StringComparer.Ordinal); 33HashSet<string>? excludedRids = runtimeIdentifiersToExclude switch { null => null, _ => new HashSet<string>(runtimeIdentifiersToExclude, StringComparer.Ordinal) };
Crossgen2Tasks (2)
PrepareForReadyToRunCompilation.cs (2)
111var exclusionSet = ExcludeList == null || Crossgen2Composite ? null : new HashSet<string>(ExcludeList, StringComparer.OrdinalIgnoreCase); 112var compositeExclusionSet = PublishReadyToRunCompositeExclusions == null || !Crossgen2Composite ? null : new HashSet<string>(PublishReadyToRunCompositeExclusions, StringComparer.OrdinalIgnoreCase);
installer.tasks (1)
FileUtilities.cs (1)
14private static readonly HashSet<string> s_assemblyExtensions = new HashSet<string>(
Microsoft.Arcade.Test.Common (1)
AssertEx.cs (1)
244var expectedSet = new HashSet<T>(expected, comparer);
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
71var routeParameterNames = new HashSet<string>(routeUsage.RoutePattern.RouteParameters.Select(p => p.Name), StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\FormValueProvider.cs (1)
39_invariantValueKeys = new(invariantKeys, StringComparer.OrdinalIgnoreCase);
ModelBinding\JQueryFormValueProvider.cs (1)
32_invariantValueKeys = new(invariantKeys, StringComparer.OrdinalIgnoreCase);
ModelBinding\Validation\ValidationStack.cs (1)
40HashSet = new HashSet<object>(List, ReferenceEqualityComparer.Instance);
Microsoft.AspNetCore.Mvc.TagHelpers (1)
OptionTagHelper.cs (1)
93var allValues = new HashSet<string>(currentValues.Values, StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
TempDataDictionary.cs (1)
143_initialKeys = new HashSet<string>(_data.Keys, StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.ResponseCompression (2)
ResponseCompressionProvider.cs (2)
62_mimeTypes = new HashSet<string>(mimeTypes, StringComparer.OrdinalIgnoreCase); 64_excludedMimeTypes = new HashSet<string>(
Microsoft.AspNetCore.Routing (1)
DecisionTree\DecisionTreeBuilder.cs (1)
206CurrentCriteria = new HashSet<string>(other.CurrentCriteria, StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\CertificatePathWatcher.cs (2)
75var addSet = new HashSet<CertificateConfig>(certificateConfigsToAdd, ReferenceEqualityComparer.Instance); 76var removeSet = new HashSet<CertificateConfig>(certificateConfigsToRemove, ReferenceEqualityComparer.Instance);
Microsoft.AspNetCore.SpaServices.Extensions (3)
Proxying\SpaProxy.cs (3)
22private static readonly HashSet<string> NotForwardedHttpHeaders = new HashSet<string>( 29private static readonly HashSet<string> NotForwardedWebSocketHeaders = new HashSet<string>( 35private static readonly HashSet<string> InvalidH2H3Headers = new HashSet<string>(
Microsoft.Build (7)
BackEnd\BuildManager\BuildParameters.cs (4)
288_propertiesFromCommandLine = other._propertiesFromCommandLine != null ? new HashSet<string>(other._propertiesFromCommandLine, StringComparer.OrdinalIgnoreCase) : null; 311WarningsAsErrors = other.WarningsAsErrors == null ? null : new HashSet<string>(other.WarningsAsErrors, StringComparer.OrdinalIgnoreCase); 312WarningsNotAsErrors = other.WarningsNotAsErrors == null ? null : new HashSet<string>(other.WarningsNotAsErrors, StringComparer.OrdinalIgnoreCase); 313WarningsAsMessages = other.WarningsAsMessages == null ? null : new HashSet<string>(other.WarningsAsMessages, StringComparer.OrdinalIgnoreCase);
BackEnd\Components\Logging\LoggingService.cs (1)
764warningsByProject[key] = new HashSet<string>(codes, StringComparer.OrdinalIgnoreCase);
Evaluation\ProjectParser.cs (1)
41private static readonly HashSet<string> KnownAttributesOnItemIgnoreCase = new HashSet<string>(KnownAttributesOnItem, StringComparer.OrdinalIgnoreCase);
Modifiers.cs (1)
72private static readonly HashSet<string> s_tableOfItemSpecModifiers = new HashSet<string>(All, StringComparer.OrdinalIgnoreCase);
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
694var expectedSet = new HashSet<T>(expected, comparer);
Microsoft.Build.Framework (1)
BuildCheck\EnumerableExtensions.cs (1)
64return new HashSet<T>(source, equalityComparer);
Microsoft.Build.Tasks.Core (2)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigCache.cs (1)
48_filesInDirectories = new(assemblyFoldersFromConfig.AsParallel()
Modifiers.cs (1)
72private static readonly HashSet<string> s_tableOfItemSpecModifiers = new HashSet<string>(All, StringComparer.OrdinalIgnoreCase);
Microsoft.Build.Utilities.Core (1)
Modifiers.cs (1)
72private static readonly HashSet<string> s_tableOfItemSpecModifiers = new HashSet<string>(All, StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.CodeAnalysis.Collections.Package (3)
Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
199var notAnnotatedDiagnosticsSet = new HashSet<Diagnostic>(notAnnotatedDiagnostics.AsEnumerable(), SameDiagnosticComparer.Instance);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (10)
Utilities\BloomFilterTests.cs (10)
48var strings = new HashSet<string>(GenerateStrings(2000).Skip(500).Take(1000), comparer); 211new HashSet<string>(GenerateStrings(1_000), comparer), 212new HashSet<string>(GenerateStrings(1_000).Where((s, i) => i % 1 == 0), comparer), 213new HashSet<string>(GenerateStrings(1_000).Where((s, i) => i % 1 == 1), comparer), 214new HashSet<string>(GenerateStrings(10_000), comparer), 215new HashSet<string>(GenerateStrings(10_000).Where((s, i) => i % 1 == 0), comparer), 216new HashSet<string>(GenerateStrings(10_000).Where((s, i) => i % 1 == 1), comparer), 217new HashSet<string>(GenerateStrings(100_000), comparer), 218new HashSet<string>(GenerateStrings(100_000).Where((s, i) => i % 1 == 0), comparer), 219new HashSet<string>(GenerateStrings(100_000).Where((s, i) => i % 1 == 1), comparer),
Microsoft.CodeAnalysis.Features (1)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
213var set = new HashSet<Diagnostic>(diagnosticsA, DiagnosticComparer.Instance);
Microsoft.CodeAnalysis.InteractiveHost (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LoadedProject.cs (1)
244var newItems = new HashSet<T>(loadedCollection, comparer);
Microsoft.CodeAnalysis.Test.Utilities (4)
Assert\AssertEx.cs (1)
479var expectedSet = new HashSet<T>(expected, comparer);
Mocks\VirtualizedRelativePathResolver.cs (1)
22_existingFullPaths = new HashSet<string>(existingFullPaths, StringComparer.Ordinal);
TargetFrameworkUtil.cs (1)
349var nameSet = new HashSet<string>(getNames(references), StringComparer.OrdinalIgnoreCase);
TestableFileSystem.cs (1)
57var set = new HashSet<string>(existingPaths, comparer);
Microsoft.CodeAnalysis.Threading.Package (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.CodeAnalysis.UnitTests (4)
Collections\HashSet\ISet_Generic_Tests`1.cs (3)
135HashSet<T> expected = new HashSet<T>(set, GetIEqualityComparer()); 153HashSet<T> beforeOperation = new HashSet<T>(set, GetIEqualityComparer()); 297HashSet<T> expected = new HashSet<T>(set, comparer);
StrongNameProviderTests.cs (1)
93: base(searchPaths.NullToEmpty(), new VirtualStrongNameFileSystem(new HashSet<string>(existingFullPaths, StringComparer.OrdinalIgnoreCase)))
Microsoft.CodeAnalysis.Workspaces (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
167return new HashSet<T>(source, comparer);
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (2)
784var set1 = new HashSet<T>(array1, comparer); 785var set2 = new HashSet<T>(array2, comparer);
Microsoft.DotNet.ArcadeLogging (1)
PipelinesLogger.cs (1)
49_ignoredTargets = new HashSet<string>(ignoredTargets, StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.Build.Tasks.Packaging (3)
GetPackageDestination.cs (1)
76var suppressions = new HashSet<NuGetFramework>(
HarvestPackage.cs (1)
510_pathsToExclude = new HashSet<string>(PathsToExclude.NullAsEmpty().Select(NormalizePath), StringComparer.OrdinalIgnoreCase);
UpdatePackageIndex.cs (1)
97_packageIdsToInclude = new HashSet<string>(PackageIds.Select(i => i.ItemSpec), StringComparer.OrdinalIgnoreCase);
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\AssertEx.cs (1)
260var expectedSet = new HashSet<T>(expected, comparer);
Microsoft.DotNet.SharedFramework.Sdk (1)
src\FileUtilities.cs (1)
16private static readonly HashSet<string> s_assemblyExtensions = new HashSet<string>(
Microsoft.DotNet.SourceBuild.Tasks (1)
src\UsageReport\WritePackageUsageData.cs (1)
191var properties = new HashSet<string>(
Microsoft.DotNet.XliffTasks (1)
Model\XlfDocument.cs (1)
287return new HashSet<string>(untranslatedResourceIDs, StringComparer.Ordinal);
Microsoft.DotNet.XUnitAssert.Tests (1)
Utility\ReadOnlySet.cs (1)
13 hashSet = new HashSet<T>(items, comparer);
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
229HashSet<string> propertyNames = new(modelProperties.Select(mp => mp.Name),
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
HealthCheckRegistration.cs (2)
68Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase); 120Tags = new HashSet<string>(tags ?? Array.Empty<string>(), StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Http (1)
DependencyInjection\HttpClientBuilderExtensions.cs (1)
584var sensitiveHeaders = new HashSet<string>(redactedLoggedHeaderNames, StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\MediaTypeCollectionExtensionsTest.cs (2)
27var collection = new HashSet<string>(_readableContentTypes, StringComparer.OrdinalIgnoreCase).ToFrozenSet(StringComparer.OrdinalIgnoreCase); 44var collection = new HashSet<string>(_readableContentTypes, StringComparer.OrdinalIgnoreCase).ToFrozenSet(StringComparer.OrdinalIgnoreCase);
Microsoft.Maui.Controls.DesignTools (2)
ColorDesignTypeConverter.cs (1)
170 knowValuesSet = new HashSet<string>(knownValues, StringComparer.OrdinalIgnoreCase);
VisibilityDesignTypeConverter.cs (1)
10 private static readonly HashSet<string> supportedValues = new HashSet<string>(validValues, StringComparer.OrdinalIgnoreCase);
Microsoft.ML.AutoML (2)
AutoMLExperiment\ITrialResultManager.cs (1)
55_trialResultsHistory = new HashSet<TrialResult>(trialResults, new TrialResult());
Tuner\SmacTuner.cs (1)
211var retainedConfigs = new HashSet<Parameter>(orderedConfigurations.Select(x => x.Item2), comparer);
MSBuild (1)
Modifiers.cs (1)
72private static readonly HashSet<string> s_tableOfItemSpecModifiers = new HashSet<string>(All, StringComparer.OrdinalIgnoreCase);
MSBuildTaskHost (1)
Modifiers.cs (1)
72private static readonly HashSet<string> s_tableOfItemSpecModifiers = new HashSet<string>(All, StringComparer.OrdinalIgnoreCase);
PresentationBuildTasks (1)
MS\Internal\Tasks\IncrementalCompileAnalyzer.cs (1)
391HashSet<string> localMarkupPages = new HashSet<string>(_mcPass1.PageMarkup.Select(x => x.GetMetadata(SharedStrings.FullPath)), StringComparer.OrdinalIgnoreCase);
System.Collections.Immutable (4)
System\Collections\Frozen\FrozenSet.cs (1)
80newSet = new HashSet<T>(source, comparer);
System\Collections\Immutable\ImmutableHashSet_1.cs (3)
746var otherSet = new HashSet<T>(other, origin.EqualityComparer); 883var otherSet = new HashSet<T>(other, origin.EqualityComparer); 956var otherSet = new HashSet<T>(other, origin.EqualityComparer);
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (1)
154HashSet<string> buddyTypeMembers = new HashSet<string>(buddyFields.Concat(buddyProperties), StringComparer.Ordinal);
System.Linq (8)
System\Linq\Distinct.SpeedOpt.cs (3)
12public override TSource[] ToArray() => ICollectionToArray(new HashSet<TSource>(_source, _comparer)); 14public override List<TSource> ToList() => new List<TSource>(new HashSet<TSource>(_source, _comparer)); 16public override int GetCount(bool onlyIfCheap) => onlyIfCheap ? -1 : new HashSet<TSource>(_source, _comparer).Count;
System\Linq\Except.cs (2)
81var set = new HashSet<TSource>(second, comparer); 94var set = new HashSet<TKey>(second, comparer);
System\Linq\Intersect.cs (2)
78var set = new HashSet<TSource>(second, comparer); 91var set = new HashSet<TKey>(second, comparer);
System\Linq\ToCollection.cs (1)
257return new HashSet<TSource>(source, comparer);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
86public HashSet(IEnumerable<T> collection) : this(collection, null) { }
System.Security.Cryptography (1)
System\Security\Cryptography\X509Certificates\OpenSslCachedSystemStoreProvider.cs (1)
350var set = new HashSet<string>(directories, StringComparer.Ordinal);
System.ServiceModel.Syndication (1)
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
15private static readonly HashSet<string> s_acceptedDays = new HashSet<string>(
Text.Analyzers (2)
CodeAnalysisDictionary.cs (2)
53_recognizedWords = new HashSet<string>(recognizedWords, StringComparer.OrdinalIgnoreCase); 54_unrecognizedWords = new HashSet<string>(unrecognizedWords, StringComparer.OrdinalIgnoreCase);
xunit.assert (2)
Sdk\CollectionTracker.cs (2)
364 setX = new HashSet<T>(setX, itemComparer); 365 setY = new HashSet<T>(setY, itemComparer);