57 references to Contains
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
41if (!actualValues.Contains(expectedPair, comparer))
Aspire.Dashboard.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
41if (!actualValues.Contains(expectedPair, comparer))
Aspire.Hosting.Testing.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
41if (!actualValues.Contains(expectedPair, comparer))
Aspire.Hosting.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
41if (!actualValues.Contains(expectedPair, comparer))
Aspire.Playground.Tests (1)
tests\Shared\Logging\LogValuesAssert.cs (1)
41if (!actualValues.Contains(expectedPair, comparer))
dotnet-svcutil (2)
GlobalTool.cs (2)
20if (!arguments.Contains("--toolContext", StringComparer.InvariantCultureIgnoreCase) && !arguments.Contains("-tc", StringComparer.InvariantCultureIgnoreCase))
Microsoft.AspNetCore.Authorization (1)
ClaimsAuthorizationRequirement.cs (1)
72&& requirement.AllowedValues!.Contains(claim.Value, StringComparer.Ordinal))
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsPolicy.cs (1)
177return Origins.Contains(origin, StringComparer.Ordinal);
Microsoft.AspNetCore.HostFiltering (1)
MiddlewareConfigurationManager.cs (1)
75if (!results.Contains(host, StringSegmentComparer.OrdinalIgnoreCase))
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
395else if (!transport.TransferFormats!.Contains(transferFormatString, StringComparer.Ordinal))
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
90if (!allowedHosts.Contains(host, StringSegmentComparer.OrdinalIgnoreCase))
Microsoft.AspNetCore.InternalTesting (1)
Logging\LogValuesAssert.cs (1)
45if (!actualValues.Contains(expectedPair, comparer))
Microsoft.AspNetCore.Mvc.Core (2)
BindAttribute.cs (2)
70return Include.Contains(modelMetadata.ParameterName, StringComparer.Ordinal); 73return Include.Contains(modelMetadata.PropertyName, StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.TagHelpers (1)
TagHelperOutputExtensions.cs (1)
175if (arrayOfClasses.Contains(encodedClassValue, StringComparer.Ordinal))
Microsoft.AspNetCore.Routing (2)
Constraints\HttpMethodRouteConstraint.cs (2)
49return AllowedMethods.Contains(httpContext.Request.Method, StringComparer.OrdinalIgnoreCase); 70return AllowedMethods.Contains(Convert.ToString(obj, CultureInfo.InvariantCulture), StringComparer.OrdinalIgnoreCase);
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubProtocolResolver.cs (1)
36if (_availableProtocols.TryGetValue(protocolName, out var protocol) && (supportedProtocols == null || supportedProtocols.Contains(protocolName, StringComparer.OrdinalIgnoreCase)))
Microsoft.AspNetCore.WebSockets (2)
WebSocketMiddleware.cs (2)
43_anyOriginAllowed = _options.AllowedOrigins.Count == 0 || _options.AllowedOrigins.Contains("*", StringComparer.Ordinal); 73if (!_allowedOrigins.Contains(originHeader.ToString(), StringComparer.Ordinal))
Microsoft.Build (1)
Instance\ProjectInstance.cs (1)
832if (!itemFilter.Value.Contains(metadataName, StringComparer.OrdinalIgnoreCase))
Microsoft.CodeAnalysis (1)
Operations\ControlFlowGraphBuilder.cs (1)
8087Debug.Assert(properties.Contains(propertyReference.Property, SymbolEqualityComparer.IgnoreAll));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
138=> GenerateUniqueName(baseName, x => !names.Contains(x, comparer));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\InlineCompletions\XmlSnippetParser.CodeSnippet.cs (1)
60return _snippetTypes?.Contains(ExpansionSnippetType, StringComparer.OrdinalIgnoreCase) == true;
Microsoft.CodeAnalysis.UnitTests (19)
Collections\HashSet\ISet_Generic_Tests`1.cs (16)
60while (set.Contains(toAdd) || (InvalidValues != Array.Empty<T>() && InvalidValues.Contains(toAdd, GetIEqualityComparer()))) 162if (enumerable.Contains(value, comparer)) 177if (!enumerable.Contains(value, comparer)) 185if (!set.Contains(value, comparer)) 201if (!set.Contains(value, comparer)) 209if (!enumerable.Contains(value, comparer)) 223if (!enumerable.Contains(value, comparer)) 235if (!set.Contains(value, comparer)) 248if (set.Contains(value, comparer)) 262if (!enumerable.Contains(value, comparer)) 270if (!set.Contains(value, comparer)) 284if (!set.Contains(element, comparer)) 287if (!enumerable.Contains(element, comparer)) 299if (!set.Contains(element, comparer)) 655if (!set.Contains(element, comparer)) 658if (!enumerable.Contains(element, comparer))
Collections\List\ICollection.Generic.Tests.cs (2)
62while (collection.Contains(toAdd, comparer) || InvalidValues.Contains(toAdd, comparer))
Collections\List\TestBase.Generic.cs (1)
292while (set.Contains(toAdd) || (match != null && match.Contains(toAdd, GetIEqualityComparer()))) // Don't want any unexpectedly duplicate values
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (1)
138=> GenerateUniqueName(baseName, x => !names.Contains(x, comparer));
Microsoft.DotNet.Build.Tasks.Packaging (1)
HarvestPackage.cs (1)
605return extension != null && extension.Length > 0 && s_includedExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase);
Microsoft.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
115if (options.AllowAllSchemes || options.AllowedSchemes.Contains(scheme, StringComparer.OrdinalIgnoreCase))
Microsoft.Gen.Logging (3)
Parsing\Parser.cs (3)
160bool parameterInTemplate = lm.Templates.Contains(lp.TagName, StringComparer.OrdinalIgnoreCase) || 161lm.Templates.Contains(lp.ParameterNameWithAtIfNeeded, StringComparer.OrdinalIgnoreCase) || 162lm.Templates.Contains($"@{lp.ParameterName}", StringComparer.OrdinalIgnoreCase);
Microsoft.VisualStudio.LanguageServices (1)
GenerateType\GenerateTypeDialogViewModel.cs (1)
368if (this.FullFilePath.Split(new[] { '\\' }, StringSplitOptions.RemoveEmptyEntries).Any(s => _reservedKeywords.Contains(s, StringComparer.OrdinalIgnoreCase)))
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (3)
196if (reservedMetadataNames.Contains(partMetadata.Name, StringComparers.MetadataKeyNames) 267if (reservedMetadataNames.Contains(provider.Name, StringComparers.MetadataKeyNames)) 301if (reservedMetadataNames.Contains(pi.Name, StringComparers.MetadataKeyNames))
System.Linq (1)
System\Linq\Contains.cs (1)
12Contains(source, value, null);
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
134if (type.AllInterfaces.Contains(baseType, SymbolEqualityComparer.Default))
xunit.assert (1)
CollectionAsserts.cs (1)
281 if (!tracker.Contains(expected, comparer))