1873 references to Any
aspire (38)
Backchannel\AppHostCliBackchannel.cs (1)
284if (!capabilities.Any(s => s == BaselineCapability))
Backchannel\ExtensionBackchannel.cs (1)
223if (!capabilities.Any(s => s == KnownCapabilities.Baseline))
Certificates\CertificateGeneration\CertificateManager.cs (2)
210.Any(e => string.Equals(oid, e.Oid?.Value, StringComparison.Ordinal)); 960if (!request.CertificateExtensions.Any(ext => ext.Oid?.Value is SubjectKeyIdentifierOid or AuthorityKeyIdentifierOid))
Certificates\CertificateGeneration\MacOSCertificateManager.cs (1)
301return hashes.Any(h => string.Equals(h, certificate.Thumbprint, StringComparison.Ordinal));
Certificates\CertificateGeneration\UnixCertificateManager.cs (1)
371var isCertDirIncluded = existingDirs.Any(dir =>
Certificates\CertificateGeneration\WindowsCertificateManager.cs (1)
124.Any(c => AreCertificatesEqual(c, certificate));
Certificates\CertificateService.cs (1)
114if (paths.Any(p => string.Equals(p.TrimEnd(Path.DirectorySeparatorChar), devCertsTrustPath.TrimEnd(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase)))
Commands\AddCommand.cs (1)
301if (packageVersions.Any(p => p.Package.Version == preferredVersion))
Commands\DescribeCommand.cs (1)
221if (!resolved.Any(r => string.Equals(r.Name, snapshot.Name, StringComparison.OrdinalIgnoreCase)))
Commands\DoctorCommand.cs (1)
62var hasFailures = results.Any(r => r.Status == EnvironmentCheckStatus.Fail);
Commands\PipelineCommandBase.cs (1)
756var hasValidationErrors = inputs.Any(input => input.ValidationErrors is { Count: > 0 });
Commands\UpdateCommand.cs (1)
464return paths.Any(p =>
Mcp\Docs\DocsIndexService.cs (2)
339var hasChangelogToken = queryTokens.Any(static t => t is "changelog" or "whats-new"); 375var hasHyphenatedToken = queryTokens.Any(static t => t.Contains('-'));
Packaging\NuGetConfigMerger.cs (3)
499var hasWildcardMapping = context.Mappings.Any(m => m.PackageFilter == "*"); 582.Where(ps => ps.Elements("package").Any() && !ps.Elements("package").Any(p => (string?)p.Attribute("pattern") == "*")) 708var isUsedByExistingKey = urlToExistingKey.Any(kvp =>
Program.cs (5)
101debugMode = args.Any(a => a == "--debug" || a == "-d"); 246var nonInteractive = args?.Any(a => a == CommonOptionNames.NonInteractive) ?? false; 568var isInformationalCommand = args.Any(a => CommonOptionNames.InformationalOptionNames.Contains(a)); 569var noLogo = args.Any(a => a == CommonOptionNames.NoLogo) || configuration.GetBool(CliConfigNames.NoLogo, defaultValue: false) || isInformationalCommand; 570var showBanner = args.Any(a => a == CommonOptionNames.Banner);
Projects\DefaultLanguageDiscovery.cs (1)
136l.DetectionPatterns.Any(p => MatchesPattern(file.Name, p)));
Projects\DotNetAppHostProject.cs (1)
195.Any(f => f.Name.Equals("AppHost.cs", StringComparison.OrdinalIgnoreCase));
Projects\GuestAppHostProject.cs (3)
132return _resolvedLanguage.DetectionPatterns.Any(p => 324if (!patterns.Any(p => appHostFile.Name.Equals(p, StringComparison.OrdinalIgnoreCase))) 1258if (integrations.Any(i => i.IsProjectReference))
Projects\GuestRuntime.cs (1)
195if (additionalArgs is { Length: > 0 } && !args.Any(a => a.Contains("{args}")))
Projects\ProjectUpdater.cs (3)
926changes.AddedFeeds = proposedSources.Where(p => !originalSources.Any(o => o.Key == p.Key)).ToList(); 927changes.RemovedFeeds = originalSources.Where(o => !proposedSources.Any(p => p.Key == o.Key)).ToList(); 928changes.RetainedFeeds = originalSources.Where(o => proposedSources.Any(p => p.Key == o.Key)).ToList();
src\Shared\ConsoleLogs\SharedAIHelpers.cs (1)
269var hasError = trace.Spans.Any(s => s.Span.Status?.Code == 2);
src\Shared\LocaleHelpers.cs (1)
49.Any(c => string.Equals(c.Name, cultureName, StringComparison.OrdinalIgnoreCase));
src\Shared\PathLookupHelper.cs (1)
40if (pathExtensions is not null && pathExtensions.Any(ext => command.EndsWith(ext, StringComparison.OrdinalIgnoreCase)))
src\Shared\X509Certificate2Extensions.cs (1)
117return certificate.Extensions.OfType<X509SubjectKeyIdentifierExtension>().Any(ski => !string.IsNullOrEmpty(ski.SubjectKeyIdentifier));
Telemetry\TelemetryManager.cs (1)
43var hasOptOutArg = args?.Any(a => CommonOptionNames.InformationalOptionNames.Contains(a)) ?? false;
Templating\CliTemplateFactory.EmptyTemplate.cs (1)
111var localhostTldOptionSpecified = parseResult.Tokens.Any(token =>
Aspire.Azure.AI.Inference.Tests (1)
artifacts\obj\Aspire.Azure.AI.Inference.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.AI.OpenAI.Tests (1)
artifacts\obj\Aspire.Azure.AI.OpenAI.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Data.Tables.Tests (1)
artifacts\obj\Aspire.Azure.Data.Tables.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Messaging.EventHubs (1)
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Azure.Messaging.EventHubs.Tests (1)
artifacts\obj\Aspire.Azure.Messaging.EventHubs.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Messaging.ServiceBus (1)
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Azure.Messaging.ServiceBus.Tests (1)
artifacts\obj\Aspire.Azure.Messaging.ServiceBus.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Messaging.WebPubSub (1)
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Azure.Messaging.WebPubSub.Tests (1)
artifacts\obj\Aspire.Azure.Messaging.WebPubSub.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
artifacts\obj\Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Npgsql.Tests (1)
artifacts\obj\Aspire.Azure.Npgsql.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Search.Documents.Tests (1)
artifacts\obj\Aspire.Azure.Search.Documents.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Security.KeyVault.Tests (1)
artifacts\obj\Aspire.Azure.Security.KeyVault.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Storage.Blobs.Tests (1)
artifacts\obj\Aspire.Azure.Storage.Blobs.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Storage.Files.DataLake.Tests (1)
artifacts\obj\Aspire.Azure.Storage.Files.DataLake.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Azure.Storage.Queues (1)
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Azure.Storage.Queues.Tests (1)
artifacts\obj\Aspire.Azure.Storage.Queues.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Cli.EndToEnd.Tests (1)
artifacts\obj\Aspire.Cli.EndToEnd.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Cli.Tests (7)
artifacts\obj\Aspire.Cli.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Commands\ConfigCommandTests.cs (1)
436var hasDeployCommand = rootCommand.Subcommands.Any(cmd => cmd.Name == "deploy");
Commands\PublishCommandTests.cs (1)
191if (args.Any(a => a == "inspect"))
Commands\RootCommandTests.cs (2)
399var hasSetupCommand = command.Subcommands.Any(cmd => cmd.Name == "setup"); 415var hasSetupCommand = command.Subcommands.Any(cmd => cmd.Name == "setup");
TestServices\TestLanguageDiscovery.cs (2)
51if (directory.EnumerateFiles().Any(f => f.Name.EndsWith(extension, StringComparison.OrdinalIgnoreCase))) 78l.DetectionPatterns.Any(p => MatchesPattern(file.Name, p)));
Aspire.Confluent.Kafka.Tests (1)
artifacts\obj\Aspire.Confluent.Kafka.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Dashboard (39)
Api\TelemetryApiService.cs (6)
136traces = traces.Where(t => t.Spans.Any(s => s.Status == OtlpSpanStatusCode.Error)).ToList(); 140traces = traces.Where(t => !t.Spans.Any(s => s.Status == OtlpSpanStatusCode.Error)).ToList(); 302if (resourceKeys is { Count: > 0 } && !resourceKeys.Any(k => k is null) && 303!resourceKeys.Any(k => k?.EqualsCompositeName(span.Source.ResourceKey.GetCompositeName()) == true)) 380if (resourceKeys is { Count: > 0 } && !resourceKeys.Any(k => k is null) && 381!resourceKeys.Any(k => k?.EqualsCompositeName(log.ResourceView.ResourceKey.GetCompositeName()) == true))
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (1)
25if (!Options.RequiredConnectionTypes.Any(connectionTypeFeature.ConnectionTypes.Contains))
Components\Controls\AspireMenuButton.razor.cs (1)
63_disabled = !_items.Any(i => !i.IsDivider);
Components\Controls\Chart\ChartContainer.razor.cs (1)
265: item.Values.Where(newValue => existing.SelectedValues.Any(existingValue => existingValue.Value == newValue.Value));
Components\Controls\ResourceDetails.razor.cs (1)
70private bool IsSpecOnlyToggleDisabled => !Resource.Environment.All(i => !i.FromSpec) && !GetResourceProperties(ordered: false).Any(static vm => vm.KnownProperty is null);
Components\Pages\Metrics.razor.cs (2)
225if (PageViewModel.SelectedMeter != null && !instruments.Any(i => i.Parent.Name == PageViewModel.SelectedMeter)) 229if (PageViewModel.SelectedInstrument != null && !instruments.Any(i => i.Name == PageViewModel.SelectedInstrument.Name))
Components\Pages\Resources.razor.cs (5)
220.Any(r => r.KnownState != KnownResourceState.Running || r.HealthStatus is HealthStatus.Unhealthy or HealthStatus.Degraded); 557return _resourceByName.Any(r => !r.Value.IsResourceHidden(_showHiddenResources) && _collapsedResourceNames.Contains(r.Value.PersistentKey)); 832.Where(r => _resourceByName.Values.Any(nested => nested.GetResourcePropertyValue(KnownProperties.Resource.ParentName) == r.Name)) 870return _resourceByName.Values.Any(r => !string.IsNullOrEmpty(r.GetResourcePropertyValue(KnownProperties.Resource.ParentName))); 877return HasAnyChildResources() || _resourceByName.Values.Any(r => r.IsResourceHidden(showHiddenResources: false));
Components\Pages\TraceDetail.razor.cs (3)
378else if (SelectedData?.LogEntryViewModel is { } selectedLog && viewModel.SpanLogs.Any(l => l.LogEntry.InternalId == selectedLog.LogEntry.InternalId)) 460return _spanWaterfallViewModels.Any(vm => vm.IsCollapsed); 471return _spanWaterfallViewModels.Any(vm => vm.Depth > RootSpanDepth && !vm.IsCollapsed && vm.Children.Count > 0);
Components\Pages\Traces.razor.cs (1)
260if (entry.Spans.Any(span => span.Status == OtlpSpanStatusCode.Error))
DashboardWebApplication.cs (1)
616addressEndpoints.Any(m => m.RequireCertificate));
Mcp\AspireTelemetryMcpTools.cs (3)
70logs = logs.Where(l => !optOutResources.Any(r => l.ResourceView.ResourceKey.EqualsCompositeName(r.Name))).ToList(); 121traces = traces.Where(t => !optOutResources.Any(r => t.Spans.Any(s => s.Source.ResourceKey.EqualsCompositeName(r.Name)))).ToList();
Model\CommonMenuItems.cs (1)
22var areResourcesHidden = resources.Any(r => r.IsResourceHidden(false));
Model\GenAI\GenAIItemViewModel.cs (3)
40if (ItemParts.Any(p => p.MessagePart?.Type is MessagePart.ToolCallType or MessagePart.ServerToolCallType)) 49if (ItemParts.Any(p => p.MessagePart?.Type is MessagePart.ToolCallType or MessagePart.ServerToolCallType)) 53if (ItemParts.Any(p => p.MessagePart?.Type is MessagePart.ToolCallResponseType or MessagePart.ServerToolCallResponseType))
Model\ResourceDetailRelationshipViewModel.cs (1)
15Types.Any(t => t.Contains(filter, StringComparison.CurrentCultureIgnoreCase));
Model\ResourceGridViewModel.cs (1)
82return initialGridVMs.Any(r => r.Resource.Name == parentName);
Model\StructuredLogsViewModel.cs (1)
124_currentDataHasErrors = logs.Items.Any(i => i.Severity >= Microsoft.Extensions.Logging.LogLevel.Error);
Model\TelemetryExportService.cs (1)
62var hasResourceDetailsSelected = selectedResources.Any(kvp => kvp.Value.Contains(AspireDataType.ResourceDetails));
Model\TracesViewModel.cs (2)
97_currentDataHasErrors = result.PagedResult.Items.Any(t => t.Spans.Any(s => s.Status == OtlpSpanStatusCode.Error));
Otlp\Storage\TelemetryRepository.cs (1)
382if (!_logSubscriptions.Any(s => s.SubscriptionType == SubscriptionType.Read && (s.ResourceKey == resourceView.ResourceKey || s.ResourceKey == null)))
src\Shared\ConsoleLogs\SharedAIHelpers.cs (1)
269var hasError = trace.Spans.Any(s => s.Span.Status?.Code == 2);
src\Shared\LocaleHelpers.cs (1)
49.Any(c => string.Equals(c.Name, cultureName, StringComparison.OrdinalIgnoreCase));
Utils\GlobalizationHelpers.cs (1)
76if (!allCultures.Any(c => c.Name == "zh-CN"))
Aspire.Dashboard.Components.Tests (2)
artifacts\obj\Aspire.Dashboard.Components.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Pages\TraceDetailsTests.cs (1)
314return testSink.Writes.Any(w => w.Message?.Contains($"Trace '{traceId}' is unchanged.") ?? false);
Aspire.Dashboard.Tests (2)
artifacts\obj\Aspire.Dashboard.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Telemetry\DashboardTelemetryServiceTests.cs (1)
158Assert.False(testSink.Writes.Any(w => w.LogLevel >= LogLevel.Warning), "Test ran without any warnings or errors logged.");
Aspire.Deployment.EndToEnd.Tests (1)
artifacts\obj\Aspire.Deployment.EndToEnd.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.EndToEnd.Tests (1)
artifacts\obj\Aspire.EndToEnd.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting (35)
ApplicationModel\EndpointAnnotation.cs (1)
306if (_snapshots.Any(s => s.NetworkID.Equals(networkID)))
ApplicationModel\ProjectResource.cs (1)
122.Any(f => !f(endpoint));
ApplicationModel\ResourceExtensions.cs (1)
72return resource.Annotations.Any(a => a is T);
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
238if (appModel is not null && !appModel.Resources.Any(r => string.Equals(r.Name, request.ResourceName, StringComparisons.ResourceName)))
Dashboard\DashboardEventHandlers.cs (1)
452var hasHttpsEndpoint = dashboardResource.TryGetAnnotationsOfType<EndpointAnnotation>(out var endpoints) && endpoints.Any(e => e.UriScheme is "https");
Dashboard\DashboardService.cs (1)
130var updateStateOnChange = updateStateOnChangeInputs.Any(i => string.Equals(i, input.Name, StringComparisons.InteractionInputName));
Dashboard\DashboardServiceData.cs (1)
223(dynamic.DependsOnInputs?.Any(d => string.Equals(modelInput.Name, d, StringComparisons.InteractionInputName)) ?? false));
Dcp\DcpExecutor.cs (5)
1155if (containerResources.Any(cr => cr.GetContainerLifetimeType() == ContainerLifetime.Persistent)) 1259if (containers.Any(c => c.TryGetAnnotationsOfType<OtlpExporterAnnotation>(out _))) 3099if (dependencies.Any(dep => AsHostResourceWithEndpoints(dep) is { })) 3121.Where(ar => ar.DcpResource is ContainerExec ce && regular.Any(td => td.DcpResource is Container c && c.Metadata.Name == ce.Spec.ContainerName)), 3123.Where(ar => ar.DcpResource is ContainerExec ce && tunnelDependent.Any(td => td.DcpResource is Container c && c.Metadata.Name == ce.Spec.ContainerName))
Dcp\DcpHost.cs (3)
94if (!_applicationModel.Resources.Any(c => c.IsContainer())) 145if (!_applicationModel.Resources.Any(ResourceUsesTls)) 555if (resource.Annotations.OfType<EndpointAnnotation>().Any(e => e.UriScheme is "https"))
Dcp\ResourceSnapshotBuilder.cs (3)
268&& e.Value.Metadata.OwnerReferences?.Any(or => or.Kind == resource.Kind && or.Name == name) == true) 299var isActive = _resourceState.EndpointsMap.Any(e => e.Value.Spec.ServiceName == endpointOwnerEndpoint?.Metadata.Name); 347var isFromSpec = specSource?.Any(e => string.Equals(e.Name, env.Name, StringComparison.Ordinal)) is true or null;
DeveloperCertificateService.cs (4)
43if (validCerts.Any(c => c.HasSubjectKeyIdentifier())) 86!rootCerts.Any(rc => rc.RawDataMemory.Span.SequenceEqual(cert.RawDataMemory.Span))) 138var containerTrustAvailable = Certificates.Any(c => c.GetCertificateVersion() >= X509Certificate2Extensions.MinimumCertificateVersionSupportingContainerTrust); 145var supportsTlsTermination = Certificates.Any(c => c.HasPrivateKey);
DistributedApplicationBuilder.cs (1)
725return options.Args?.Any(arg => arg == "--command") ?? false;
InteractionService.cs (2)
183if (input.Options == null || !input.Options.Any(o => o.Key == input.Value)) 409if (options != null && !options.Any(o => o.Key == value))
Orchestrator\ParameterProcessor.cs (1)
147if (executionContext.IsRunMode && interactionService.IsAvailable && !parameterResource.Annotations.OfType<ResourceCommandAnnotation>().Any(a => a.Name == KnownResourceCommands.SetParameterCommand))
Pipelines\DistributedApplicationPipeline.cs (3)
276if (_steps.Any(s => s.Name == name)) 345if (_steps.Any(s => s.Name == step.Name)) 980!allSteps.Any(other => other.DependsOnSteps.Contains(step.Name)))
Pipelines\PipelineActivityReporter.cs (1)
336UpdateStateOnChange = updateStateOnChangeInputs.Any(i => string.Equals(i, input.Name, StringComparisons.InteractionInputName)),
ResourceBuilderExtensions.cs (2)
1108if (builder.Resource.Annotations.OfType<EndpointAnnotation>().Any(sb => string.Equals(sb.Name, annotation.Name, StringComparisons.EndpointAnnotationName))) 1992if (builder.Resource.TryGetAnnotationsOfType<HealthCheckAnnotation>(out var annotations) && annotations.Any(a => a.Key == key))
src\Shared\LocaleHelpers.cs (1)
49.Any(c => string.Equals(c.Name, cultureName, StringComparison.OrdinalIgnoreCase));
src\Shared\PathLookupHelper.cs (1)
40if (pathExtensions is not null && pathExtensions.Any(ext => command.EndsWith(ext, StringComparison.OrdinalIgnoreCase)))
src\Shared\X509Certificate2Extensions.cs (1)
117return certificate.Extensions.OfType<X509SubjectKeyIdentifierExtension>().Any(ski => !string.IsNullOrEmpty(ski.SubjectKeyIdentifier));
Aspire.Hosting.Analyzers.Tests (1)
artifacts\obj\Aspire.Hosting.Analyzers.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Azure (1)
src\Shared\PathLookupHelper.cs (1)
40if (pathExtensions is not null && pathExtensions.Any(ext => command.EndsWith(ext, StringComparison.OrdinalIgnoreCase)))
Aspire.Hosting.Azure.AppContainers (5)
AzureContainerAppResource.cs (1)
52if (targetResource.TryGetEndpoints(out var endpoints) && endpoints.Any(e => e.IsExternal))
ContainerAppContext.cs (4)
165External = g.Any(x => x.resolved.Endpoint.IsExternal), 167AnyH2 = g.Any(x => x.resolved.Endpoint.Transport is "http2"), 182if (endpointsByTargetPort.Any(g => g.External && !g.IsHttpOnly)) 191if (endpointsByTargetPort.Any(g => !Compatible(g.UniqueTransports)))
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryExtensions.cs (1)
213if (allTasks.Any(t => string.Equals(t.Name.Value, taskName, StringComparison.Ordinal)))
Aspire.Hosting.Azure.CosmosDB (4)
AzureCosmosDBContainerResource.cs (2)
37if (partitionKeyPaths.Any(string.IsNullOrEmpty)) 97if (value.Any(string.IsNullOrEmpty))
AzureCosmosDBExtensions.cs (1)
376if (partitionKeyPathsArray.Any(string.IsNullOrEmpty))
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Hosting.Azure.Kusto.Tests (1)
artifacts\obj\Aspire.Hosting.Azure.Kusto.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Azure.Network (2)
AzureNetworkSecurityGroupExtensions.cs (1)
96if (builder.Resource.SecurityRules.Any(existing => string.Equals(existing.Name, rule.Name, StringComparison.OrdinalIgnoreCase)))
AzureVirtualNetworkExtensions.cs (1)
537while (nsgResource.SecurityRules.Any(r => r.Name == candidateName))
Aspire.Hosting.Azure.Tests (1)
artifacts\obj\Aspire.Hosting.Azure.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.CodeGeneration.Go.Tests (2)
artifacts\obj\Aspire.Hosting.CodeGeneration.Go.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
AtsGoCodeGeneratorTests.cs (1)
201.Any(i => i.TypeId.Contains("IResourceWithEnvironment"));
Aspire.Hosting.CodeGeneration.Java.Tests (2)
artifacts\obj\Aspire.Hosting.CodeGeneration.Java.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
AtsJavaCodeGeneratorTests.cs (1)
200.Any(i => i.TypeId.Contains("IResourceWithEnvironment"));
Aspire.Hosting.CodeGeneration.Python.Tests (2)
artifacts\obj\Aspire.Hosting.CodeGeneration.Python.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
AtsPythonCodeGeneratorTests.cs (1)
201.Any(i => i.TypeId.Contains("IResourceWithEnvironment"));
Aspire.Hosting.CodeGeneration.Rust.Tests (2)
artifacts\obj\Aspire.Hosting.CodeGeneration.Rust.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
AtsRustCodeGeneratorTests.cs (1)
201.Any(i => i.TypeId.Contains("IResourceWithEnvironment"));
Aspire.Hosting.CodeGeneration.TypeScript (1)
AtsTypeScriptCodeGenerator.cs (1)
2836return model.Capabilities.Any(c =>
Aspire.Hosting.CodeGeneration.TypeScript.Tests (3)
artifacts\obj\Aspire.Hosting.CodeGeneration.TypeScript.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
AtsTypeScriptCodeGeneratorTests.cs (2)
390c.ExpandedTargetTypes.Any(t => t.TypeId.Contains("ContainerResource"))) 802.Any(i => i.TypeId.Contains("IResourceWithEnvironment"));
Aspire.Hosting.Containers.Tests (1)
artifacts\obj\Aspire.Hosting.Containers.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.DevTunnels (5)
DevTunnelCli.cs (1)
321var needsQuotes = a.Any(char.IsWhiteSpace) || a.Contains('"');
IDevTunnelClient.cs (4)
72static bool HasConnectScope(AccessControlEntry entry) => entry.Scopes is { } scopes && scopes.Any(s => string.Equals(s, ConnectScope, StringComparison.OrdinalIgnoreCase)); 76var portHasInheritedAnonymousAllow = entries.Any(e => string.Equals(e.Type, AnonymousType, StringComparison.OrdinalIgnoreCase) 80var portHasExplicitAnonymousAllow = entries.Any(e => string.Equals(e.Type, AnonymousType, StringComparison.OrdinalIgnoreCase) 84var portHasExplicitAnonymousDeny = entries.Any(e => string.Equals(e.Type, AnonymousType, StringComparison.OrdinalIgnoreCase)
Aspire.Hosting.DevTunnels.Tests (1)
artifacts\obj\Aspire.Hosting.DevTunnels.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Docker.Tests (1)
artifacts\obj\Aspire.Hosting.Docker.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.DotnetTool.Tests (1)
artifacts\obj\Aspire.Hosting.DotnetTool.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Foundry (1)
LocalModelHealthCheck.cs (1)
20if (!loadedModels.Any(lm => lm.ModelId.Equals(modelId, StringComparison.InvariantCultureIgnoreCase)))
Aspire.Hosting.Foundry.Tests (1)
artifacts\obj\Aspire.Hosting.Foundry.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Garnet.Tests (1)
artifacts\obj\Aspire.Hosting.Garnet.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.GitHub.Models.Tests (1)
artifacts\obj\Aspire.Hosting.GitHub.Models.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.JavaScript.Tests (1)
artifacts\obj\Aspire.Hosting.JavaScript.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Kafka.Tests (1)
artifacts\obj\Aspire.Hosting.Kafka.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Keycloak.Tests (1)
artifacts\obj\Aspire.Hosting.Keycloak.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Kubernetes.Tests (1)
artifacts\obj\Aspire.Hosting.Kubernetes.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Maui.Tests (1)
artifacts\obj\Aspire.Hosting.Maui.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Milvus.Tests (1)
artifacts\obj\Aspire.Hosting.Milvus.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.MongoDB.Tests (1)
artifacts\obj\Aspire.Hosting.MongoDB.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.MySql.Tests (1)
artifacts\obj\Aspire.Hosting.MySql.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Nats.Tests (1)
artifacts\obj\Aspire.Hosting.Nats.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.OpenAI.Tests (1)
artifacts\obj\Aspire.Hosting.OpenAI.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Oracle.Tests (1)
artifacts\obj\Aspire.Hosting.Oracle.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.PostgreSQL.Tests (1)
artifacts\obj\Aspire.Hosting.PostgreSQL.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Python.Tests (3)
AddPythonAppTests.cs (2)
2125.Any(w => w.Resource == venvCreatorResource); 2225.Any(w => w.Resource == venvCreatorResource);
artifacts\obj\Aspire.Hosting.Python.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Qdrant.Tests (1)
artifacts\obj\Aspire.Hosting.Qdrant.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.RabbitMQ.Tests (1)
artifacts\obj\Aspire.Hosting.RabbitMQ.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Redis.Tests (1)
artifacts\obj\Aspire.Hosting.Redis.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.RemoteHost (2)
Ats\AtsCallbackProxyFactory.cs (1)
309return parameters.Any(p =>
AtsCapabilityScanner.cs (1)
434if (typeInfos.Any(t => t.AtsTypeId == typeId))
Aspire.Hosting.RemoteHost.Tests (1)
artifacts\obj\Aspire.Hosting.RemoteHost.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Sdk.Tests (1)
artifacts\obj\Aspire.Hosting.Sdk.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Seq.Tests (1)
artifacts\obj\Aspire.Hosting.Seq.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.SqlServer.Tests (1)
artifacts\obj\Aspire.Hosting.SqlServer.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Testing.Tests (2)
artifacts\obj\Aspire.Hosting.Testing.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
52return app.WaitForTextAsync((log) => logTexts.Any(x => log.Contains(x)), resourceName, cancellationToken);
Aspire.Hosting.Tests (13)
artifacts\obj\Aspire.Hosting.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Backchannel\AuxiliaryBackchannelTests.cs (1)
598var hasDebugLog = logs.Any(l =>
Backchannel\BackchannelContractTests.cs (1)
100.Any(m => m.FullName == "System.Runtime.CompilerServices.IsExternalInit");
Backchannel\Exec\ExecTestsBase.cs (1)
56var logFound = logs.Any(x => x.Text.Contains(expectedMessage));
Codespaces\CodespacesUrlRewriterTests.cs (1)
42urlRewriterStopped = logs.Any(l => l.Message.Contains("Not running in Codespaces, skipping URL rewriting."));
Health\ResourceHealthCheckServiceTests.cs (2)
238return testSink.Writes.Any(w => w.Message?.Contains($"Resource 'resource' health check monitoring loop starting delay of {rhcs.HealthyHealthCheckInterval}.") ?? false); 280return testSink.Writes.Any(w => w.Message?.Contains($"Resource 'resource' health check monitoring loop starting delay of {(rhcs.NonHealthyHealthCheckStepInterval * i)}.") ?? false);
Pipelines\DistributedApplicationPipelineTests.cs (1)
1714allStepsAvailable = configContext.Steps.Any(s => s.Name == "resource1-step");
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Utils\LoggerNotificationExtensions.cs (1)
52return app.WaitForTextAsync((log) => logTexts.Any(x => log.Contains(x)), resourceName, cancellationToken);
Utils\PasswordGeneratorTests.cs (1)
66Assert.True(!password.Any(excludes.Contains));
WithUrlsTests.cs (2)
513var endpointsAllocated = urlSnapshots.FirstOrDefault(s => s.Length == 2 && s.Any(u => u.IsInactive)); 631var endpointsAllocated = urlSnapshots.FirstOrDefault(s => s.Length == 2 && s.Any(u => u.IsInactive));
Aspire.Hosting.Valkey.Tests (1)
artifacts\obj\Aspire.Hosting.Valkey.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Hosting.Yarp (2)
ConfigurationBuilder\YarpCluster.cs (2)
79var hasHttpsEndpoint = endpoints.Any(e => e.Exists && e.IsHttps); 80var hasHttpEndpoint = endpoints.Any(e => e.Exists && e.IsHttp);
Aspire.Hosting.Yarp.Tests (1)
artifacts\obj\Aspire.Hosting.Yarp.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Keycloak.Authentication.Tests (1)
artifacts\obj\Aspire.Keycloak.Authentication.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Microsoft.Azure.Cosmos (1)
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Microsoft.Azure.Cosmos.Tests (1)
artifacts\obj\Aspire.Microsoft.Azure.Cosmos.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Microsoft.Azure.StackExchangeRedis (1)
AspireMicrosoftAzureStackExchangeRedisExtensions.cs (1)
40if (configurationOptions.EndPoints.Any(ep => azureOptionsProvider.IsMatch(ep) || azureManagedOptionsProvider.IsMatch(ep)))
Aspire.Microsoft.Azure.StackExchangeRedis.Tests (1)
artifacts\obj\Aspire.Microsoft.Azure.StackExchangeRedis.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Microsoft.Data.SqlClient.Tests (1)
artifacts\obj\Aspire.Microsoft.Data.SqlClient.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
src\Shared\StableConnectionStringBuilder.cs (1)
200else if (segments.Any(s => s.Key != null && KeyEquals(s.Key, key)))
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (1)
artifacts\obj\Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (1)
artifacts\obj\Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Milvus.Client.Tests (1)
artifacts\obj\Aspire.Milvus.Client.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.MongoDB.Driver.Tests (1)
artifacts\obj\Aspire.MongoDB.Driver.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.MongoDB.Driver.v2.Tests (1)
artifacts\obj\Aspire.MongoDB.Driver.v2.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.MongoDB.EntityFrameworkCore.Tests (1)
artifacts\obj\Aspire.MongoDB.EntityFrameworkCore.Tests\Debug\net9.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.MySqlConnector.Tests (1)
artifacts\obj\Aspire.MySqlConnector.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.NATS.Net.Tests (1)
artifacts\obj\Aspire.NATS.Net.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (1)
artifacts\obj\Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Npgsql.Tests (1)
artifacts\obj\Aspire.Npgsql.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.OpenAI.Tests (1)
artifacts\obj\Aspire.OpenAI.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Oracle.EntityFrameworkCore.Tests (3)
artifacts\obj\Aspire.Oracle.EntityFrameworkCore.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
ConformanceTests.cs (2)
178Assert.Contains(exportedActivities, activity => activity.Tags.Any(x => x.Key == "server.address")); 179Assert.Contains(exportedActivities, activity => activity.Tags.Any(x => x.Key == "db.system"));
Aspire.Playground.Tests (4)
artifacts\obj\Aspire.Playground.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
src\Shared\PathLookupHelper.cs (1)
40if (pathExtensions is not null && pathExtensions.Any(ext => command.EndsWith(ext, StringComparison.OrdinalIgnoreCase)))
src\Shared\X509Certificate2Extensions.cs (1)
117return certificate.Extensions.OfType<X509SubjectKeyIdentifierExtension>().Any(ski => !string.IsNullOrEmpty(ski.SubjectKeyIdentifier));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
52return app.WaitForTextAsync((log) => logTexts.Any(x => log.Contains(x)), resourceName, cancellationToken);
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (1)
artifacts\obj\Aspire.Pomelo.EntityFrameworkCore.MySql.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Qdrant.Client.Tests (1)
artifacts\obj\Aspire.Qdrant.Client.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.RabbitMQ.Client.Tests (1)
artifacts\obj\Aspire.RabbitMQ.Client.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.RabbitMQ.Client.v6.Tests (1)
artifacts\obj\Aspire.RabbitMQ.Client.v6.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Seq.Tests (1)
artifacts\obj\Aspire.Seq.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
artifacts\obj\Aspire.StackExchange.Redis.DistributedCaching.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
artifacts\obj\Aspire.StackExchange.Redis.OutputCaching.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.StackExchange.Redis.Tests (1)
artifacts\obj\Aspire.StackExchange.Redis.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.Templates.Tests (1)
artifacts\obj\Aspire.Templates.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
Aspire.TestUtilities (2)
src\Shared\PathLookupHelper.cs (1)
40if (pathExtensions is not null && pathExtensions.Any(ext => command.EndsWith(ext, StringComparison.OrdinalIgnoreCase)))
src\Shared\X509Certificate2Extensions.cs (1)
117return certificate.Extensions.OfType<X509SubjectKeyIdentifierExtension>().Any(ski => !string.IsNullOrEmpty(ski.SubjectKeyIdentifier));
aspire-managed (3)
NuGet\Commands\RestoreCommand.cs (3)
261if (source.IsEnabled && !packageSources.Any(s => s.Source == source.Source)) 289if (source.IsEnabled && !packageSources.Any(s => s.Source == source.Source)) 312if (!packageSources.Any(s => s.Source.Equals(nugetOrgUrl, StringComparison.OrdinalIgnoreCase)))
CodeStyleConfigFileGenerator (1)
Program.cs (1)
160Debug.Assert(rule.CustomTags.Any(c => c == s_neverTag || c == s_whenExplicitlyEnabledTag || c == s_recommendedTag || c == s_highlyRecommendedTag),
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Specs\TypeIndex.cs (1)
34ObjectSpec objectSpec => objectSpec.Properties?.Any(ShouldBindTo) is true,
ConfigurationSchemaGenerator.Tests (1)
artifacts\obj\ConfigurationSchemaGenerator.Tests\Debug\net10.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
CSharpSyntaxGenerator (2)
SourceWriter.cs (2)
1761var hasOptional = minimalFactoryfields.Any(f => !IsRequiredFactoryField(nd, f)); 1762var hasAttributeOrModifiersList = nd.Fields.Any(f => IsAttributeOrModifiersList(f));
dotnet (38)
CommandFactory\CommandResolution\ProjectDependenciesCommandResolver.cs (1)
141l.RuntimeAssemblies.Any(r => Path.GetFileNameWithoutExtension(r.Path) == commandName)).ToList();
Commands\New\NewCommandParser.cs (1)
60&& !parseResult.Errors.Any(error => error.SymbolResult == verbosityOptionResult))
Commands\Restore\RestoringCommand.cs (3)
137=> msbuildArgs.GlobalProperties?.Keys.Any(IsPropertyExcludedFromRestore) ?? false; 224=> FlagsToExcludeFromSeparateRestore.Any(p => argument.StartsWith(p, StringComparison.OrdinalIgnoreCase)); 228=> FlagsThatTriggerSilentSeparateRestore.Any(p => argument.StartsWith(p, StringComparison.OrdinalIgnoreCase));
Commands\Run\FileBasedAppSourceEditor.cs (1)
221!remainingLeadingTrivia.Any(static t => t.Kind() is SyntaxKind.EndOfLineTrivia or SyntaxKind.IgnoredDirectiveTrivia))
Commands\Run\RunCommand.cs (2)
687.Any(item => string.Equals(item.EvaluatedInclude, Constants.RuntimeEnvironmentVariableSupport, StringComparison.OrdinalIgnoreCase))) 844.Any(static t => t is { Type: TokenType.Argument, Value: "-" });
Commands\Run\RunCommandSelector.cs (1)
75.Any(item => string.Equals(item.EvaluatedInclude, Constants.RuntimeEnvironmentVariableSupport, StringComparison.OrdinalIgnoreCase));
Commands\Test\MTP\Terminal\AnsiDetector.cs (1)
40=> !string.IsNullOrEmpty(termType) && TerminalsRegexes.Any(regex => regex.IsMatch(termType));
Commands\Test\MTP\Terminal\AnsiTerminalTestProgressFrame.cs (1)
221if (progress.Length > 0 && progress.Any(i => i != null))
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (1)
214bool anyAssemblyFailed = _assemblies.Values.Any(a => !a.Success) || HasHandshakeFailure;
Commands\Test\VSTest\TestCommand.cs (1)
691=> !string.IsNullOrEmpty(termType) && TerminalsRegexes.Any(regex => regex.IsMatch(termType));
Commands\Tool\Restore\ToolPackageRestorer.cs (2)
116return !commandsFromManifest.Any(cmd => !commandsFromPackage.Contains(cmd)) && !commandsFromPackage.Any(cmd => !commandsFromManifest.Contains(cmd));
Commands\Tool\Restore\ToolRestoreCommand.cs (2)
131if (toolRestoreResults.Any(r => !r.IsSuccess)) 154(toolRestoreResults.Any(r => r.IsSuccess)
Commands\Workload\Install\WorkloadInstallCommand.cs (1)
61if (unprocessedWorkloadIds?.Any(id => id.Contains('@')) == true)
Commands\Workload\InstallingWorkloadCommand.cs (1)
214if (_workloadSetVersionFromCommandLine.Any(v => v.Contains('@')))
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (1)
111else if (_workloadVersion.Any(v => v.Contains('@')))
Extensions\ParseResultExtensions.cs (1)
101|| parseResult.Tokens.Any(token => token.Type == TokenType.Directive)
NugetPackageDownloader\NuGetPackageDownloader.cs (2)
436if (!files.Any(f => 551if (defaultSources.Any(defaultSource => defaultSource.SourceUri == packageSource.SourceUri))
Program.cs (3)
230var skipFirstTimeUseCheck = parseResult.CommandResult.Tokens.Any(t => 231getStarOperators.Any(o => 232switchIndicators.Any(i => t.Value.StartsWith(i + o, StringComparison.OrdinalIgnoreCase))));
SdkVulnerability\SdkVulnerabilityChecker.cs (1)
62if (releaseList[i].Sdks.Any(sdk => sdk.Version == sdkVersion))
ShellShim\LinuxEnvironmentPath.cs (1)
59.Any(p => p == _packageExecutablePath.Path || p == _packageExecutablePath.PathWithTilde);
ShellShim\OsxBashEnvironmentPath.cs (1)
47.Any(p => p == _packageExecutablePath.Path || p == _packageExecutablePath.PathWithTilde);
ShellShim\OsxZshEnvironmentPathInstruction.cs (1)
30return value.Split(':').Any(p => p == _packageExecutablePath.Path);
ShellShim\ShellShimRepository.cs (1)
170return GetShimFiles(toolCommand).Any(p => _fileSystem.File.Exists(p.Value));
ShellShim\WindowsEnvironmentPath.cs (1)
102.Any(p => string.Equals(p, _expandedPackageExecutablePath, StringComparison.OrdinalIgnoreCase));
Telemetry\TopLevelCommandNameAndOptionToLog.cs (1)
25&& !parseResult.Errors.Any(error => error.SymbolResult == optionResult)
ToolManifest\ToolManifestEditor.cs (1)
414if (!toolManifestPackages.Any(t => t.PackageId.Equals(packageId)))
ToolManifest\ToolManifestFinder.cs (3)
84if (!toolManifestPackageAndSource.Any(addedToolManifestPackages => 232.Any(filename => Path.GetExtension(filename).Equals(".sln", StringComparison.OrdinalIgnoreCase) || Path.GetExtension(filename).Equals(".slnx", StringComparison.OrdinalIgnoreCase)) 283if (content.Any(t => t.PackageId.Equals(packageId)))
ToolPackage\ToolPackageDownloader.cs (1)
150if (!package.Nuspec.GetPackageTypes().Any(pt => pt.Name.Equals(PackageType.DotnetTool.Name, StringComparison.OrdinalIgnoreCase) ||
dotnet-dev-certs (5)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
212.Any(e => string.Equals(oid, e.Oid?.Value, StringComparison.Ordinal)); 963if (!request.CertificateExtensions.Any(ext => ext.Oid?.Value is SubjectKeyIdentifierOid or AuthorityKeyIdentifierOid))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
301return hashes.Any(h => string.Equals(h, certificate.Thumbprint, StringComparison.Ordinal));
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
371var isCertDirIncluded = existingDirs.Any(dir =>
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
123.Any(c => AreCertificatesEqual(c, certificate));
dotnet-format (6)
Analyzers\AnalyzerFormatter.cs (3)
246var hasDiagnostics = result.Diagnostics.Any(kvp => kvp.Value.Count > 0); 306if (!project.Documents.Any(d => d.FilePath is not null && formattablePaths.Contains(d.FilePath))) 366.Any(attribute => attribute.Languages.Contains(language));
Analyzers\AnalyzerOptionExtensions.cs (1)
64descriptor.CustomTags.Any(tag => tag == WellKnownDiagnosticTags.Compiler || tag == WellKnownDiagnosticTags.NotConfigurable))
Analyzers\AnalyzerRunner.cs (1)
99if (!project.MetadataReferences.Any(reference => reference.Display?.EndsWith("mscorlib.dll") == true))
Analyzers\Extensions.cs (1)
27.Any(x => x.GetChangedDocuments().Any() || x.GetChangedAdditionalDocuments().Any());
dotnet-svcutil-lib (37)
CommandLineParser.cs (1)
59System.Diagnostics.Debug.Assert(!s_allSwitches.Any(s => s.Equals(this)), $"A switch with name or abbreviation '{name}+{abbreviation}' has already been crated!");
CommandProcessorOptions.cs (4)
155.Where(s => !s_cmdLineOverwriteSwitches.Contains(s.Name) && s.SwitchLevel <= OperationalContext.Global && options.Any(o => 294var disallowedContextSwitches = CommandSwitch.All.Where(s => s != Switches.ToolContext && s.SwitchLevel > this.ToolContext && userOptions.Any(o => o.HasSameId(s.Name))); 303var disallowedUserOptionsOnUpdateOperation = this.GetOptions().Where(o => !s_cmdLineOverwriteSwitches.Any(n => o.HasSameId(n))); 846var loadableReferences = this.References.Where(r => !TargetFrameworkHelper.ServiceModelPackages.Any(s => s.Name == r.Name));
ImportModule.cs (1)
69if (!httpBindingTracker.IsHttpBindingContract(contractDescription) || serviceDescriptor.Endpoints.Any(endpoint => endpoint.Contract == contractDescription))
Metadata\MetadaExchangeResolver.cs (1)
57return _metadataSet != null && _metadataSet.MetadataSections.Any((section) => section.Metadata is XmlSchema || section.Metadata is WsdlNS.ServiceDescription);
Metadata\MetadataDocumentSaver.cs (7)
143var missingRefs = files.Where(file => !this.MetadataFiles.Any(metaFile => MetadataFileNameManager.UriEqual(file.FullName, metaFile.SourceUri))); 168if (!string.IsNullOrEmpty(import.Location) && !this.UnresolvedReferences.Any(r => r.WsdlImport == import)) 190if (!this.UnresolvedReferences.Any(r => r.SchemaExternal == schemaExternal)) 218if (wsdl != null && !this.MetadataFiles.Any(mi => mi.Metadata == wsdl)) 240if (schema != null && !this.MetadataFiles.Any(mi => mi.Metadata == schema) /*&& schema.Items.Count > 0*/) 265if (document != null && !this.MetadataFiles.Any(mi => mi.Metadata == document)) 290var mainWsdlFile = wsdlFiles.Where(w => !importedWsdl.Any(i => MetadataFileNameManager.UriEqual(i, w.FilePath))).FirstOrDefault();
Metadata\MetadataFileNameManager.cs (2)
45if (!_files.Any((f) => StringComparer.OrdinalIgnoreCase.Compare(f, filePath) == 0)) 192return files.Any((f) => UriEqual(f, filePath));
Metadata\ServiceDescriptor.cs (1)
234return this.metadataDocumentLoader.MetadataSections.Select((s) => s.Metadata).OfType<WsdlNS.ServiceDescription>().Any((wsdl) => ContainsHttpBindings(wsdl));
Shared\MSBuildProj.cs (3)
517bool addDependency = !_dependencies.Any(d => 965if (!this.GlobalProperties.Any(p => p.Key == "TargetFramework")) 970if (!this.GlobalProperties.Any(p => p.Key == "SdkVersion"))
Shared\Options\ListValueOption.cs (1)
113OptionValueParser.ThrowInvalidValueIf(jToken.Any(i => i.Type != JTokenType.String), jToken, this);
Shared\Options\OptionBase.cs (1)
102this.Aliases.Any(a => StringComparer.OrdinalIgnoreCase.Compare(a, optionId) == 0);
Shared\Options\OptionValueParser.cs (1)
168else if (s_nonTelemetrySensitiveOptionIds.Any(id => option.HasSameId(id)))
Shared\ProjectDependency.cs (8)
108if (s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(AssemblyName), ext, StringComparison.OrdinalIgnoreCase) == 0)) 115(s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0)); 118if (s_exeExtensions.Any((ext) => String.Compare(Path.GetExtension(packageName), ext, StringComparison.OrdinalIgnoreCase) == 0)) 133fileHasKnownExtension = s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0); 137fileHasKnownExtension = s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(filePath), ext, StringComparison.OrdinalIgnoreCase) == 0); 310if (s_projectExtensions.Any((ext) => String.Compare(Path.GetExtension(path), ext, StringComparison.OrdinalIgnoreCase) == 0)) 315else if (s_binaryExtensions.Any((ext) => String.Compare(Path.GetExtension(path), ext, StringComparison.OrdinalIgnoreCase) == 0)) 438if (dependency.IsFramework || TargetFrameworkHelper.ServiceModelPackages.Any(s => s.Name == dependency.Name))
Shared\ProjectPropertyResolver.cs (1)
246if (string.IsNullOrWhiteSpace(propertyName) || propertyName.Any(c => chars.Contains(c) || !char.IsLetterOrDigit(c)))
Shared\TargetFrameworkHelper.cs (1)
60if (!targetFrameworks.Any(targetFramework => IsSupportedFramework(targetFramework, out var frameworkInfo) && frameworkInfo.IsDnx))
Shared\Utilities\PathHelper.cs (2)
43.Any(p => folders.Any(f => p.Equals(f, RuntimeEnvironmentHelper.FileStringComparison)));
Shared\Utilities\RuntimeEnvironmentHelper.cs (2)
88.Any(v => v != null && packageFeed.Equals(v, RuntimeEnvironmentHelper.FileStringComparison)); 95while (pkgSourcesNode.Elements("add").Any(e => StringComparer.OrdinalIgnoreCase.Compare(e.Attribute("key").Value, feedName) == 0))
dotnet-svcutil-lib.Tests (5)
ProjectUtils.cs (1)
65if (!project.Dependencies.Any(d => d.Equals(svcutilPkgRef)))
TestInit.cs (4)
375.Any(e => e.Equals(Path.GetExtension(f), RuntimeEnvironmentHelper.FileStringComparison))).ToList(); 402var baselineWithNoGenerated = baselineFiles.Where(b => !generatedFiles.Any(g => 475fileLines1.RemoveAll(l => exceptLines.Any(ex => l.Contains(ex))); 476fileLines2.RemoveAll(l => exceptLines.Any(ex => l.Contains(ex)));
dotnet-user-jwts (1)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
26if (Path.GetInvalidPathChars().Any(newSecretsId.Contains))
dotnet-user-secrets (1)
src\aspnetcore\src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
26if (Path.GetInvalidPathChars().Any(newSecretsId.Contains))
dotnet-watch (1)
CommandLine\CommandLineOptions.cs (1)
220if (!command.Options.Any(option => option.Name == optionResult.Option.Name))
GenerateAnalyzerNuspec (2)
Program.cs (2)
110if (assemblyList.Any(assembly => assembly.Contains(csName, StringComparison.Ordinal))) 115if (assemblyList.Any(assembly => assembly.Contains(vbName, StringComparison.Ordinal)))
GenerateDocumentationAndConfigFiles (30)
Program.cs (1)
1256if (!sortedRulesById.Any(r => !shouldSkipRule(r.Value)))
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
69return symbol.GetMembers(WellKnownMemberNames.ObjectEquals).OfType<IMethodSymbol>().Any(m => m.IsObjectEqualsOverride());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
20=> propertySymbol.ContainingType.GetMembers().OfType<IFieldSymbol>().Any(f => f.IsImplicitlyDeclared && propertySymbol.Equals(f.AssociatedSymbol));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
133.Any(method => method.HasDisposeSignatureByConvention());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
134return availableIndices != null && availableIndices.Any(b => b);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
173=> arg.removeAttributeTypes.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
70=> arg.attributesToRemove.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
43private bool HasAliases(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsAlias); 44private bool HasUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsSimpleUsing); 45private bool HasStaticUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsStaticUsing); 75if (GetUsingsAndAliases(node).Any(u => IsEquivalentImport(u, import))) 80if (GetExterns(node).Any(u => IsEquivalentImport(u, import)))
ILAssembler (1)
DocumentCompiler.cs (1)
54bool anyErrors = diagnostics.Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error);
ILCompiler.Compiler (2)
src\runtime\src\coreclr\tools\Common\Compiler\InstructionSetSupport.cs (2)
331if (_supportedInstructionSets.Any(iSet => iSet.Contains("avx512"))) 343if (_supportedInstructionSets.Any(iSet => iSet.Contains("avx")))
ILCompiler.ReadyToRun (2)
src\runtime\src\coreclr\tools\Common\Compiler\InstructionSetSupport.cs (2)
331if (_supportedInstructionSets.Any(iSet => iSet.Contains("avx512"))) 343if (_supportedInstructionSets.Any(iSet => iSet.Contains("avx")))
illink (3)
ILLink.CodeFixProvider (12)
RequiresUnsafeCodeFixProvider.cs (12)
148if (leadingTrivia.Any(t => t.IsDirective)) 250.Any(id => 259if (stmt.GetLeadingTrivia().Any(t => t.IsDirective)) 493if (arrowExpr.GetLeadingTrivia().Any(t => t.IsDirective)) 497if (arrowExpr.ArrowToken.TrailingTrivia.Any(t => t.IsDirective)) 501if (arrowExpr.Expression.GetLeadingTrivia().Any(t => t.IsDirective)) 505if (arrowExpr.Expression.GetTrailingTrivia().Any(t => t.IsDirective)) 509if (arrowExpr.GetTrailingTrivia().Any(t => t.IsDirective)) 517if (method.ParameterList.GetTrailingTrivia().Any(t => t.IsDirective)) 522if (constraint.GetTrailingTrivia().Any(t => t.IsDirective)) 528if (localFunc.ParameterList.GetTrailingTrivia().Any(t => t.IsDirective)) 533if (prop.Identifier.TrailingTrivia.Any(t => t.IsDirective))
Infrastructure.Tests (1)
artifacts\obj\Infrastructure.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
installer.tasks (2)
StaticFileRegeneration\TpnSectionHeader.cs (2)
104if (nameLines.Any(IsSeparatorLine)) 106if (nameLines.Take(nameLines.Length - 1).Any(IsSeparatorLine))
Microsoft.Analyzers.Extra (6)
AsyncCallInsideUsingBlockAnalyzer.cs (5)
84.Any(operation => 158.Any(operation => ReferencesSymbol(operation, taskSymbol))) 166.Any(TaskWaitInvoked)) 174.Any(TaskResultInvoked)) 214.Any(operation => ReferencesSymbol(operation, symbol)))
AsyncMethodWithoutCancellation.cs (1)
145.Any(implementation => SymbolEqualityComparer.Default.Equals(implementation, method)))
Microsoft.AspNetCore.Analyzers (1)
CompilationFeatureDetector.cs (1)
48.Any(op => StartupFacts.IsSignalRConfigureMethodGesture(op.TargetMethod)))
Microsoft.AspNetCore.App.Analyzers (5)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
166.Any(operation => UsesAuthorizationOptionsSpecificGetters(operation, authorizationOptionsTypes)
Infrastructure\RoutePattern\RoutePatternParser.cs (1)
275if (!routeParameters.Any(p => string.Equals(p.Name, name, StringComparison.OrdinalIgnoreCase)))
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
193if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\aspnetcore\src\Shared\RoslynUtils\ParsabilityHelper.cs (2)
78if (tryParseMethods.Any(m => IsTryParseWithFormat(m, wellKnownTypes))) 83if (tryParseMethods.Any(IsTryParse))
Microsoft.AspNetCore.Authentication.Cookies (1)
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Authorization (1)
DenyAnonymousAuthorizationRequirement.cs (1)
27!user.Identities.Any(i => i.IsAuthenticated);
Microsoft.AspNetCore.Authorization.Policy (1)
AuthorizationEndpointConventionBuilderExtensions.cs (1)
140if (!endpointBuilder.Metadata.Any(meta => meta is IAuthorizeData))
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParameterAnalyzer.cs (1)
147.Any(f => f.IsImplicitlyDeclared && SymbolEqualityComparer.Default.Equals(propertySymbol, f.AssociatedSymbol));
Microsoft.AspNetCore.Components.Endpoints (1)
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsPolicyExtensions.cs (1)
24.Any(domain => UriHelpers.IsSubdomainOf(originUri, domain));
Microsoft.AspNetCore.DataProtection (2)
Internal\ContainerUtils.cs (1)
106return Enumerable.Reverse(lines).Any(l => l.EndsWith("name=openrc:/docker", StringComparison.Ordinal));
XmlEncryption\XmlEncryptionExtensions.cs (1)
209return element.DescendantsAndSelf().Any(DoesSingleElementRequireEncryption);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (5)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
212.Any(e => string.Equals(oid, e.Oid?.Value, StringComparison.Ordinal)); 963if (!request.CertificateExtensions.Any(ext => ext.Oid?.Value is SubjectKeyIdentifierOid or AuthorityKeyIdentifierOid))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
301return hashes.Any(h => string.Equals(h, certificate.Thumbprint, StringComparison.Ordinal));
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
371var isCertDirIncluded = existingDirs.Any(dir =>
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
123.Any(c => AreCertificatesEqual(c, certificate));
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
209if (acceptHeader == null || !acceptHeader.Any(h => h.IsSubsetOf(_textHtmlMediaType)))
Microsoft.AspNetCore.HeaderParsing (1)
HeaderParsingServiceCollectionExtensions.cs (1)
26if (!Throw.IfNull(services).Any(x => x.ServiceType == typeof(HeaderParsingFeature.PoolHelper)))
Microsoft.AspNetCore.Hosting (1)
Internal\ConfigureServicesBuilder.cs (1)
40parameters.Any(p => p.ParameterType != typeof(IServiceCollection)))
Microsoft.AspNetCore.Http.Extensions (2)
RequestDelegateFactory.cs (1)
805else if (parameter.CustomAttributes.Any(a => typeof(IFromServiceMetadata).IsAssignableFrom(a.AttributeType)))
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (1)
84if (parameters[i].CustomAttributes.Any(a => a.AttributeType == typeof(AsParametersAttribute)))
Microsoft.AspNetCore.Identity (2)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (1)
1473if (!builder.Metadata.Any(m => m is IDisableCookieRedirectMetadata))
SignInManager.cs (1)
139principal.Identities.Any(i => i.AuthenticationType == AuthenticationScheme);
Microsoft.AspNetCore.Mvc (2)
MvcServiceCollectionExtensions.cs (2)
326if (!partManager.ApplicationParts.OfType<AssemblyPart>().Any(p => p.Assembly == mvcTagHelpersAssembly)) 332if (!partManager.ApplicationParts.OfType<AssemblyPart>().Any(p => p.Assembly == mvcRazorAssembly))
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelMetadata.cs (1)
145if (!boundParameters.Any(p =>
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
AddResponseTypeAttributeCodeFixAction.cs (1)
89if (!declaredResponseMetadata.Any(m => m.IsDefault && SymbolEqualityComparer.Default.Equals(m.AttributeSource, context.Method)))
Microsoft.AspNetCore.Mvc.ApiExplorer (5)
ApiResponseTypeProvider.cs (1)
493if (!existing.ApiResponseFormats.Any(f => f.MediaType == format.MediaType))
EndpointMetadataApiDescriptionProvider.cs (3)
66var disableInferredBody = httpMethodMetadata.HttpMethods.Any(ShouldDisableInferredBody); 278else if (parameter.ParameterInfo.CustomAttributes.Any(a => typeof(IFromServiceMetadata).IsAssignableFrom(a.AttributeType) || typeof(FromKeyedServicesAttribute).IsAssignableFrom(a.AttributeType)) || 394if (!supportedResponseTypes.Any(existingResponseType =>
src\aspnetcore\src\Shared\PropertyAsParameterInfo.cs (1)
84if (parameters[i].CustomAttributes.Any(a => a.AttributeType == typeof(AsParametersAttribute)))
Microsoft.AspNetCore.Mvc.Core (5)
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
123return metadata.BoundProperties.Any(prop => prop.BindingSource is not null) ? null : BindingSource.Body;
ConsumesAttribute.cs (3)
168var isActionWithoutConsumeConstraintPresent = context.Candidates.Any( 170!candidate.Constraints.Any(constraint => constraint is IConsumesActionConstraint)); 211candidate.Constraints.Any(constraint => constraint is IConsumesActionConstraint &&
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Mvc.Razor (1)
RazorView.cs (1)
222renderedLayouts.Any(l => string.Equals(l.Path, layoutPage.Path, StringComparison.Ordinal)))
Microsoft.AspNetCore.Mvc.TagHelpers (4)
TagHelperOutputExtensions.cs (4)
151if (SpaceChars.Any(classValue.Contains) || encodedSpaceChars.Any(value => classValue.Contains(value, StringComparison.Ordinal))) 205if (SpaceChars.Any(classValue.Contains) || encodedSpaceChars.Any(value => classValue.Contains(value, StringComparison.Ordinal)))
Microsoft.AspNetCore.Routing (5)
Matching\AcceptsMatcherPolicy.cs (1)
44return endpoints.Any(e => e.Metadata.GetMetadata<IAcceptsMetadata>()?.ContentTypes.Count > 0);
Matching\HostMatcherPolicy.cs (1)
48return endpoints.Any(e =>
Matching\ILEmitTrieFactory.cs (3)
58entries.Any(e => e.text.Length >= 4); 455var disableBinarySearch = groups.Any(group => groups.Any(otherGroup => otherGroup.Key != group.Key && (otherGroup.Key | 0x20) == (group.Key | 0x20)));
Microsoft.AspNetCore.Server.Kestrel.Core (5)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
212.Any(e => string.Equals(oid, e.Oid?.Value, StringComparison.Ordinal)); 963if (!request.CertificateExtensions.Any(ext => ext.Oid?.Value is SubjectKeyIdentifierOid or AuthorityKeyIdentifierOid))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
301return hashes.Any(h => string.Equals(h, certificate.Thumbprint, StringComparison.Ordinal));
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
371var isCertDirIncluded = existingDirs.Any(dir =>
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
123.Any(c => AreCertificatesEqual(c, certificate));
Microsoft.Build (35)
BackEnd\BuildManager\BuildManager.cs (4)
2909if (newNodes?.Count != response.NumberOfNodesToCreate || newNodes.Any(n => n == null)) 3295if (!result.Any(l => l.ForwardingLoggerDescription.Name.Contains(engineAssemblyName))) 3302if (result.Any(l => 3488if (inputCacheFiles.Any(f => !FileSystems.Default.FileExists(f)))
BackEnd\Components\Logging\LoggingService.cs (6)
555get => _includeEvaluationMetaprojects ??= _eventSinkDictionary.Values.OfType<EventSourceSink>().Any(sink => sink.IncludeEvaluationMetaprojects); 564get => _includeEvaluationProfile ??= _eventSinkDictionary.Values.OfType<EventSourceSink>().Any(sink => sink.IncludeEvaluationProfiles); 573get => _includeTaskInputs ??= _eventSinkDictionary.Values.OfType<EventSourceSink>().Any(sink => sink.IncludeTaskInputs); 612sinks.Any(sink => sink.IncludeEvaluationPropertiesAndItems); 616sinks.Any(sink => !sink.IncludeEvaluationPropertiesAndItems); 1134if (_loggers.Contains(centralLogger) || _loggers.Any(l => l is ReusableLogger rl && rl.OriginalLogger == centralLogger))
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
337if (result?.Warnings?.Any(s => s is null) == true || result?.Errors?.Any(s => s is null) == true)
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
163PropertiesUsageCheck.SupportedRulesList.Any(r => r.DefaultConfiguration.IsEnabled ?? false), 220instance.SupportedRules.Any(r => r.DefaultConfiguration.IsEnabled == true));
Construction\ProjectRootElement.cs (1)
1034if (itemGroup.Items.Any(item => MSBuildNameIgnoreCaseComparer.Default.Equals(itemType, item.ItemType)))
Construction\Solution\ProjectInSolution.cs (1)
580return mainProjectElement.Attributes.OfType<XmlAttribute>().Any(a =>
Definition\Project.cs (1)
3385if (_data.ImportClosure.Any(import => ReferenceEquals(import.ImportedProject, xmlRootElement)))
Evaluation\Expander.cs (4)
2264if (captures?.Any(capture => string.Equals(capture.FunctionName, "Count", StringComparison.OrdinalIgnoreCase)) != true) 2267if (captures?.Any(capture => string.Equals(capture.FunctionName, "AnyHaveMetadataValue", StringComparison.OrdinalIgnoreCase)) != true) 4160if (args.Any(a => "out _".Equals(a))) 4898internal static bool IsKnownOverloadMethodName(string methodName) => s_knownOverloadName.Any(name => string.Equals(name, methodName, StringComparison.OrdinalIgnoreCase));
Evaluation\ItemSpec.cs (1)
88return ReferencedItems.Any(v => v.ItemAsValueFragment.IsMatch(itemToMatch));
Evaluation\LazyItemEvaluator.cs (1)
380if (MSBuildConstants.CharactersForExpansion.Any(frag.TextFragment.Contains))
Evaluation\LazyItemEvaluator.UpdateOperation.cs (2)
123var isMatch = nonItemReferenceFragments.Any(f => f.IsMatch(item.EvaluatedInclude)); 172return itemSpec.Fragments.Any(f => f is ItemSpec<P, I>.ItemExpressionFragment);
Graph\GraphBuilder.cs (1)
258if (entryPoints.Count == 0 || !entryPoints.Any(e => FileUtilities.IsSolutionFilename(e.ProjectFile)))
Graph\ProjectGraph.cs (1)
793if (targetNames.Any(targetName => string.IsNullOrWhiteSpace(targetName)))
Instance\HostServices.cs (1)
428return _hostObjects.Any(h => h.Value.IsTaskHost);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
167return _list.Any(
Instance\ProjectInstance.cs (2)
2821loggers.Any(logger => logger.Verbosity == LoggerVerbosity.Diagnostic) || 2826loggers.Any(logger => logger.Verbosity == LoggerVerbosity.Diagnostic) ||
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Extensions\IEnumerableExtensions.cs (1)
704return sequence.Any(predicate);
src\msbuild\src\Shared\TypeLoader.cs (1)
638bool hasSystemRuntime = assembly.GetReferencedAssemblies().Any(a => string.Equals(a.Name, SystemRuntimeAssemblyName, StringComparison.OrdinalIgnoreCase));
Utilities\EngineFileUtilities.cs (1)
594return _regexMatchCache.Value.GetOrAdd(fileSpec, file => s_lazyWildCardExpansionRegexes.Any(regex => regex.IsMatch(fileSpec)));
Utilities\NuGetFrameworkWrapper.cs (1)
127if (filterFrameworks.Any(r =>
Microsoft.Build.Framework (5)
BuildEnvironmentHelper.cs (1)
418return processList.Any(s =>
ExceptionHandling.cs (1)
48if (aggregateException.InnerExceptions.Any(innerException => IsCriticalException(innerException)))
FileUtilities.cs (1)
1720if (file.Any(i => i.Equals(Path.DirectorySeparatorChar) || i.Equals(Path.AltDirectorySeparatorChar)))
Logging\AnsiDetector.cs (1)
44if (terminalsRegexes.Any(regex => regex.IsMatch(termType)))
Utilities\TypeUtilities.cs (1)
42.Any(attr => SafeGetAttributeName(attr) == attributeName);
Microsoft.Build.Tasks.Core (4)
AssemblyDependency\ResolveAssemblyReference.cs (1)
1154bool logWarning = idealAssemblyRemappingsIdentities.Any(i => i.assemblyName.FullName.Equals(fusionName) && i.reference.GetConflictVictims().Count == 0);
GetSDKReferenceFiles.cs (1)
418if (_resolvedReferences.Any(x => String.Equals(x.AssemblyLocation, reference.AssemblyLocation, StringComparison.OrdinalIgnoreCase)))
RedistList.cs (1)
799if (!mapping.Any(x => x.From.Equals(pair.From)))
Unzip.cs (1)
312result |= _excludePatterns.Any(pattern => FileMatcher.IsMatch(FileMatcher.Normalize(zipArchiveEntry.FullName), pattern));
Microsoft.Build.Tasks.Git (1)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.CodeAnalysis (10)
Binding\UseSiteInfo.cs (1)
62Debug.Assert(secondaryDependencies?.IsEmpty != false || !secondaryDependencies.Any(dependency => dependency == dependency.CorLibrary));
CodeGen\BasicBlock.cs (1)
462Debug.Assert(!builder._labelInfos.Values.Any(li => li.bb == toRemove),
CommandLine\SarifV1ErrorLogger.cs (1)
110additionalLocations.Any(l => HasPath(l)))
CommandLine\SarifV2ErrorLogger.cs (1)
149additionalLocations.Any(l => HasPath(l)))
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1359return root.DescendantTokens().Any(static token => string.Equals(token.ValueText, "GeneratedCode", StringComparison.Ordinal) ||
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
174if (lazyDiagnosticsMap != null && lazyDiagnosticsMap.Any(kvp => kvp.Value.TryDequeue(out diag)))
DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
608if (typeArguments.Any(a => !a.IsBound))
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
Microsoft.CodeAnalysis.Analyzers (33)
ImmutableObjectMethodAnalyzer.cs (1)
97&& type.GetBaseTypesAndThis().Any(immutableTypeSymbols.Contains))
InternalImplementationOnlyAnalyzer.cs (1)
57if (attributes.Any(a => a.AttributeClass is { Name: InternalImplementationOnlyAttributeName }
MetaAnalyzers\DiagnosticAnalyzerCorrectnessAnalyzer.DiagnosticAnalyzerSymbolAnalyzer.cs (1)
33if (namedType.GetBaseTypes().Any(IsDiagnosticAnalyzer))
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (1)
261category.Any(char.IsWhiteSpace) || // We do not allow white spaces in category name.
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
69return symbol.GetMembers(WellKnownMemberNames.ObjectEquals).OfType<IMethodSymbol>().Any(m => m.IsObjectEqualsOverride());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
20=> propertySymbol.ContainingType.GetMembers().OfType<IFieldSymbol>().Any(f => f.IsImplicitlyDeclared && propertySymbol.Equals(f.AssociatedSymbol));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
133.Any(method => method.HasDisposeSignatureByConvention());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
134return availableIndices != null && availableIndices.Any(b => b);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
173=> arg.removeAttributeTypes.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
70=> arg.attributesToRemove.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
43private bool HasAliases(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsAlias); 44private bool HasUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsSimpleUsing); 45private bool HasStaticUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsStaticUsing); 75if (GetUsingsAndAliases(node).Any(u => IsEquivalentImport(u, import))) 80if (GetExterns(node).Any(u => IsEquivalentImport(u, import)))
Microsoft.CodeAnalysis.AnalyzerUtilities (41)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
69return symbol.GetMembers(WellKnownMemberNames.ObjectEquals).OfType<IMethodSymbol>().Any(m => m.IsObjectEqualsOverride());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
20=> propertySymbol.ContainingType.GetMembers().OfType<IFieldSymbol>().Any(f => f.IsImplicitlyDeclared && propertySymbol.Equals(f.AssociatedSymbol));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
133.Any(method => method.HasDisposeSignatureByConvention());
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\ControlFlowGraphExtensions.cs (1)
28if (cfg.OriginalOperation.Syntax.GetDiagnostics().Any(d => d.DefaultSeverity == DiagnosticSeverity.Error) ||
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAbstractValue.cs (1)
37Debug.Assert(!locations.Any(l => l.IsAnalysisEntityDefaultLocation && l.AnalysisEntity!.HasUnknownInstanceLocation));
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertyMapperCollection.cs (2)
29if (propertyMappers.Any(p => p.PropertyIndex >= 0)) 67this.RequiresValueContentAnalysis = this.PropertyMappersWithIndex.Values.Any(t => t.PropertyMapper.RequiresValueContentAnalysis);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (7)
153if (this.TrackedTypeSymbols.Any(s => operation.Type.GetBaseTypesAndThis().Contains(s))) 224&& this.TrackedTypeSymbols.Any(s => operation.Target.Type.GetBaseTypesAndThis().Contains(s)) 285&& this.TrackedTypeSymbols.Any(s => propertyReferenceOperation.Instance.Type.GetBaseTypesAndThis().Contains(s)) 465if (visitedArgument.Value?.Type != null && this.TrackedTypeSymbols.Any(s => visitedArgument.Value.Type.GetBaseTypesAndThis().Contains(s))) 480&& this.TrackedTypeSymbols.Any(s => visitedInstance.Type.GetBaseTypesAndThis().Contains(s)) 539if (this.TrackedTypeSymbols.Any(s => argumentTypeSymbol.GetBaseTypesAndThis().Contains(s)) 656&& this.TrackedTypeSymbols.Any(s => returnValue.Type.GetBaseTypesAndThis().Contains(s))
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetCallbacks.cs (1)
98if (valueContentAbstractValue.LiteralValues.Any(badLiteralValuePredicate))
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\HardcodedSymmetricAlgorithmKeysSources.cs (1)
40&& argumentValueContents[0].LiteralValues.Any(
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataConfig.cs (1)
188static sinkKind => GetSourceInfos(sinkKind).Any(static o => o.TaintConstantArray));
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataSymbolMapExtensions.cs (1)
138if (sourceInfo.TaintedArguments.Any(match => match(parameterSymbol, wellKnownTypeProvider)))
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\WebInputSources.cs (1)
95if ((!typeSymbol.GetBaseTypesAndThis().Any(x => x.Name.EndsWith("Controller", System.StringComparison.Ordinal))
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AddressSharedEntitiesProvider.cs (1)
50var isReferenceCopy = !addressSharedEntities.Any(a => a.Type.IsValueType);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
704AnalysisDataForUnhandledThrowOperations.Values.Any(HasAnyAbstractValue))
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysis.cs (1)
586return predecessorsWithBranches.Any(predecessorWithBranch =>
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
1266if (!isTryCast && pointsToValue.Locations.Any(location => location.IsNull))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
Microsoft.CodeAnalysis.CodeStyle (32)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
43Debug.Assert(!supportedDiagnostics.Any(descriptor => descriptor.CustomTags.Any(t => t == WellKnownDiagnosticTags.Unnecessary)) || this is AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer);
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
115?.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
56if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
130if (root.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
774if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
152.Any(symbolStartAnalyzer._compilationAnalyzer.IsIfConditionalDirective))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
81if (syntax.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
128if (context.Operation.Syntax.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (4)
187if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree => 385propertyDeclaration.DescendantNodes().Any(this.SyntaxFacts.IsFieldExpression)) 571NonConstructorLocations(writeLocations1).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration))) 584NonConstructorLocations(writeLocations2).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration)))
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
190=> within?.DescendantNodes().Any(n => syntaxFacts.AreEquivalent(n, nullCheckedExpression)) is true;
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
608if (typeArguments.Any(a => !a.IsBound))
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
src\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
146.Any(nameAttributes => nameAttributes.Select(GetValueFromNameAttribute).Contains(name));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
184return [.. NameGenerator.EnsureUniqueness(parameterNames, isFixed, canUse: s => !reservedNames.Any(n => comparer.Equals(s, n)))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
94return !existingMethods.Any(m => SignatureComparer.Instance.HaveSameSignature(m, generatedMethod, caseSensitive: syntaxFacts.IsCaseSensitive, compareParameterName: true, isParameterCaseSensitive: syntaxFacts.IsCaseSensitive));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
507if (simpleName.AncestorsAndSelf().Any(syntaxFacts.IsAnonymousOrLocalFunction))
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
354baseTypes.Any(ts => ts.GetMembers(memberName) 356.Any(m => HasNameConflict(member, m)));
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (1)
81if (method.Parameters.Zip(conflictingMethod.Parameters, (p1, p2) => (p1, p2)).Any(
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
434if (nodeToRemove.GetLeadingTrivia().Any(t => t.IsDirective || syntaxFacts.IsRegularComment(t)))
src\roslyn\src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
204if (newWhenTrueStatement.GetLeadingTrivia().Any(syntaxFacts.IsRegularComment)) 217if (!newWhenTrueStatement.GetTrailingTrivia().Any(syntaxFacts.IsRegularComment))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
134return availableIndices != null && availableIndices.Any(b => b);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
173=> arg.removeAttributeTypes.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
70=> arg.attributesToRemove.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
43private bool HasAliases(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsAlias); 44private bool HasUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsSimpleUsing); 45private bool HasStaticUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsStaticUsing); 75if (GetUsingsAndAliases(node).Any(u => IsEquivalentImport(u, import))) 80if (GetExterns(node).Any(u => IsEquivalentImport(u, import)))
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_InterpolatedString.cs (3)
73!interpolation.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error) && 763var nonOutConstructorHasArityError = nonOutConstructorDiagnostics.DiagnosticBag?.AsEnumerableWithoutResolution().Any(d => (ErrorCode)d.Code == ErrorCode.ERR_BadCtorArgCount) ?? false; 764var outConstructorHasArityError = outConstructorDiagnostics.DiagnosticBag?.AsEnumerableWithoutResolution().Any(d => (ErrorCode)d.Code == ErrorCode.ERR_BadCtorArgCount) ?? false;
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1603else if (System.Linq.Enumerable.Any(ResultsBuilder, x => (x.Result.Kind == MemberResolutionKind.TypeInferenceFailed) || (x.Result.Kind == MemberResolutionKind.TypeInferenceExtensionInstanceArgument)))
CommandLine\CSharpCompiler.cs (1)
268return args.Any(arg => new[] { "/noconfig", "-noconfig" }.Contains(arg.ToLowerInvariant()));
Compilation\CSharpCompilation.cs (2)
870if (root.DescendantNodes(n => n is GlobalStatementSyntax || n is StatementSyntax || n is CompilationUnitSyntax).Any(n => n.IsKind(SyntaxKind.ReturnStatement))) 2018if (nameParts.Any(n => string.IsNullOrWhiteSpace(n)))
Compilation\SyntaxAndDeclarationManager.cs (1)
211Debug.Assert(!directive.IsActive || tree.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error));
Compiler\MethodCompiler.cs (1)
2311diagnostics.DiagnosticBag!.AsEnumerable().Any(d => d.Code == (int)ErrorCode.WRN_AttributeLocationOnBadDeclaration))
Emitter\Model\PEModuleBuilder.cs (1)
2258if (_inlineArrayTypes.Count != 0 || _readOnlyListTypes.Any(t => t is not null))
FlowAnalysis\DefiniteAssignment.cs (1)
527if (compatDiagnostics.AsEnumerable().Any(d => (ErrorCode)d.Code == ErrorCode.ERR_InsufficientStack))
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (1)
1142if (!_hoistedLocals.Keys.Any(l => l.Name == local.Name && TypeSymbol.Equals(l.Type, local.Type, TypeCompareKind.ConsiderEverything2)))
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
365return propertyParams.Any(p => (!p.RefCustomModifiers.IsDefaultOrEmpty && p.RefCustomModifiers.Any(static m => !m.IsOptional && !m.Modifier.IsWellKnownTypeInAttribute())) ||
Symbols\Source\LambdaSymbol.cs (1)
382var isParams = paramSyntax?.Modifiers.Any(static m => m.IsKind(SyntaxKind.ParamsKeyword)) ?? false;
Symbols\Source\SourceAssemblySymbol.cs (1)
1628Debug.Assert(_lazyOmittedAttributeIndices == null || !_lazyOmittedAttributeIndices.Any(i => i < 0 || i >= this.GetAttributes().Length));
Symbols\Source\SourceComplexParameterSymbol.cs (2)
1071Debug.Assert(this.GetAttributeDeclarations().Any(attrLists => attrLists.Any(attrList => attrList.Contains(node)))); 1079return implParameterAttributeList.Any(attrList => attrList.Attributes.Contains(node));
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1829RoslynDebug.AssertOrFailFast(Volatile.Read(ref _lazyTypeMembers)?.Values.Any(types => types.Contains(t => t == (object)type)) == true);
Syntax\SyntaxFacts.cs (2)
546return node.DescendantNodesAndSelf(child => !IsNestedFunction(child)).Any( 616node.DescendantNodesAndSelf(child => !IsNestedFunction(child) && !(node is ExpressionSyntax)).Any(n => n is ReturnStatementSyntax { Expression: { } });
Syntax\SyntaxNodeRemover.cs (1)
59: base(nodesToRemove.Any(n => n.IsPartOfStructuredTrivia()))
Microsoft.CodeAnalysis.CSharp.CodeStyle (62)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertNamespaceAnalysis.cs (1)
77if (namespaceDeclaration.Members.Any(static m => m is BaseNamespaceDeclarationSyntax))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (3)
117if (typeDeclaration.GetLeadingTrivia().Any(t => t.IsDocComment())) 132if (member.Modifiers.Any(m => m.Kind() is SyntaxKind.PublicKeyword or SyntaxKind.ProtectedKeyword or SyntaxKind.InternalKeyword)) 146if (member.GetLeadingTrivia().Any(t => t.IsDocComment()))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (3)
142if (labels.Any(label => IsDefaultSwitchLabel(label))) 178if (switchStatement.Sections.Any(section => section.Labels.Any(label => IsDefaultSwitchLabel(label))))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
47if (switchStatement.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
80.Any(field => field is { AssociatedSymbol: null, IsStatic: false, IsReadOnly: true });
src\roslyn\src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
102return compilationUnit.ChildNodes().Any(
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (2)
77if (arrowExpressionClause.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 110if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (2)
43if (conditionalExpression.GetRequiredParent().GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 86if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
61if (current.ContainsDiagnostics && current.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (2)
89if (colonToken.TrailingTrivia.Any(t => !t.IsWhitespaceOrEndOfLine())) 92if (thisOrBaseKeyword.LeadingTrivia.Any(t => !t.IsWhitespaceOrEndOfLine() && !t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
58.Any(declaringSyntax => IsInPropertyInitialization(declaringSyntax, node) || IsInFieldInitialization(declaringSyntax, node));
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (1)
22=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning);
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryUnsafeModifier\UnnecessaryUnsafeModifierUtilities.cs (1)
23=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (1)
41accessorList.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
84.Any(m => m is { DeclaredAccessibility: Accessibility.Public, IsStatic: false, Parameters: [var addParameter] } &&
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (4)
94if (topMostExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 693if (initializer.OpenBraceToken.GetPreviousToken().TrailingTrivia.Any(static x => x.IsSingleOrMultiLineComment())) 844if (assignmentExpression.Right.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Any( 939if (arguments.Any(static a => a.NameColon != null))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
304if (constructedType.GetBaseTypesAndThis().Any(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
155if (whenTrue.GetLeadingTrivia().Any(static t => t.GetStructure() is ConditionalDirectiveTriviaSyntax))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (1)
63return !declaration.GetLeadingTrivia().Any(t => t.Kind() == SyntaxKind.EndOfLineTrivia)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (2)
173if (!arrowExpression.Expression.GetLeadingTrivia().Any(t => t.IsRegularComment()) || 322if (expressionBody.GetLeadingTrivia().Any(t => t.IsRegularComment()))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
142if (semicolonToken.TrailingTrivia.Any(t => t.IsDirective))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
72explicitLambda.ParameterList.Parameters.Any(p => p.Type is null || p.Default != null)) 79if (!languageVersion.IsCSharp14OrAbove() && explicitLambda.ParameterList.Parameters.Any(p => p.Modifiers.Count > 0))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
104if (localDeclaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
167if (target.Syntax.DescendantNodesAndSelf().OfType<ArgumentSyntax>().Any(a => a.RefKindKeyword.Kind() is SyntaxKind.RefKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
50if (expression.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error)) 117.Any(variable => !variable.Identifier.IsMissing);
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
269if (_declarator.DescendantNodesAndSelf().OfType<ExpressionSyntax>().Any(
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (5)
117property.AccessorList.Accessors.Any(static a => a.ExpressionBody != null || a.Body != null)) 175if (_candidateMembersToRemove.Any(kvp => kvp.Key is IFieldSymbol) && 181_candidateMembersToRemove.Any(kvp => kvp.Key is IPropertySymbol) && 438if (group.Any(t => t.parameterIsWrittenTo) && group.Count() > 1) 522!syntaxRef.GetSyntax(cancellationToken).AncestorsAndSelf().Any(a => a == assignmentExpression))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
182if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArrowExpressionClauseSyntaxExtensions.cs (2)
43if (arrowExpression.ArrowToken.TrailingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 46if (arrowExpression.ArrowToken.LeadingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
118if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 217expression = firstStatement.GetLeadingTrivia().Any(t => t.IsDirective || t.IsSingleOrMultiLineComment())
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
860if (expression.GetLeadingTrivia().Any(t => t.IsDirective)) 880if (expression.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
45return typeParameters.HasValue && typeParameters.Value.Any(typeParameter => typeParameter.Identifier.ValueText == name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
88if (nodeParent.GetRequiredParent().ChildNodes().OfType<ArgumentSyntax>().Any(a => a.Expression.IsKind(opposite)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
331return node.GetAncestors<MemberDeclarationSyntax>().Any( 451=> node.DescendantNodes(n => n == node || !n.IsReturnableConstruct()).Any(n => n is YieldStatementSyntax); 605var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind())); 902var hasTrailingComments = from.GetTrailingTrivia().Any(t => t.IsRegularComment());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
478=> node.Ancestors().Any(n => n.Kind() is
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
108this.SemanticRootOfOriginalExpression.GetAncestors().Any(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
266.Any(n =>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
44if (!firstUsing.GetLeadingTrivia().Any(t => t.IsEndOfLine())) 57!currentUsing.GetLeadingTrivia().Any(t => t.IsEndOfLine()))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (53)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
135if (switchLabels.Any(label => IsDefaultSwitchLabel(label))) 224.OrderBy(section => section.Labels.Any(label => IsDefaultSwitchLabel(label)))
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
162if (accessors.Any(a => a.Body != null || a.ExpressionBody != null) ||
src\roslyn\src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (1)
49if (descendentXmlElements.Any(element => GetXmlElementLocalName(element) == NodeName))
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
93if (deconstruction is PositionalPatternClauseSyntax positionalPatternClause && positionalPatternClause.Subpatterns.Any(p => p.Pattern is not ConstantPatternSyntax))
src\roslyn\src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (2)
280if (precedingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 285if (declaratorOpt.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
97var seenNamedArgument = currentInvocation.ArgumentList.Arguments.Any(a => a.NameColon != null);
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
298if (seenUsings.Any(seenUsingDirective => seenUsingDirective.IsEquivalentTo(usingDirective, topLevel: false))) 302if (leadingTrivia.Any(trivia => !trivia.IsWhitespaceOrEndOfLine()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
62invocation.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
238propertyDeclaration.AccessorList.Accessors.Any(IsSetOrInitAccessor))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (4)
178initializer.OpenBraceToken.GetPreviousToken().TrailingTrivia.Any(static x => x.IsSingleOrMultiLineComment()); 764if (parentStatement.GetTrailingTrivia().Any(static t => t.IsSingleOrMultiLineComment())) 819if (node.GetLeadingTrivia().Any(static t => t.IsSingleOrMultiLineComment()) || 820node.GetTrailingTrivia().Any(static t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
83if (analysisResult.LocalDeclarationStatement.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (2)
70if (newWhenTrueStatement.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment())) 83if (!newWhenTrueStatement.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionHelpers.cs (1)
33if (ifStatement.Else is null || !ifStatement.Else.ElseKeyword.LeadingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
133var canUseImplicitArray = invocation.ArgumentList.Arguments.Skip(indexToWrap).Any(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (4)
183if (firstMember == constructorDeclaration || removedMembers.Any(kvp => kvp.Value.memberNode == firstMember)) 227if (!removedMembers.Any(kvp => kvp.Value.memberNode == priorMember)) 270if (!properties.Values.Any(v => v == current.Identifier.ValueText)) 550=> memberDeclaration.GetLeadingTrivia().Any(t => t.GetStructure()?.Kind() == SyntaxKind.PragmaWarningDirectiveTrivia)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
152var constructorContents = typeStructure.Content.Any(n => n is XmlElementSyntax { StartTag.Name.LocalName.ValueText: s_summaryTagName })
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (4)
118if (remainingTrivia.Any(t => t.IsSingleOrMultiLineComment() || t.IsDirective)) 155if (openBraceTrailingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 162if (openBraceLeadingTrivia.Any(t => t.IsSingleOrMultiLineComment() || t.IsDirective)) 170if (closeBraceTrailingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (2)
63throwStatement.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment())) 65if (assignmentExpressionStatement.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
63if (current.Arguments.Any(a => a.Kind() != SyntaxKind.OmittedTypeArgument))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
42if (globalStatements.Any(g => firstTypeOrNamespaceDecl.SpanStart < g.SpanStart))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
254if (!info.Context.GenerateDocumentationComments || node.GetLeadingTrivia().Any(t => t.IsDocComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (2)
150if (root.Usings[i].GetLeadingTrivia().Any(trivia => trivia.IsKind(SyntaxKind.IfDirectiveTrivia))) 155if (root.Usings[i].GetLeadingTrivia().Any(trivia => trivia.IsKind(SyntaxKind.EndIfDirectiveTrivia)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (4)
504targetToken.GetAncestors<StatementSyntax>().Any(s => s.IsKind(SyntaxKind.UnsafeStatement)) || 505targetToken.GetAncestors<MemberDeclarationSyntax>().Any(m => m.GetModifiers().Any(SyntaxKind.UnsafeKeyword) || 506targetToken.GetAncestors<LocalFunctionStatementSyntax>().Any(f => f.GetModifiers().Any(SyntaxKind.UnsafeKeyword))) || 507targetToken.GetAncestors<UsingDirectiveSyntax>().Any(d => d.UnsafeKeyword.IsKind(SyntaxKind.UnsafeKeyword));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1714=> tuple.Arguments.Any(a => a.NameColon != null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
97if (reference.GetSyntax().ChildTokens().Any(t => t.IsKind(SyntaxKind.UnsafeKeyword)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
47if (unnecessaryImports == null || unnecessaryImports.Any(import => import.OverlapsHiddenPosition(cancellationToken)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
126=> trivia.Any(t => !t.IsWhitespaceOrEndOfLine());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
48if (localDeclarationStatement.Declaration.Variables.Any(IsDiscardDeclaration))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
334if (types.Any(t => t is INamedTypeSymbol)) 499if (methods.Any(IsEnumHasFlag)) 610invocationTypes.Any(t => Compilation.ClassifyConversion(m.ReturnType, t).IsImplicit)).ToList(); 1467if (types.Any(t => t is IArrayTypeSymbol)) 1477if (types.Any(t => t is IArrayTypeSymbol)) 1486if (types.Any(t => t is INamedTypeSymbol)) 1509if (types.Any(t => t is INamedTypeSymbol))
Microsoft.CodeAnalysis.CSharp.Features (143)
AddImport\CSharpAddImportFeatureService.cs (1)
170node.AncestorsAndSelf().Any(n => n is QueryExpressionSyntax && !(n.Parent is QueryContinuationSyntax));
ChangeSignature\CSharpChangeSignatureService.cs (2)
163token.Parent.AncestorsAndSelf().Any(a => a == objectCreation.Type)) 257return node.AncestorsAndSelf().Any(n => n == nodeContainingOriginal) ? matchingNode : null;
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
229return pragmaWarning.ErrorCodes.Any(n => n.ToString() == id);
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
186!supportsNonTrailing && invocation.ArgumentList.Arguments.Take(insertionIndex).Any(arg => arg.NameColon != null);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (2)
307if (descendantNodesAndSelf.Any(n => n.Kind() is SyntaxKind.ObjectCreationExpression or SyntaxKind.InvocationExpression)) 369var newLocalDeclaration = variableDeclarator.GetLeadingTrivia().Any(t => t.IsDirective)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
320Debug.Assert(!compilationUnit.Members.Any(m => m is BaseNamespaceDeclarationSyntax)); 378if (namespaceDecl.Name.GetDiagnostics().Any(diag => diag.DefaultSeverity == DiagnosticSeverity.Error))
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
197if (type.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
79return declarations.Any(d => d.Body == null && d.Modifiers.Any(SyntaxKind.PartialKeyword));
Completion\KeywordRecommenders\AllowsKeywordRecommender.cs (1)
40.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.ClassKeyword))
Completion\KeywordRecommenders\NewKeywordRecommender.cs (2)
63.Any(t => token.SpanStart > t.OpenBraceToken.Span.End && 101.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.StructKeyword))
Completion\KeywordRecommenders\PartialKeywordRecommender.cs (1)
37if (!decl.Modifiers.Any(t => t.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)))
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
154.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.ClassKeyword))
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (1)
76baseList.Types.Any(t => token == t.GetLastToken(includeSkipped: true)))
ConvertCast\CSharpConvertDirectCastToTryCastCodeRefactoringProvider.cs (1)
75=> triviaList.Any(t => t.IsRegularComment()) ? triviaList : [];
ConvertIfToSwitch\CSharpConvertIfToSwitchCodeRefactoringProvider.cs (1)
40elseClause.ElseKeyword.LeadingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (1)
339if (!namespaces.Any(namespaceSymbol => namespaceSymbol.Name == nameof(System.Linq) &&
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
69if (_source.DescendantTrivia().Any(trivia => trivia is (kind:
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (2)
204var isWrittenTo = parameterReferences[parameter].Any(r => r.IsWrittenTo(semanticModel, cancellationToken)); 376if (identifierName.GetAncestors<EqualsValueClauseSyntax>().Any(removedInitializers.Contains))
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (2)
163if (!leadingCloseBraceTrivia.Any(t => t.IsDirective)) 263if (!statements[0].GetLeadingTrivia().Any(t => t.Kind() is SyntaxKind.EndOfLineTrivia) &&
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (7)
72if (stringExpression.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 320if (interpolationInteriorSpans.Any(s => s.Contains(line.Start))) 540!interpolationInteriorSpans.Any(s => s.Contains(lines[1].Start))) 546!interpolationInteriorSpans.Any(s => s.Contains(lines[^2].Start))) 585if (interpolationInteriorSpans.Any(s => s.Contains(line.Start))) 655if (interpolationInteriorSpans.Any(s => s.Contains(line.Start)) || 656interpolationInteriorSpans.Any(s => s.Start - 1 == line.Start))
Debugging\BreakpointResolver.cs (1)
89!parts.Any(p => p.IsKind(SyntaxKind.AliasQualifiedName)))
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (5)
68=> member.GetFirstToken().LeadingTrivia.Any(t => t is (kind: SyntaxKind.SingleLineDocumentationCommentTrivia or SyntaxKind.MultiLineDocumentationCommentTrivia)); 159var hasUsingSystem = usings.Any(u => u.Name is IdentifierNameSyntax { Identifier.ValueText: nameof(System) }); 197block.DescendantNodes().OfType<ThrowStatementSyntax>().Any(t => t.Expression is null)) 351if (textTokens.Any(t => !string.IsNullOrWhiteSpace(t.ToString()))) 370=> token.TrailingTrivia.Any(t => t.Kind() == SyntaxKind.SkippedTokensTrivia);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
852var hasDecitionTree = oldNode.Sections.Any(s => s.Labels.Any(l => l is CasePatternSwitchLabelSyntax));
EditAndContinue\DeclarationBody\TopLevelCodeDeclarationBody.cs (1)
48var isAsync = GlobalStatements.Any(static s => SyntaxUtilities.GetSuspensionPoints(s).Any());
EditAndContinue\SyntaxUtilities.cs (2)
200&& property.AccessorList!.Accessors.Any(e => e is { Body: null, ExpressionBody: null }); 245=> body.DescendantNodesAndSelf(LambdaUtilities.IsNotLambda).Any(n => n is YieldStatementSyntax);
ExtractInterface\CSharpExtractInterfaceService.cs (1)
63return typeDeclaration.Modifiers.Any(m => SyntaxFacts.IsAccessibilityModifier(m.Kind()));
ExtractMethod\CSharpMethodExtractor.cs (1)
186if (!leadingTrivia.Any(t => t.IsKind(SyntaxKind.EndOfLineTrivia) || t.GetStructure() is EndIfDirectiveTriviaSyntax) &&
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
345.Any(m => m.GetModifiers().Any(SyntaxKind.UnsafeKeyword)))
ExtractMethod\CSharpSelectionValidator.cs (2)
207=> token.GetAncestors<SyntaxNode>().Any(n => CheckTopLevel(n, token.Span)); 303if (tokens.Any(t => t.Kind() == SyntaxKind.YieldKeyword))
ExtractMethod\Extensions.cs (5)
58if (!node.GetAncestorsOrThis<SyntaxNode>().Any(predicate)) 92return initializer.ArgumentList.Arguments.Any(a => a.Span.Contains(textSpan)); 234=> set.Any(a => node.GetAnnotatedNodesAndTokens(a).Any()); 238if (token1.TrailingTrivia.Any(t => !t.IsElastic())) 243if (token2.LeadingTrivia.Any(t => !t.IsElastic()))
GenerateType\CSharpGenerateTypeService.cs (1)
738.Any(n => n.Equals(includeUsingsOrImports)))
IntroduceVariable\CSharpIntroduceVariableService.cs (2)
88if (!expression.DepthFirstTraversal().Any(n => n.RawKind == (int)SyntaxKind.ArrayCreationExpression) && 89!expression.DepthFirstTraversal().Any(n => n.RawKind == (int)SyntaxKind.TypeOfExpression))
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
449var localFunctions = innermostCommonBlock.DescendantNodes().Where(node => node.IsKind(SyntaxKind.LocalFunctionStatement) && matches.Any(match => match.Span.OverlapsWith(node.Span)));
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (2)
221return block.CloseBraceToken.LeadingTrivia.Any(HasCommentTrivia) 222|| block.OpenBraceToken.TrailingTrivia.Any(HasCommentTrivia);
MetadataAsSource\CSharpMetadataAsSourceService.cs (1)
135return annotatedChildren.Any(n => n.GetAncestorOrThis<AttributeSyntax>() == null);
Organizing\Organizers\MemberDeclarationsOrganizer.Comparer.cs (2)
83var xHasInitializer = ((FieldDeclarationSyntax)x).Declaration.Variables.Any(v => v.Initializer != null); 84var yHasInitializer = ((FieldDeclarationSyntax)y).Declaration.Variables.Any(v => v.Initializer != null);
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
59if (!syntaxContext.PrecedingModifiers.Any(SyntaxFacts.IsAccessibilityModifier))
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
54if (tree.GetPrecedingModifiers(position, cancellationToken).Any(SyntaxFacts.IsAccessibilityModifier))
Snippets\CSharpProprSnippetProvider.cs (1)
47if (precedingModifiers.Any(syntaxKind => syntaxKind is SyntaxKind.PrivateKeyword or SyntaxKind.ProtectedKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertNamespaceAnalysis.cs (1)
77if (namespaceDeclaration.Members.Any(static m => m is BaseNamespaceDeclarationSyntax))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (3)
117if (typeDeclaration.GetLeadingTrivia().Any(t => t.IsDocComment())) 132if (member.Modifiers.Any(m => m.Kind() is SyntaxKind.PublicKeyword or SyntaxKind.ProtectedKeyword or SyntaxKind.InternalKeyword)) 146if (member.GetLeadingTrivia().Any(t => t.IsDocComment()))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (3)
142if (labels.Any(label => IsDefaultSwitchLabel(label))) 178if (switchStatement.Sections.Any(section => section.Labels.Any(label => IsDefaultSwitchLabel(label))))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
47if (switchStatement.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
80.Any(field => field is { AssociatedSymbol: null, IsStatic: false, IsReadOnly: true });
src\roslyn\src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
102return compilationUnit.ChildNodes().Any(
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (2)
77if (arrowExpressionClause.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 110if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (2)
43if (conditionalExpression.GetRequiredParent().GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 86if (nextToken.LeadingTrivia.Any(static t => t.Kind() is
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
61if (current.ContainsDiagnostics && current.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (2)
89if (colonToken.TrailingTrivia.Any(t => !t.IsWhitespaceOrEndOfLine())) 92if (thisOrBaseKeyword.LeadingTrivia.Any(t => !t.IsWhitespaceOrEndOfLine() && !t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
58.Any(declaringSyntax => IsInPropertyInitialization(declaringSyntax, node) || IsInFieldInitialization(declaringSyntax, node));
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (1)
22=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error or DiagnosticSeverity.Warning);
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryUnsafeModifier\UnnecessaryUnsafeModifierUtilities.cs (1)
23=> diagnostics.Any(d => d.Severity is DiagnosticSeverity.Error);
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (1)
41accessorList.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
84.Any(m => m is { DeclaredAccessibility: Accessibility.Public, IsStatic: false, Parameters: [var addParameter] } &&
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (4)
94if (topMostExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 693if (initializer.OpenBraceToken.GetPreviousToken().TrailingTrivia.Any(static x => x.IsSingleOrMultiLineComment())) 844if (assignmentExpression.Right.DescendantNodesAndSelf().OfType<IdentifierNameSyntax>().Any( 939if (arguments.Any(static a => a.NameColon != null))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
304if (constructedType.GetBaseTypesAndThis().Any(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (1)
155if (whenTrue.GetLeadingTrivia().Any(static t => t.GetStructure() is ConditionalDirectiveTriviaSyntax))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (1)
63return !declaration.GetLeadingTrivia().Any(t => t.Kind() == SyntaxKind.EndOfLineTrivia)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (2)
173if (!arrowExpression.Expression.GetLeadingTrivia().Any(t => t.IsRegularComment()) || 322if (expressionBody.GetLeadingTrivia().Any(t => t.IsRegularComment()))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
142if (semicolonToken.TrailingTrivia.Any(t => t.IsDirective))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (2)
72explicitLambda.ParameterList.Parameters.Any(p => p.Type is null || p.Default != null)) 79if (!languageVersion.IsCSharp14OrAbove() && explicitLambda.ParameterList.Parameters.Any(p => p.Modifiers.Count > 0))
src\roslyn\src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (1)
104if (localDeclaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
167if (target.Syntax.DescendantNodesAndSelf().OfType<ArgumentSyntax>().Any(a => a.RefKindKeyword.Kind() is SyntaxKind.RefKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (2)
50if (expression.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error)) 117.Any(variable => !variable.Identifier.IsMissing);
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.Analyzer.cs (1)
269if (_declarator.DescendantNodesAndSelf().OfType<ExpressionSyntax>().Any(
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (5)
117property.AccessorList.Accessors.Any(static a => a.ExpressionBody != null || a.Body != null)) 175if (_candidateMembersToRemove.Any(kvp => kvp.Key is IFieldSymbol) && 181_candidateMembersToRemove.Any(kvp => kvp.Key is IPropertySymbol) && 438if (group.Any(t => t.parameterIsWrittenTo) && group.Count() > 1) 522!syntaxRef.GetSyntax(cancellationToken).AncestorsAndSelf().Any(a => a == assignmentExpression))
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
135if (switchLabels.Any(label => IsDefaultSwitchLabel(label))) 224.OrderBy(section => section.Labels.Any(label => IsDefaultSwitchLabel(label)))
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (1)
162if (accessors.Any(a => a.Body != null || a.ExpressionBody != null) ||
src\roslyn\src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (1)
49if (descendentXmlElements.Any(element => GetXmlElementLocalName(element) == NodeName))
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
93if (deconstruction is PositionalPatternClauseSyntax positionalPatternClause && positionalPatternClause.Subpatterns.Any(p => p.Pattern is not ConstantPatternSyntax))
src\roslyn\src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (2)
280if (precedingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 285if (declaratorOpt.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
97var seenNamedArgument = currentInvocation.ArgumentList.Arguments.Any(a => a.NameColon != null);
src\roslyn\src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
298if (seenUsings.Any(seenUsingDirective => seenUsingDirective.IsEquivalentTo(usingDirective, topLevel: false))) 302if (leadingTrivia.Any(trivia => !trivia.IsWhitespaceOrEndOfLine()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
62invocation.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
238propertyDeclaration.AccessorList.Accessors.Any(IsSetOrInitAccessor))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (4)
178initializer.OpenBraceToken.GetPreviousToken().TrailingTrivia.Any(static x => x.IsSingleOrMultiLineComment()); 764if (parentStatement.GetTrailingTrivia().Any(static t => t.IsSingleOrMultiLineComment())) 819if (node.GetLeadingTrivia().Any(static t => t.IsSingleOrMultiLineComment()) || 820node.GetTrailingTrivia().Any(static t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
83if (analysisResult.LocalDeclarationStatement.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (2)
70if (newWhenTrueStatement.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment())) 83if (!newWhenTrueStatement.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\CSharpUseConditionalExpressionHelpers.cs (1)
33if (ifStatement.Else is null || !ifStatement.Else.ElseKeyword.LeadingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
133var canUseImplicitArray = invocation.ArgumentList.Arguments.Skip(indexToWrap).Any(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (4)
183if (firstMember == constructorDeclaration || removedMembers.Any(kvp => kvp.Value.memberNode == firstMember)) 227if (!removedMembers.Any(kvp => kvp.Value.memberNode == priorMember)) 270if (!properties.Values.Any(v => v == current.Identifier.ValueText)) 550=> memberDeclaration.GetLeadingTrivia().Any(t => t.GetStructure()?.Kind() == SyntaxKind.PragmaWarningDirectiveTrivia)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider_DocComments.cs (1)
152var constructorContents = typeStructure.Content.Any(n => n is XmlElementSyntax { StartTag.Name.LocalName.ValueText: s_summaryTagName })
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (4)
118if (remainingTrivia.Any(t => t.IsSingleOrMultiLineComment() || t.IsDirective)) 155if (openBraceTrailingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 162if (openBraceLeadingTrivia.Any(t => t.IsSingleOrMultiLineComment() || t.IsDirective)) 170if (closeBraceTrailingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (2)
63throwStatement.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment())) 65if (assignmentExpressionStatement.GetTrailingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
63if (current.Arguments.Any(a => a.Kind() != SyntaxKind.OmittedTypeArgument))
StringIndentation\CSharpStringIndentationService.cs (1)
83if (token.ContainsDiagnostics && token.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (4)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CSharpStaticHolderTypes.Fixer.cs (1)
76if (constructor.Modifiers.Any(m => m.IsKind(SyntaxKind.StaticKeyword)))
Microsoft.NetCore.Analyzers\Performance\CSharpPreferHashDataOverComputeHash.Fixer.cs (1)
202return triviaList.Any(t => !t.IsKind(SyntaxKind.WhitespaceTrivia) && !t.IsKind(SyntaxKind.EndOfLineTrivia));
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (1)
534.Any(d => d.Identifier.ValueText == variableName))
Microsoft.NetCore.Analyzers\Runtime\CSharpDoNotUseStackallocInLoops.cs (1)
57if (forStatement.Declaration?.Variables.Any(v => v.Initializer?.Value.Contains(ctx.Node) == true) == true)
Microsoft.CodeAnalysis.CSharp.Workspaces (47)
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
47if (types.Any(s_shouldInclude))
CodeGeneration\CSharpSyntaxGenerator.cs (2)
1804if (!parameter.Identifier.TrailingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 3721.Where(trivia => !trivia.Any(t => t.IsRegularOrDocComment()))
Rename\CSharpRenameRewriterLanguageService.cs (1)
162if (_conflictLocations.Any(cf => cf.Contains(lambda.Span)))
Simplification\CSharpSimplificationService.Expander.cs (3)
175if (parameters.Length > 0 && parameters.Any(p => p.Type == null)) 450var isInsideCref = originalSimpleName.AncestorsAndSelf(ascendOutOfTrivia: true).Any(n => n is CrefSyntax); 818if (typeArgumentsInSymbol.Intersect(typeArgumentsInOriginalDefinition).Any(n => !typeArgumentSymbols.Contains(n)))
Simplification\CSharpSimplificationService.NodesAndTokensToReduceComputer.cs (1)
70if (_simplifyAllDescendants || node.DescendantNodesAndTokens(s_containsAnnotations, descendIntoTrivia: true).Any(s_hasSimplifierAnnotation))
Simplification\Simplifiers\NameSimplifier.cs (1)
642simplifiedNode.DescendantNodes().Any(n => n is PointerTypeSyntax))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
182if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArrowExpressionClauseSyntaxExtensions.cs (2)
43if (arrowExpression.ArrowToken.TrailingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 46if (arrowExpression.ArrowToken.LeadingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
118if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 217expression = firstStatement.GetLeadingTrivia().Any(t => t.IsDirective || t.IsSingleOrMultiLineComment())
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
860if (expression.GetLeadingTrivia().Any(t => t.IsDirective)) 880if (expression.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
45return typeParameters.HasValue && typeParameters.Value.Any(typeParameter => typeParameter.Identifier.ValueText == name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
88if (nodeParent.GetRequiredParent().ChildNodes().OfType<ArgumentSyntax>().Any(a => a.Expression.IsKind(opposite)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
331return node.GetAncestors<MemberDeclarationSyntax>().Any( 451=> node.DescendantNodes(n => n == node || !n.IsReturnableConstruct()).Any(n => n is YieldStatementSyntax); 605var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind())); 902var hasTrailingComments = from.GetTrailingTrivia().Any(t => t.IsRegularComment());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
478=> node.Ancestors().Any(n => n.Kind() is
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
108this.SemanticRootOfOriginalExpression.GetAncestors().Any(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
266.Any(n =>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
44if (!firstUsing.GetLeadingTrivia().Any(t => t.IsEndOfLine())) 57!currentUsing.GetLeadingTrivia().Any(t => t.IsEndOfLine()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
42if (globalStatements.Any(g => firstTypeOrNamespaceDecl.SpanStart < g.SpanStart))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
254if (!info.Context.GenerateDocumentationComments || node.GetLeadingTrivia().Any(t => t.IsDocComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (2)
150if (root.Usings[i].GetLeadingTrivia().Any(trivia => trivia.IsKind(SyntaxKind.IfDirectiveTrivia))) 155if (root.Usings[i].GetLeadingTrivia().Any(trivia => trivia.IsKind(SyntaxKind.EndIfDirectiveTrivia)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (4)
504targetToken.GetAncestors<StatementSyntax>().Any(s => s.IsKind(SyntaxKind.UnsafeStatement)) || 505targetToken.GetAncestors<MemberDeclarationSyntax>().Any(m => m.GetModifiers().Any(SyntaxKind.UnsafeKeyword) || 506targetToken.GetAncestors<LocalFunctionStatementSyntax>().Any(f => f.GetModifiers().Any(SyntaxKind.UnsafeKeyword))) || 507targetToken.GetAncestors<UsingDirectiveSyntax>().Any(d => d.UnsafeKeyword.IsKind(SyntaxKind.UnsafeKeyword));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1714=> tuple.Arguments.Any(a => a.NameColon != null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
97if (reference.GetSyntax().ChildTokens().Any(t => t.IsKind(SyntaxKind.UnsafeKeyword)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
47if (unnecessaryImports == null || unnecessaryImports.Any(import => import.OverlapsHiddenPosition(cancellationToken)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
126=> trivia.Any(t => !t.IsWhitespaceOrEndOfLine());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
48if (localDeclarationStatement.Declaration.Variables.Any(IsDiscardDeclaration))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
334if (types.Any(t => t is INamedTypeSymbol)) 499if (methods.Any(IsEnumHasFlag)) 610invocationTypes.Any(t => Compilation.ClassifyConversion(m.ReturnType, t).IsImplicit)).ToList(); 1467if (types.Any(t => t is IArrayTypeSymbol)) 1477if (types.Any(t => t is IArrayTypeSymbol)) 1486if (types.Any(t => t is INamedTypeSymbol)) 1509if (types.Any(t => t is INamedTypeSymbol))
Microsoft.CodeAnalysis.Extensions.Package (12)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
Microsoft.CodeAnalysis.Features (70)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
160if (!typeSymbol.GetMembers().OfType<IMethodSymbol>().Any(IsDebuggerDisplayMethod))
AddImport\AbstractAddImportCodeRefactoringProvider.cs (1)
96if (namespaceReference.DescendantNodesAndSelf().Any(n => semanticModel.GetAliasInfo(n, cancellationToken) is { Target: not INamespaceSymbol { IsGlobalNamespace: true } }))
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
151(trivia.HasStructure && trivia.GetStructure().DescendantTrivia().Any(fixer.IsEndOfLine));
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (2)
138=> TopLevelTypeDeclarations(document.Root).Any( 235if (includeComplexFileNames && typeNameParts.Any(t => t.arity > 0))
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (1)
212!previousToken.TrailingTrivia.Any(syntaxFacts.IsEndOfLineTrivia))
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
845import => importsToRemove.Any(importToRemove => syntaxFacts.AreEquivalent(importToRemove, import)),
Completion\CompletionService.cs (1)
330var filterTextHasNoUpperCase = !filterText.Any(char.IsUpper);
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (1)
107.Any(node => !(node.SyntaxTree == context.SyntaxTree && node.Span.IntersectsWith(context.Position)));
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
56.Any(p => p.Type.ContainsAnonymousType());
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
54if (allAnonymousNodes.Any(t => !anonymousType.Equals(t.symbol, SymbolEqualityComparer.Default)))
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
59!property.DescendantNodes().Any(syntaxFacts.IsFieldExpression))
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
42if (from.GetDiagnostics().Any(d => d.DefaultSeverity == DiagnosticSeverity.Error))
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
83if (ifStatement == null || ifStatement.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
65if (stringToken.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)) 119if (interpolatedString.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
49if (literalExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (4)
452return body.RootNodes.Any(static (root, isLambda) => root.DescendantNodesAndSelf().Any(isLambda), isLambda); 819map.Any(entry => IsGlobalStatement(entry.Key))) 5578var anyInitializerUpdatesInCurrentDocument = updatesInCurrentDocument.ChangedDeclarations.Keys.Any(IsDeclarationWithInitializer) || updatesInCurrentDocument.HasDeletedMemberInitializer; 5922.Any(oldContainingLambdaBody => activeOrMatchedLambdas.TryGetValue(oldContainingLambdaBody, out var info) && info.HasActiveStatement))
EditAndContinue\EditSession.cs (2)
916if (partialTypeEdits.Any(static e => e.SyntaxMaps.HasMap)) 1346if (projectBaselines.Any(baseline => HasReferenceRudeEdits(baseline.InitiallyReferencedAssemblies, newCompilation, projectDiagnostics)))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
186if (provider.Metadata.WorkspaceKinds.Any(wk => wk == kind))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
145if (ae.InnerExceptions.Any(e => e is not OperationCanceledException) || 146ae.InnerExceptions.Cast<OperationCanceledException>().Any(NotOurShutdownToken))
ExtractMethod\MethodExtractor.Analyzer.cs (1)
652return tokens.Any(t => semanticFacts.IsWrittenTo(this.SemanticModel, t.Parent, this.CancellationToken));
ExtractMethod\MethodExtractor.CodeGenerator.cs (1)
297Contract.ThrowIfTrue(AnalyzerResult.GetVariablesToSplitOrMoveOutToCallSite().Any(v => v.UseAsReturnValue));
ExtractMethod\MethodExtractor.TriviaResult.cs (1)
59if (list.Any(t => t.RawKind != _endOfLineKind && t.RawKind != _whitespaceKind))
ExtractMethod\SelectionValidator.cs (1)
173if (textSpan.End <= statement.Span.End && spine.Any(s => AreStatementsInSameContainer(s, statement)))
FullyQualify\AbstractFullyQualifyService.cs (1)
288=> Enumerable.Any(@namespace.GetAllTypes(cancellationToken), t => t.IsAccessibleWithin(model.Compilation.Assembly));
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
129.Any(m => m.MethodKind == MethodKind.UserDefinedOperator &&
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
377if (!triggeringProject.ProjectReferences.Any(pr => pr.ProjectId == projectToBeUpdated.Id))
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
242containsClassSpecificStatement = operation.Descendants().Any(op => op.Kind == OperationKind.InstanceReference);
IntroduceVariable\AbstractIntroduceVariableService.State_Query.cs (1)
24if (!semanticMap.AllReferencedSymbols.Any(s => s is IRangeVariableSymbol))
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (1)
192=> node.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error);
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.cs (1)
197var hasAtLeastOneTupleWhichAppearsMultipleTimes = transitiveReferences.Any(kvp => kvp.Key.IsTupleType && kvp.Value.count >= 2);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
137Prioritize(groups, g => g.Any(priorityDocumentKeysSet.Contains)),
Organizing\AbstractOrganizingService.cs (1)
38o.SyntaxNodeTypes.Any(t2 => t1 == t2 || t1.GetTypeInfo().IsSubclassOf(t2))
Rename\SymbolicRenameInfo.cs (2)
233if (solution.Projects.Any(p => p.IsSubmission && p.ProjectReferences.Any(r => r.ProjectId == projectIdOfLocation)))
ReplaceMethodWithProperty\AbstractReplaceMethodWithPropertyService.cs (1)
81if (trailingTrivia.Any(syntaxFacts.IsRegularComment))
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (2)
139.Any(m => m.Parameters.Length == 0); 149.Any(m => m.Parameters.Length == 1 &&
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
43Debug.Assert(!supportedDiagnostics.Any(descriptor => descriptor.CustomTags.Any(t => t == WellKnownDiagnosticTags.Unnecessary)) || this is AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer);
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
115?.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error)
src\roslyn\src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (1)
56if (node.ContainsDiagnostics && node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
130if (root.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
774if (tree.GetDiagnostics(cancellationToken).Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
152.Any(symbolStartAnalyzer._compilationAnalyzer.IsIfConditionalDirective))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
81if (syntax.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyLinqExpression\AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
128if (context.Operation.Syntax.GetDiagnostics().Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (4)
187if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree => 385propertyDeclaration.DescendantNodes().Any(this.SyntaxFacts.IsFieldExpression)) 571NonConstructorLocations(writeLocations1).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration))) 584NonConstructorLocations(writeLocations2).Any(loc => !loc.Ancestors().Contains(result.PropertyDeclaration)))
src\roslyn\src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
190=> within?.DescendantNodes().Any(n => syntaxFacts.AreEquivalent(n, nullCheckedExpression)) is true;
src\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
146.Any(nameAttributes => nameAttributes.Select(GetValueFromNameAttribute).Contains(name));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
184return [.. NameGenerator.EnsureUniqueness(parameterNames, isFixed, canUse: s => !reservedNames.Any(n => comparer.Equals(s, n)))
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
94return !existingMethods.Any(m => SignatureComparer.Instance.HaveSameSignature(m, generatedMethod, caseSensitive: syntaxFacts.IsCaseSensitive, compareParameterName: true, isParameterCaseSensitive: syntaxFacts.IsCaseSensitive));
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
507if (simpleName.AncestorsAndSelf().Any(syntaxFacts.IsAnonymousOrLocalFunction))
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
354baseTypes.Any(ts => ts.GetMembers(memberName) 356.Any(m => HasNameConflict(member, m)));
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Method.cs (1)
81if (method.Parameters.Zip(conflictingMethod.Parameters, (p1, p2) => (p1, p2)).Any(
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
434if (nodeToRemove.GetLeadingTrivia().Any(t => t.IsDirective || syntaxFacts.IsRegularComment(t)))
src\roslyn\src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (2)
204if (newWhenTrueStatement.GetLeadingTrivia().Any(syntaxFacts.IsRegularComment)) 217if (!newWhenTrueStatement.GetTrailingTrivia().Any(syntaxFacts.IsRegularComment))
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\SuppressMessageAttributeState.TargetSymbolResolver.cs (1)
608if (typeArguments.Any(a => !a.IsBound))
Wrapping\AbstractWrapper.cs (1)
66=> declaration.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error && d.Location.SourceSpan.OverlapsWith(headerSpan));
Wrapping\AbstractWrappingCodeRefactoringProvider.cs (1)
50var containsSyntaxError = node.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.Razor.Compiler (9)
Language\Components\ComponentComplexAttributeContentPass.cs (2)
41node.TagHelpers.Any(t => t.Kind == TagHelperKind.Component)) 46node.TagHelpers.Any(t => t.Kind == TagHelperKind.Component))
Language\Components\ComponentLoweringPass.cs (1)
513if (!node.Children.OfType<TagHelperIntermediateNode>().Any(t => t.TagHelpers.Any(th => th.Kind == TagHelperKind.ChildContent)))
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (1)
2227=> diagnostics.Any(diagnostic => diagnostic.Severity == RazorDiagnosticSeverity.Error);
Language\Extensions\DefaultTagHelperTargetExtension.cs (1)
184var isConditionalAttributeValue = node.Children.Any(
Language\Legacy\TextReaderExtensions.cs (1)
67return ReadUntil(reader, c => terminators.Any(tc => tc == c), inclusive: inclusive);
Language\Legacy\WhiteSpaceRewriter.cs (1)
56var containsNonWhitespace = literal.DescendantTokens().Any(static t => !string.IsNullOrWhiteSpace(t.Content));
Language\TagHelpers\Producers\ComponentTagHelperProducer.cs (2)
176if (builder.BoundAttributes.Any(static a => a.IsParameterizedChildContentProperty()) && 177!builder.BoundAttributes.Any(static a => string.Equals(a.Name, ComponentHelpers.ChildContent.ParameterAttributeName, StringComparison.OrdinalIgnoreCase)))
Microsoft.CodeAnalysis.ResxSourceGenerator (21)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
69return symbol.GetMembers(WellKnownMemberNames.ObjectEquals).OfType<IMethodSymbol>().Any(m => m.IsObjectEqualsOverride());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
20=> propertySymbol.ContainingType.GetMembers().OfType<IFieldSymbol>().Any(f => f.IsImplicitlyDeclared && propertySymbol.Equals(f.AssociatedSymbol));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
133.Any(method => method.HasDisposeSignatureByConvention());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
Microsoft.CodeAnalysis.VisualBasic (4)
OptionsValidator.vb (1)
55If Not errors.Any(Function(diag) diag.Severity = DiagnosticSeverity.Error) Then
Syntax\SyntaxReplacer.vb (3)
89Me._visitStructuredTrivia = Me._nodeSet.Any(Function(n) n.IsPartOfStructuredTrivia()) OrElse 90Me._tokenSet.Any(Function(t) t.IsPartOfStructuredTrivia()) OrElse 91Me._triviaSet.Any(Function(t) t.IsPartOfStructuredTrivia())
Microsoft.CodeAnalysis.Workspaces (49)
Diagnostics\DiagnosticAnalysisResult.cs (3)
54Debug.Assert(!syntaxLocals.Values.Any(item => item.IsDefault)); 55Debug.Assert(!semanticLocals.Values.Any(item => item.IsDefault)); 56Debug.Assert(!nonLocals.Values.Any(item => item.IsDefault));
Editing\SymbolEditor.cs (1)
407var declaration = this.GetDeclarations(currentSymbol).FirstOrDefault(d => memberDecls.Any(md => md.SyntaxTree == d.SyntaxTree && d.FullSpan.IntersectsWith(md.FullSpan)));
Editing\SyntaxGenerator.cs (2)
243return method.ReturnType.GetReferencedTypeParameters().Any(t => IsNullableAnnotatedTypeParameter(typeParameter, t)) || 244method.Parameters.Any(p => p.Type.GetReferencedTypeParameters().Any(t => IsNullableAnnotatedTypeParameter(typeParameter, t)));
FindSymbols\FindReferences\DependentProjectsFinder.cs (2)
247if (!dependentProjects.Any(dp => dp.project.Id == pId)) 327return project.ProjectReferences.Any(p => p.ProjectId == symbolOrigination.sourceProject.Id);
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
98symbol.ContainingType.GetBaseTypesAndThis().Any(t => t.GetMembers(nameof(IList<>.Add)).Any(m => m is IMethodSymbol { IsStatic: false, Parameters.Length: 1 }));
PatternMatching\ContainerPatternMatcher.cs (1)
35_invalidPattern = _patternSegments.Length == 0 || _patternSegments.Any(s => s.IsInvalid);
Rename\ConflictEngine\ConflictResolver.cs (1)
278if (otherThingsNamedTheSame.Any(s => s.IsKind(SymbolKind.Namespace)))
Rename\ConflictEngine\ConflictResolver.Session.cs (3)
192conflictLocations = [.. conflictLocations.Where(l => !unresolvedLocations.Any(c => c.Item2 == l.DocumentId && c.Item1.Contains(l.OriginalIdentifierSpan)))]; 465return conflictResolution.RelatedLocations.Any(r => r.Type == RelatedLocationType.PossiblyResolvableConflict); 525if (newLocations.Any(loc => loc.SourceSpan.Start == adjustedStartPosition))
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
73if (startingPosition >= c.OriginalSpan.End && !appliedTextSpans.Any(s => s.Contains(c.OriginalSpan))) 82if (!appliedTextSpans.Any(s => s.Contains(oldSpan)))
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
191return waiters.Any(w => w.HasPendingWork);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
134return availableIndices != null && availableIndices.Any(b => b);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
173=> arg.removeAttributeTypes.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
70=> arg.attributesToRemove.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
43private bool HasAliases(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsAlias); 44private bool HasUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsSimpleUsing); 45private bool HasStaticUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsStaticUsing); 75if (GetUsingsAndAliases(node).Any(u => IsEquivalentImport(u, import))) 80if (GetExterns(node).Any(u => IsEquivalentImport(u, import)))
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
418if (!_documentsAddedInBatch.Any(d => d.Id == documentId))
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
929if (!provider.Metadata.Extensions.Any(e => string.Equals(e, extension, StringComparison.OrdinalIgnoreCase)))
Workspace\Solution\Project.cs (1)
494return results.Any(b => b);
Workspace\Solution\Solution.cs (1)
1909var hasSubmissionReference = !ignoreExistingReferences && projectState.ProjectReferences.Any(p => this.SolutionState.GetRequiredProjectState(p.ProjectId).IsSubmission);
Workspace\Solution\SolutionCompilationState.cs (1)
112Contract.ThrowIfTrue(_projectIdToTrackerMap.Any(kvp => kvp.Key != kvp.Value.ProjectState.Id));
Workspace\Workspace.cs (1)
1738&& projectChanges.GetChangedDocuments().Any(id => projectChanges.NewProject.GetDocument(id)!.HasInfoChanged(projectChanges.OldProject.GetDocument(id)!)))
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (1)
378=> from.ProjectReferences.Any(pr => pr.ProjectId == to);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (2)
28if (string.IsNullOrEmpty(name) || name.Any(char.IsWhiteSpace)) 45if (string.IsNullOrEmpty(value) || (addQuoteIfValueContainsWhitespace && value.Any(char.IsWhiteSpace)))
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Property.cs (1)
53types.Any(type => type.Name == "IsExternalInit" && !type.IsNested && type.Namespace == "System.Runtime.CompilerServices");
Microsoft.Data.Analysis (1)
DataFrame.cs (1)
781if (valueColumns != null && valueColumnList.Any(v => idColumnList.Contains(v)))
Microsoft.DotNet.ApiSymbolExtensions (1)
AttributeDataExtensions.cs (1)
38.Any(typedConstant => typedConstant.Kind == TypedConstantKind.Type
Microsoft.DotNet.Build.Manifest (1)
VersionIdentifier.cs (1)
168(prevDelimiterCharacter != '-' || !_knownTags.Any(tag => nextSegment.StartsWith(tag, StringComparison.OrdinalIgnoreCase))))
Microsoft.DotNet.Build.Tasks.Packaging (8)
CreateTrimDependencyGroups.cs (1)
165if (!runtimeAssets.Any(r => Path.GetFileName(r).Equals(fileName, StringComparison.OrdinalIgnoreCase)))
GenerateRuntimeDependencies.cs (1)
102if (runtimeGroup.Any(d => d.ItemSpec == c_emptyDependency))
GetPackageDestination.cs (1)
116if (packageTargetFramework.MetadataNames.Cast<string>().Any(md => md.Equals("TargetRuntime")))
NuGetPack.cs (1)
290if (!pathHasMatches.Values.Any(i => i))
PackageIndex.cs (1)
594return mappings.Keys.Any(fxVer => fxVer <= framework.Version);
UpdatePackageIndex.cs (1)
332if (index.ModulesToPackages.Values.Any(p => p.Equals(id)))
ValidatePackage.cs (1)
425if (index.ModulesToPackages.Values.Any(p => p.Equals(PackageId)))
ValidationTask.cs (1)
92return frameworkValues.Any(fx => values.Contains(fx));
Microsoft.DotNet.Build.Tasks.TargetFramework (1)
ChooseBestTargetFrameworksTask.cs (1)
38if (bestTargetFramework != null && (!Distinct || !bestTargetFrameworkList.Any(b => b.ItemSpec == bestTargetFramework)))
Microsoft.DotNet.Build.Tasks.Workloads (3)
Swix\SwixComponent.cs (1)
200if (pack.IsAlias && pack.AliasTo != null && !pack.AliasTo.Keys.Any(rid => s_SupportedRids.Contains(rid)))
WorkloadPackageBase.cs (2)
258if (exclusionPatterns.Any(pattern => Regex.IsMatch(file, pattern))) 282if (string.IsNullOrEmpty(version.Prerelease) || version.Prerelease.Split('.').Any(s => string.Equals("ci", s) || string.Equals("dev", s)))
Microsoft.DotNet.Cli.CommandLine (2)
ResultNavigationExtensions.cs (2)
23&& !parseResult.Errors.Any(e => e.SymbolResult == optionResult) // only return a value if this isn't a parsing error 52&& !parseResult.Errors.Any(e => e.SymbolResult == optionResult) // only return a value if this isn't a parsing error
Microsoft.DotNet.Cli.Definitions (8)
Commands\Workload\WorkloadCommandDefinition.cs (1)
72if (commandResult.HasOption(InfoOption) && commandResult.HasOption(VersionOption) && !commandResult.Children.Any(child => child is System.CommandLine.Parsing.CommandResult))
Help\HelpBuilder.cs (3)
401displayOptionTitle = parentCommand.Options.Any(x => x.Recursive && !x.Hidden); 412var hasCommandWithHelp = command.Subcommands.Any(x => !x.Hidden); 419displayOptionTitle = displayOptionTitle || (command.Options.Any(x => !x.Hidden));
Telemetry\CIEnvironmentDetectorForTelemetry.cs (1)
45return _detectionRules.Any(rule => rule.IsMatch());
Telemetry\EnvironmentDetectionRule.cs (3)
32return _variables.Any(variable => EnvironmentVariableParser.ParseBool(Environment.GetEnvironmentVariable(variable), defaultValue: false)); 68return _variables.Any(variable => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable))); 86return _rules.Any(rule => rule.IsMatch());
Microsoft.DotNet.Cli.Utils (3)
FrameworkDependencyFile.cs (1)
27return DependencyContext.RuntimeGraph.Any(g => g.Runtime == runtimeIdentifier);
MSBuildArgs.cs (1)
139return options.Any(o => o.Name == name) ? parseResult.GetValue<T>(name) : default;
PathUtility.cs (1)
14return otherFiles.Any(source => source.SourceUri.Equals("https://api.nuget.org/v3/index.json"));
Microsoft.DotNet.HotReload.Watch (6)
Build\EvaluationResult.cs (1)
153=> node.ReferencingProjects.Any(p => p.ProjectInstance.GetTargetFramework() != "");
Build\ProjectGraphUtilities.cs (1)
56=> projectNode.GetCapabilities().Any(static value => value is ProjectCapability.AspNetCore or ProjectCapability.WebAssembly);
FileWatcher\FileWatcher.cs (1)
108var alreadyWatched = _directoryTreeWatchers.Any(d => directory.StartsWith(d.Key, PathUtilities.OSSpecificPathComparison));
HotReload\CompilationHandler.cs (1)
878if (projectsToRestart.Any(p => p.Options.IsMainProject))
HotReload\HotReloadDotNetWatcher.cs (2)
242if (changedFilesAccumulator.Any(change => change.Kind is ChangeKind.Add or ChangeKind.Delete)) 270if (updates.ProjectsToRestart.Any(static project => project.Options.IsMainProject))
Microsoft.DotNet.Internal.DependencyInjection.Testing (1)
DependencyInjectionValidation.cs (1)
260return s_exemptTypes.Contains(type.FullName) || s_exemptNamespaces.Any(n => type.FullName.StartsWith(n));
Microsoft.DotNet.PackageTesting (1)
GetCompatiblePackageTargetFrameworks.cs (1)
76if (!string.IsNullOrEmpty(minDotnetTargetFramework) && frameworksToTest.Any(t => t.Framework == ".NETStandard"))
Microsoft.DotNet.SharedFramework.Sdk (1)
src\CreateFrameworkListFile.cs (1)
269?.Any(prefix => item.GetMetadata("TargetPath")?.StartsWith(prefix) == true) ?? true;
Microsoft.DotNet.TemplateLocator (6)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (4)
524.Where(p => !expandedWorkloads.Any(w => w.Packs.Contains(p))) 536.Where(w => w.Packs.Any(p => requestedPacks.Contains(p))) 587if (!existingPacks.SetEquals(updatedPacks) || existingPacks.Any(p => PackHasChanged(_packs[p].pack, advertisingManifestResolver._packs[p].pack))) 737w.workload.Platforms == null || w.workload.Platforms.Count == 0 || w.workload.Platforms.Any(platform => _currentRuntimeIdentifiers.Contains(platform)));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSuggestionFinder.cs (2)
52if (workload.expandedPacks.Any(e => requestedPacks.Contains(e))) 199private static int ContainsExperimental(HashSet<WorkloadId> set) => set.Any(w => w.ToString().Contains("experimental")) ? 1 : 0;
Microsoft.DotNet.VersionTools.Cli (1)
VersionTrimmingOperation.cs (1)
45if (assets.Any(a => Path.GetExtension(a) != ".nupkg"))
Microsoft.Extensions.AI (6)
ChatCompletion\FunctionInvokingChatClient.cs (3)
845messages.Exists(static m => m.Contents.Any(static c => c is FunctionApprovalRequestContent or FunctionApprovalResponseContent)); 1199if (added.Any(static m => m.Contents.Any(static c => c is FunctionResultContent { Exception: not null })))
ChatReduction\MessageCountingChatReducer.cs (1)
57else if (!message.Contents.Any(m => m is FunctionCallContent or FunctionResultContent))
ChatReduction\SummarizingChatReducer.cs (2)
161if (!unsummarizedMessages[indexOfFirstMessageToKeep - 1].Contents.Any(IsToolRelatedContent)) 225if (!message.Contents.Any(IsToolRelatedContent))
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
601AIJsonSchemaCreateOptions? createOptions = typeInfo.Properties.Any(prop => prop.IsExtensionData) 1569AIJsonSchemaCreateOptions? createOptions = typeInfo.Properties.Any(prop => prop.IsExtensionData)
Microsoft.Extensions.AI.Evaluation (2)
EvaluationMetricExtensions.cs (1)
73: metric.Diagnostics.Any(predicate));
EvaluationResultExtensions.cs (1)
97return result.Metrics.Values.Any(m => m.ContainsDiagnostics(predicate));
Microsoft.Extensions.AI.Evaluation.Quality (3)
IntentResolutionEvaluator.cs (1)
123if (toolCalls.Any(t => !toolDefinitionNames.Contains(t.Name)))
TaskAdherenceEvaluator.cs (1)
122if (toolCalls.Any(t => !toolDefinitionNames.Contains(t.Name)))
ToolCallAccuracyEvaluator.cs (1)
131if (toolCalls.Any(t => !toolDefinitionNames.Contains(t.Name)))
Microsoft.Extensions.AI.Evaluation.Safety (2)
ChatMessageExtensions.cs (2)
12=> message.Contents.Any(c => c.IsImageWithSupportedFormat()); 15=> conversation.Any(ContainsImageWithSupportedFormat);
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
477case MessageResponseItem mri when mri.Content is { Count: > 0 } mriContent && mriContent.Any(c => c.OutputTextAnnotations is { Count: > 0 }):
Microsoft.Extensions.AI.OpenAI.Tests (16)
OpenAIResponseClientTests.cs (16)
3208u.Contents != null && u.Contents.Any(c => c is CodeInterpreterToolCallContent)).ToList(); 3236u.Contents != null && u.Contents.Any(c => c is CodeInterpreterToolResultContent)).ToList(); 5165var refusalUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c is ErrorContent ec && ec.ErrorCode == "Refusal")); 5223var errorUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c is ErrorContent)); 5266var errorUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c is ErrorContent)); 5309var errorUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c is ErrorContent)); 5352var annotatedUpdate = updates.FirstOrDefault(u => u.Contents.Any(c => c.Annotations?.Count > 0)); 5851u.Contents != null && u.Contents.Any(c => c is ImageGenerationToolCallContent)); 5858u.Contents != null && u.Contents.Any(c => c is ImageGenerationToolResultContent result && 5859result.Outputs != null && result.Outputs.Any(o => o.AdditionalProperties != null && o.AdditionalProperties.ContainsKey("PartialImageIndex")))); 5864u.Contents != null && u.Contents.Any(c => c is UsageContent)); 5964u.Contents != null && u.Contents.Any(c => c is ImageGenerationToolResultContent result && 5965result.Outputs != null && result.Outputs.Any(o => o.AdditionalProperties != null && o.AdditionalProperties.ContainsKey("PartialImageIndex")))).ToList(); 5973u.Contents.OfType<ImageGenerationToolResultContent>().Any(result => 5985return result.Outputs.Any(o => HasCorrectImageData(o, index)); 6010u.Contents != null && u.Contents.Any(c => c is ImageGenerationToolCallContent));
Microsoft.Extensions.AI.Tests (45)
ChatCompletion\FunctionInvokingChatClientTests.cs (37)
1643if (!chatContents.Any(m => m.Contents.OfType<FunctionCallContent>().Any())) 1918var hasArguments = executeToolActivity.Tags.Any(t => t.Key == "gen_ai.tool.call.arguments"); 1919var hasResult = executeToolActivity.Tags.Any(t => t.Key == "gen_ai.tool.call.result"); 2003var functionCallMessage = chat.First(m => m.Contents.Any(c => c is FunctionCallContent)); 2052Assert.Contains(response.Messages, m => m.Contents.Any(c => c is FunctionCallContent fcc && fcc.InformationalOnly)); 2053Assert.DoesNotContain(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent)); 2124Assert.Contains(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent frc && frc.CallId == "callId1")); 2125Assert.DoesNotContain(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent frc && frc.CallId == "callId2")); 2169Assert.Contains(response.Messages, m => m.Contents.Any(c => c is FunctionCallContent fcc && fcc.CallId == "callId1" && fcc.InformationalOnly)); 2172Assert.Contains(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent frc && frc.CallId == "callId1")); 2423Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionB result")); 2428Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionB result")); 2625.Any(frc => frc.Result?.ToString() == "Replacement FunctionB result")); 2627.Any(frc => frc.Result?.ToString() == "Original FunctionB result")); 2633.Any(frc => frc.Result?.ToString() == "Replacement FunctionB result")); 2635.Any(frc => frc.Result?.ToString() == "Original FunctionB result")); 2728.Any(frc => frc.Result?.ToString() == "FunctionB result")); 2730.Any(frc => frc.Result?.ToString() == "AdditionalTool result")); 2736.Any(frc => frc.Result?.ToString() == "FunctionB result")); 2738.Any(frc => frc.Result?.ToString() == "AdditionalTool result")); 2830.Any(frc => frc.Result?.ToString() == "Added version")); 2832.Any(frc => frc.Result?.ToString() == "AdditionalTool version")); 2838.Any(frc => frc.Result?.ToString() == "Added version")); 2840.Any(frc => frc.Result?.ToString() == "AdditionalTool version")); 3105Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionApprovalRequestContent>().Any(frc => frc.FunctionCall.Name == "FunctionB")); 3108Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionA result")); 3115Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionApprovalRequestContent>().Any(frc => frc.FunctionCall.Name == "FunctionB")); 3118Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionA result")); 3211Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionApprovalRequestContent>().Any(frc => frc.FunctionCall.Name == "FunctionB")); 3215.Any(frc => frc.Result?.ToString() == "Original FunctionB result")); 3222Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionApprovalRequestContent>().Any(frc => frc.FunctionCall.Name == "FunctionB")); 3226.Any(frc => frc.Result?.ToString() == "Original FunctionB result")); 3489m.Contents.Any(c => c is FunctionCallContent fcc2 && fcc2.CallId == "callId1" && fcc2.InformationalOnly)); 3493m.Contents.Any(c => c is FunctionResultContent frc2 && frc2.CallId == "callId1")); 3567m.Contents.Any(c => c is FunctionCallContent fcc2 && fcc2.CallId == "callId1" && fcc2.InformationalOnly)); 3571m.Contents.Any(c => c is FunctionResultContent frc2 && frc2.CallId == "callId2")); 3629m.Contents.Any(c => c is FunctionResultContent frc2 && frc2.CallId == "callId1"));
ChatReduction\SummarizingChatReducerTests.cs (8)
107Assert.DoesNotContain(msgs, m => m.Contents.Any(c => c is FunctionCallContent or FunctionResultContent or TestUserInputRequestContent or TestUserInputResponseContent)); 203Assert.DoesNotContain(msgList, m => m.Contents.Any(c => c is FunctionCallContent or FunctionResultContent or TestUserInputRequestContent or TestUserInputResponseContent)); 219Assert.Contains(resultList, m => m.Contents.Any(c => c is FunctionCallContent fc && fc.CallId == "call2")); 220Assert.Contains(resultList, m => m.Contents.Any(c => c is FunctionResultContent fr && fr.CallId == "call2")); 221Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is FunctionCallContent fc && fc.CallId == "call1")); 222Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is FunctionResultContent fr && fr.CallId == "call1")); 223Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is TestUserInputRequestContent)); 224Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is TestUserInputResponseContent));
Microsoft.Extensions.Configuration.Binder (2)
ConfigurationBinder.cs (2)
253if (constructorParameters is null || !constructorParameters.Any(p => p.Name == property.Name)) 569type.IsValueType || constructors.Any(ctor => ctor.GetParameters().Length == 0);
Microsoft.Extensions.DataIngestion.Tests (1)
IngestionPipelineTests.cs (1)
98.GetAsync(record => _sampleFiles.Any(info => info.FullName == (string)record["documentid"]!), top: 1000)
Microsoft.Extensions.DependencyInjection.AutoActivation (4)
AutoActivationExtensions.cs (2)
316if (services.Any(d => d.ServiceType == descriptor.ServiceType && d.ServiceKey == descriptor.ServiceKey)) 327if (services.Any(d => d.ServiceType == descriptor.ServiceType && d.ServiceKey == descriptor.ServiceKey))
AutoActivationExtensions.Keyed.cs (2)
351if (services.Any(d => d.ServiceType == descriptor.ServiceType && d.ServiceKey == descriptor.ServiceKey)) 362if (services.Any(d => d.ServiceType == descriptor.ServiceType && d.ServiceKey == descriptor.ServiceKey))
Microsoft.Extensions.Identity.Core (4)
PasswordValidator.cs (3)
56if (options.RequireDigit && !password.Any(IsDigit)) 61if (options.RequireLowercase && !password.Any(IsLower)) 66if (options.RequireUppercase && !password.Any(IsUpper))
UserValidator.cs (1)
62userName.Any(c => !manager.Options.User.AllowedUserNameCharacters.Contains(c)))
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Roslyn4.0.cs (1)
56.Any(m => m.IsStatic &&
Microsoft.Extensions.Options.SourceGeneration (4)
Parser.cs (1)
203.Any(m => m.Parameters.Length == NumValidationMethodArgs
ParserUtilities.cs (3)
38syntax.Modifiers.Any(m => m.IsKind(modifierToSearch))); 81if (type.GetMembers(propertyName).OfType<IPropertySymbol>().Any(property => 95if (interfaceType.GetMembers(propertyName).OfType<IPropertySymbol>().Any(property =>
Microsoft.Extensions.Resilience (1)
Resilience\ResilienceServiceCollectionExtensions.cs (1)
42if (services.Any(s => s.ServiceType == typeof(ResilienceMetricsEnricher)))
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\ParserUtilities.cs (1)
43syntax.Modifiers.Any(m => m.IsKind(modifierToSearch)));
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
54if (!type.Definitions.Any(def => def.Modifiers.Any(static token => token.IsKind(SyntaxKind.PartialKeyword))))
Microsoft.Gen.Logging (2)
Parsing\TypeSymbolExtensions.cs (1)
82if (current.GetMembers("ToString").Where(m => m.Kind == SymbolKind.Method && m.DeclaredAccessibility == Accessibility.Public).Cast<IMethodSymbol>().Any(m => m.Parameters.Length == 0))
src\Generators\Shared\ParserUtilities.cs (1)
43syntax.Modifiers.Any(m => m.IsKind(modifierToSearch)));
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Shared\ParserUtilities.cs (1)
43syntax.Modifiers.Any(m => m.IsKind(modifierToSearch)));
Microsoft.Gen.Metrics (1)
src\Generators\Shared\ParserUtilities.cs (1)
43syntax.Modifiers.Any(m => m.IsKind(modifierToSearch)));
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\ParserUtilities.cs (1)
43syntax.Modifiers.Any(m => m.IsKind(modifierToSearch)));
Microsoft.Interop.JavaScript.JSImportGenerator (2)
JSManagedTypeInfo.cs (2)
150if (argumentTypes.Any(x => x is null)) 161if (signatureTypes.Any(x => x is null))
Microsoft.Interop.SourceGeneration (1)
Marshalling\ElementsMarshalling.cs (1)
540if (stagesToGeneratePerElement.Any(stage => stage is StubIdentifierContext.Stage.Marshal or StubIdentifierContext.Stage.PinnedMarshal))
Microsoft.Maui (3)
Graphics\RectangleExtensions.cs (2)
26 => points.Any(x => rect.Contains(x)); 28 => points.Any(rect.Contains);
VisualDiagnostics\RectangleAdorner.cs (1)
62 if (model.MarginZones.Any(r => r.Contains(point)))
Microsoft.Maui.Controls (4)
DependencyResolver.cs (2)
62 if (type.GetTypeInfo().DeclaredConstructors.Any(info => info.GetParameters().Length == 2)) 68 if (type.GetTypeInfo().DeclaredConstructors.Any(info => info.GetParameters().Length == args.Length))
DependencyService.cs (1)
93 if (!DependencyTypes.Any(t => t.Type == type))
VisualStateManager.cs (1)
554 if (states.Any(state => string.IsNullOrEmpty(state.Name)))
Microsoft.Maui.Controls.Build.Tasks (9)
CompiledConverters\RDSourceTypeConverter.cs (1)
101 var hasDefaultCtor = resourceType.Methods.Any(md => md.IsConstructor && !md.HasParameters);
CreateObjectVisitor.cs (1)
161 pd.CustomAttributes.Any(
ModuleDefinitionExtensions.cs (1)
299 from.GetCustomAttributes().Any(ca =>
SetPropertiesVisitor.cs (4)
668 && propertyDef.CustomAttributes.Any(ca => ca.AttributeType.FullName == "Microsoft.Maui.Controls.Xaml.DoesNotInheritDataTypeAttribute"); 1240 var isObsolete = bpDef.CustomAttributes.Any(ca => ca.AttributeType.FullName == "System.ObsoleteAttribute"); 1607 var propertyIsObsolete = property.CustomAttributes.Any(ca => ca.AttributeType.FullName == "System.ObsoleteAttribute"); 1612 var propertySetterIsObsolete = propertySetter.CustomAttributes.Any(ca => ca.AttributeType.FullName == "System.ObsoleteAttribute");
TypeReferenceExtensions.cs (2)
141 if (typeDef.Interfaces.Any(tr => tr.InterfaceType.FullName == @interface.FullName)) 241 if (typeDef.Interfaces.Any(ir => ir.InterfaceType.ResolveGenericParameters(typeRef).InheritsFromOrImplements(cache, baseClass)))
Microsoft.Maui.Controls.DesignTools (3)
FlexEnumDesignTypeConverters.cs (1)
107 if (KnownValues.Any(v => value?.ToString()?.Equals(v, StringComparison.Ordinal) ?? false))
FontSizeDesignTypeConverter.cs (1)
17 if (KnownValues.Any(v => value?.ToString()?.Equals(v, StringComparison.Ordinal) ?? false))
KnownValuesDesignTypeConverter.cs (1)
32 return KnownValues.Any(v => value?.ToString()?.Equals(v, StringComparison.Ordinal) ?? false);
Microsoft.Maui.Controls.Maps (1)
Map.cs (1)
229 if (e.NewItems is not null && e.NewItems.Cast<Pin>().Any(pin => pin.Label is null))
Microsoft.Maui.Controls.Xaml (9)
ApplyPropertiesVisitor.cs (1)
168 && Context.Types[parentElement].GetRuntimeMethods().Any(mi => mi.Name == "Add" && mi.GetParameters().Length == 1))
CreateValuesVisitor.cs (5)
73 .DeclaredConstructors.Any( 76 ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof(ParameterAttribute)))) && 81 else if (!type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0) && 210 ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof(ParameterAttribute)))); 236 ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof(ParameterAttribute))));
XamlParser.cs (2)
199 return attributes.Any(kvp => kvp.Key == XmlName.xTypeArguments) 449 from.GetCustomAttributes<InternalsVisibleToAttribute>().Any(ca =>
XamlServiceProvider.cs (1)
339 && propertyInfo.CustomAttributes.Any(ca => ca.AttributeType == typeof(DoesNotInheritDataTypeAttribute)))
Microsoft.Maui.Essentials (1)
Share\Share.shared.cs (1)
143 if (request.Files.Any(file => file == null))
Microsoft.ML.AutoML (10)
AutoMLExperiment\IStopTrainingManager.cs (1)
135return _managers.Any(m => m.IsStopTrainingRequested());
ColumnInference\ColumnGroupingInference.cs (1)
99while (previousColumns.Any(x => x.SuggestedName == name))
ColumnInference\TextFileSample.cs (1)
294if (buffer.Take(sniffLim).Any(x => x == 0))
Experiment\Experiment.cs (1)
71if (_history.Any(r => r.RunSucceeded))
TrainerExtensions\BinaryTrainerExtensions.cs (2)
39if (!sweepParams.Any(p => p.Name == "NumberOfIterations")) 51if (sweepParams == null || !sweepParams.Any(p => p.Name != "NumberOfIterations"))
TransformInference\TransformInference.cs (2)
112obj.ColumnsConsumed.All(cc => ColumnsConsumed.Any(cc.Equals)) && 113obj.ColumnsProduced.All(cp => ColumnsProduced.Any(cp.Equals));
Tuner\AutoZeroTuner.cs (1)
85if (_pipelineStrings.Any(kv => kv.Value.Contains("OneHotHashEncoding") || kv.Value.Contains("OneHotEncoding")))
Utils\BestResultUtil.cs (1)
62results = results.Where(r => r.Results != null && r.Results.Any(x => x.ValidationMetrics != null));
Microsoft.ML.Benchmarks.Tests (1)
BenchmarksTest.cs (1)
69Assert.True(summary.Reports.All(r => r.ExecuteResults.Any(er => er.FoundExecutable && er.Results.Any())),
Microsoft.ML.CodeGenerator (1)
CodeGenerator\CSharp\TrainerGeneratorBase.cs (1)
44_hasAdvancedSettings = node.Properties.Keys.Any(t => !NamedParameters.ContainsKey(t));
Microsoft.ML.Core (4)
CommandLine\CmdParser.cs (1)
1700else if (Unique && val.Values.Any(x => x.Value.Equals(newValue)))
ComponentModel\ComponentCatalog.cs (2)
427if (Aliases != null && Aliases.Any(x => !IsValidName(x))) 900return aliases.Any(a => string.Equals(name, a, StringComparison.OrdinalIgnoreCase));
ComponentModel\LoadableClassAttribute.cs (1)
171if (loadNames.Any(s => string.IsNullOrWhiteSpace(s)))
Microsoft.ML.Data (22)
Data\SchemaDefinition.cs (1)
456if (dims != null && dims.Any(d => d < 0))
DataLoadSave\EstimatorChain.cs (1)
42Contracts.Assert((_host != null) == _needCacheAfter.Any(x => x));
DataLoadSave\LegacyCompositeDataLoader.cs (1)
152if (!string.IsNullOrEmpty(pair.Key) && composite._transforms.Any(x => x.Tag == pair.Key))
DataLoadSave\Text\TextLoader.cs (1)
720if (!needInputSize && col.Source.Any(r => r.AutoEnd && r.Max == null))
DataView\RowToRowMapperTransform.cs (2)
184if (_bindings.AddedColumnIndices.Any(predicate)) 207if (inputs.Length == 1 && n > 1 && _bindings.AddedColumnIndices.Any(predicate))
DataView\Transposer.cs (2)
877bool isActive = pred == null || Enumerable.Range(offset, splitter.OutputSchema.Count).Any(c => pred(c)); 1451bool hasZero = columnsNeeded != null && columnsNeeded.Any(x => x.Index == 0);
EntryPoints\EntryPointNode.cs (1)
642((JArray)pair.Value).Any(tok => VariableBinding.IsBindingToken(tok)))
EntryPoints\InputBuilder.cs (1)
96return aliases.Any(a => string.Equals(name, a, StringComparison.OrdinalIgnoreCase));
Model\Pfa\PfaContext.cs (2)
207public bool ContainsCell(string name) => _cellBlocks.Any(c => c.Name == name); 211public bool ContainsFunc(string name) => _funcBlocks.Any(b => b.Name == name);
Transforms\ColumnBindingsBase.cs (2)
205if (Source.Any(x => CmdQuoter.NeedsQuoting(x) || x.Contains(","))) 230if (Source.Any(x => CmdQuoter.NeedsQuoting(x) || x.Contains(",")))
Transforms\ColumnConcatenatingEstimator.cs (1)
59_host.CheckParam(!inputColumnNames.Any(r => string.IsNullOrEmpty(r)), nameof(inputColumnNames),
Transforms\ColumnConcatenatingTransformer.cs (1)
96if (Source == null || Source.Any(kvp => !string.IsNullOrEmpty(kvp.Key)))
Transforms\MetadataDispatcher.cs (4)
60Contracts.CheckParam(!getters.Any(g => g == null), nameof(getters), "Invalid getter info"); 364Contracts.CheckParam(!kindsSrc.Any(k => string.IsNullOrWhiteSpace(k)), nameof(kindsSrc)); 415if (_getters != null && _getters.Any(g => g.Kind == kind)) 431if (_getters != null && _getters.Any(g => g.Kind == kind))
Transforms\RowToRowTransformerBase.cs (1)
94if (disposers.Any(x => x != null))
Transforms\TransformBase.cs (1)
738Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c);
Microsoft.ML.Ensemble (2)
Trainer\EnsembleTrainerBase.cs (2)
103normalization: Trainers.Any(t => t.Info.NeedNormalization), 104calibration: Trainers.Any(t => t.Info.NeedCalibration));
Microsoft.ML.FastTree (5)
Dataset\Dataset.cs (3)
824if (partsDatas.Any(pd => pd.Data != null && pd.IsQueryLevel != isQuery)) 843if (arrays.Any(x => x != null && t != x.GetType().GetElementType())) 983Enumerable.Range(_dataset._flockToFirstFeature[f], _dataset._flocks[f].Count).Any(i => active[i]) ==
TreeEnsemble\InternalRegressionTree.cs (2)
109if (CategoricalSplit.Any(b => b)) 449if (CategoricalSplit.Any(x => x))
Microsoft.ML.GenAI.LLaMA (5)
Llama3_1ChatTemplateBuilder.cs (5)
23if (messages.Any(m => m.GetContent() is null)) 28if (messages.Any(m => m.GetRole() is null || availableRoles.Contains(m.GetRole()!.Value) == false)) 94if (messages.Any(m => m.Text is null)) 99if (messages.Any(m => availableRoles.Any(availableRole => availableRole == m.Role) == false))
Microsoft.ML.GenAI.Phi (5)
Phi3\Phi3ChatTemplateBuilder.cs (5)
28if (messages.Any(m => m.GetContent() is null)) 33if (messages.Any(m => m.GetRole() is null || availableRoles.Contains(m.GetRole()!.Value) == false)) 95if (messages.Any(m => m.Text is null)) 100if (messages.Any(m => availableRoles.Any(availableRole => availableRole == m.Role) == false))
Microsoft.ML.InternalCodeAnalyzer (2)
InstanceInitializerAnalyzer.cs (1)
72if (!syntax.ChildNodes().Any(s => s.IsKind(SyntaxKind.EqualsValueClause)))
NameAnalyzer.cs (1)
131return modifiers.Any(token => token.IsKind(SyntaxKind.ExternKeyword));
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
335using (var cursor = inputData.GetRowCursor(inputData.Schema.Where(c => cols.Any(col => c.Index == col))))
Microsoft.ML.OnnxTransformer (3)
OnnxTransform.cs (3)
555if (!inputShape.Any(x => x == 0)) 610return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col);
Microsoft.ML.Samples (2)
Dynamic\SimpleDataViewImplementation.cs (2)
175=> new Cursor(this, columnsNeeded.Any(c => c.Index == 0), 176columnsNeeded.Any(c => c.Index == 1));
Microsoft.ML.Sweeper (4)
Algorithms\Grid.cs (1)
94return previousRuns.Any(previousRun => previousRun.Equals(paramSet));
Algorithms\NelderMead.cs (3)
167if (previousRuns.Any(runResult => runResult.ParameterSet.Equals(_pendingSweeps[0].Key))) 217if (previousRuns.Any(runResult => runResult.ParameterSet.Equals(_pendingSweeps[0].Key))) 407if (previousRuns.Any(runResult => runResult.ParameterSet.Equals(newParameterSet)))
Microsoft.ML.TensorFlow (2)
TensorflowTransform.cs (2)
781return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col);
Microsoft.ML.TestFramework (2)
BaseTestPredictorsMaml.cs (2)
208if (ctx.Command == Cmd.CV && ctx.ExtraArgs != null && ctx.ExtraArgs.Any(arg => arg.Contains("opf+"))) 244if (removeArgs.Any(x => args[i].StartsWith(x)))
Microsoft.ML.TimeSeries (2)
SequentialTransformerBase.cs (2)
861if (_bindings.AddedColumnIndices.Any(predicate)) 887if (inputs.Length == 1 && n > 1 && _bindings.AddedColumnIndices.Any(predicate))
Microsoft.ML.TorchSharp (5)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
987return col => (activeOutput(0) || activeOutput(1) || activeOutput(2)) && _inputColIndices.Any(i => i == col);
NasBert\NerTrainer.cs (1)
439return col => activeOutput(0) && InputColIndices.Any(i => i == col);
NasBert\SentenceSimilarityTrainer.cs (1)
296return col => activeOutput(0) && InputColIndices.Any(i => i == col);
NasBert\TextClassificationTrainer.cs (1)
373return col => (activeOutput(0) || activeOutput(1)) && InputColIndices.Any(i => i == col);
Roberta\QATrainer.cs (1)
941return col => (activeOutput(0) || activeOutput(1)) && _inputColIndices.Any(i => i == col);
Microsoft.ML.Transforms (8)
CustomMappingTransformer.cs (2)
135if (!Enumerable.Range(0, result.Length).Any(activeOutput)) 179if (Enumerable.Range(0, _parent.AddedSchema.Columns.Length).Any(activeOutput))
ExpressionTransformer.cs (1)
982if (activeOutput(i) && _inputColumnIndices[i].Any(index => index == col))
StatefulCustomMappingTransformer.cs (2)
131Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 231Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c);
Text\NgramHashingTransformer.cs (2)
954Contracts.CheckParam(!inputColumnNames.Any(r => string.IsNullOrWhiteSpace(r)), nameof(inputColumnNames), 1022Contracts.CheckParam(!inputColumnNames.Any(r => string.IsNullOrWhiteSpace(r)), nameof(inputColumnNames),
Text\TextFeaturizingEstimator.cs (1)
420_host.CheckParam(!source.Any(string.IsNullOrWhiteSpace), nameof(source));
Microsoft.ML.Vision (2)
DnnRetrainTransform.cs (2)
948return col => Enumerable.Range(0, _parent._outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col);
Microsoft.NET.Build.Containers (1)
Tasks\ComputeDotnetBaseImageAndTag.cs (1)
81&& FrameworkReferences.Any(x => x.ItemSpec.Equals("Microsoft.AspNetCore.App", StringComparison.OrdinalIgnoreCase));
Microsoft.NET.Build.Tasks (21)
AddPackageType.cs (1)
41bool alreadyPresent = types.Any(t =>
CheckIfPackageReferenceShouldBeFrameworkReference.cs (1)
34if (!FrameworkReferences.Any(fr => fr.ItemSpec.Equals(FrameworkReferenceToUse, StringComparison.OrdinalIgnoreCase)))
LockFileExtensions.cs (1)
255&& !library.CompileTimeAssemblies.Any(f => f.IsPlaceholderFile());
ProduceContentAssets.cs (1)
163if (grouping.Any(t => t.GetMetadata(MetadataKeys.CodeLanguage) == projectLanguage))
ResolvePackageAssets.cs (2)
1541if (message.TargetGraphs is null || message.TargetGraphs.Count == 0 || message.TargetGraphs.Any(ForCurrentTargetFramework)) 1637_task.SatelliteResourceLanguages.Any(lang =>
ResolvePackageDependencies.cs (1)
214.Where(t => t.Libraries.Any(lib => lib.Name == package.Name));
ResolveRuntimePackAssets.cs (7)
66!additionalFrameworkReferences.Split(';').Any(afr => frameworkReferenceNames.Contains(afr))) 86if (FrameworkReferences?.Any(fxReference => fxReference.ItemSpec == "Microsoft.Windows.SDK.NET.Ref.Windows") == true) 91if (FrameworkReferences?.Any(fxReference => fxReference.ItemSpec == "Microsoft.Windows.SDK.NET.Ref.Xaml") == true) 96if (FrameworkReferences?.Any(fxReference => fxReference.ItemSpec == "Microsoft.Windows.SDK.NET.Ref.CsWinRT3.Windows") == true) 101if (FrameworkReferences?.Any(fxReference => fxReference.ItemSpec == "Microsoft.Windows.SDK.NET.Ref.CsWinRT3.Xaml") == true) 191if (profileAttributeValue == null || !assemblyProfiles.Any(p => profiles.Contains(p))) 225!SatelliteResourceLanguages.Any(lang => string.Equals(lang.ItemSpec, culture, StringComparison.OrdinalIgnoreCase)))
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (4)
524.Where(p => !expandedWorkloads.Any(w => w.Packs.Contains(p))) 536.Where(w => w.Packs.Any(p => requestedPacks.Contains(p))) 587if (!existingPacks.SetEquals(updatedPacks) || existingPacks.Any(p => PackHasChanged(_packs[p].pack, advertisingManifestResolver._packs[p].pack))) 737w.workload.Platforms == null || w.workload.Platforms.Count == 0 || w.workload.Platforms.Any(platform => _currentRuntimeIdentifiers.Contains(platform)));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSuggestionFinder.cs (2)
52if (workload.expandedPacks.Any(e => requestedPacks.Contains(e))) 199private static int ContainsExperimental(HashSet<WorkloadId> set) => set.Any(w => w.ToString().Contains("experimental")) ? 1 : 0;
WriteAppConfigWithSupportedRuntime.cs (1)
84&& startupNode.Nodes().OfType<XElement>().Any(e => e.Name.LocalName == "supportedRuntime");
Microsoft.NET.HostModel (2)
Bundle\Bundler.cs (1)
471if (fileSpecs.Any(x => !x.IsValid()))
Bundle\Manifest.cs (1)
205return Files.Any(entry => relativePath.Equals(entry.RelativePath));
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (1)
GenerateBlazorWebAssemblyBootJson50.cs (1)
171return LazyLoadedAssemblies != null && LazyLoadedAssemblies.Any(a => a.ItemSpec == fileName);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
JSModules\ApplyJsModules.cs (1)
61if (RazorComponents.Any(rc => string.Equals(rc.ItemSpec, kvp.Key, StringComparison.OrdinalIgnoreCase)))
ScopedCss\ApplyCssScopes.cs (1)
64if (RazorComponents.Any(rc => string.Equals(rc.ItemSpec, kvp.Key, StringComparison.OrdinalIgnoreCase)))
Microsoft.NET.Sdk.WorkloadManifestReader (6)
WorkloadResolver.cs (4)
524.Where(p => !expandedWorkloads.Any(w => w.Packs.Contains(p))) 536.Where(w => w.Packs.Any(p => requestedPacks.Contains(p))) 587if (!existingPacks.SetEquals(updatedPacks) || existingPacks.Any(p => PackHasChanged(_packs[p].pack, advertisingManifestResolver._packs[p].pack))) 737w.workload.Platforms == null || w.workload.Platforms.Count == 0 || w.workload.Platforms.Any(platform => _currentRuntimeIdentifiers.Contains(platform)));
WorkloadSuggestionFinder.cs (2)
52if (workload.expandedPacks.Any(e => requestedPacks.Contains(e))) 199private static int ContainsExperimental(HashSet<WorkloadId> set) => set.Any(w => w.ToString().Contains("experimental")) ? 1 : 0;
Microsoft.SourceLink.AzureDevOpsServer.Git (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.AzureRepos.Git (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.Bitbucket.Git (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.Common (1)
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.Gitea (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.Gitee (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.GitHub (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.GitLab (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.SourceLink.GitWeb (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
64hostUris.Any(h => isMatchingHostUri(h, uri)))
src\sourcelink\src\Common\Utilities\UriUtilities.cs (1)
66return !parts.Any(part => part.Length == 0);
Microsoft.TemplateEngine.Cli (54)
ChoiceTemplateParameter.cs (1)
191if (parsedValues.Count > 1 && parsedValues.Any(string.IsNullOrEmpty))
Commands\BaseCommand.cs (2)
122if (!availableTemplates.Any(t => t.ShortNameList.Any(sn => string.Equals(sn, usedCommandAlias, StringComparison.OrdinalIgnoreCase))))
Commands\create\InstantiateCommand.cs (2)
278if (!templates.Any(t => string.IsNullOrWhiteSpace(t.GetLanguage())) 287if (!templates.Any(t => string.IsNullOrWhiteSpace(t.GetTemplateType()))
Commands\create\InstantiateCommand.NoMatchHandling.cs (4)
32template.InvalidTemplateOptions.Any(x => x.Equals(option)))) 47template.InvalidTemplateOptions.Any(x => x.Equals(option)) 49|| template.InvalidTemplateOptions.Any(x => x.ErrorKind == InvalidTemplateOptionResult.Kind.InvalidName && x.InputFormat == option.InputFormat))) 133if (!matchInfos.Any(mi => mi.IsTemplateMatch))
Commands\create\InstantiateCommand.TabCompletion.cs (2)
30templateGroups.Where(t => t.ShortNames.Any(sn => sn.StartsWith(templateName, StringComparison.OrdinalIgnoreCase))); 120if (templateGroups.Any(template => template.ShortNames.Contains(instantiateArgs.ShortName)))
Commands\create\TemplateCommand.cs (2)
99if (template.BaselineInfo.Any(b => !string.IsNullOrWhiteSpace(b.Key))) 321if (parametersWithAliasAssignments.Any(p => p.Errors.Any()))
Commands\Example.cs (2)
102return new(currentCommand, commandParts.Add(option.Name).AddRange(args.Select(a => a.Any(char.IsWhiteSpace) ? $"'{a}'" : a))); 120=> new(currentCommand, commandParts.AddRange(args.Select(a => a.Any(char.IsWhiteSpace) ? $"'{a}'" : a)));
Commands\GlobalArgs.cs (1)
25HasHelpOption = parseResult.CommandResult.Children.Any(child => child is OptionResult optionResult && optionResult.Option is HelpOption);
Commands\install\InstallCommandArgs.cs (1)
22if (installCommand is LegacyInstallCommand && (TemplatePackages.Contains(installCommand.Name) || installCommand.Aliases.Any(alias => TemplatePackages.Contains(alias))))
Commands\NewCommand.cs (1)
36if (templateGroups.Any(template => template.ShortNames.Contains(instantiateCommandArgs.ShortName)))
Commands\uninstall\UninstallCommandArgs.cs (1)
18if (uninstallCommand is LegacyUninstallCommand && (TemplatePackages.Contains(uninstallCommand.Name) || uninstallCommand.Aliases.Any(alias => TemplatePackages.Contains(alias))))
HostSpecificTemplateData.cs (1)
236if (value.UsageExamples != null && value.UsageExamples.Any(e => !string.IsNullOrWhiteSpace(e)))
TabularOutput\TabularOutput.cs (2)
110if (_columns.Any(x => !string.IsNullOrEmpty(x.Header))) 250if (!_columns.Any(col => col.ShrinkIfNeeded) || maxRowWidth < maxAllowedGridWidth)
TemplatePackageCoordinator.cs (4)
294if (checkUpdateResults.Any(result => !result.Success)) 307if (updatesToApply.Any(update => update.TemplatePackage is null || update.LatestVersion is null)) 809return templates.Any(template => 888if (defaultSources.Any(s => s.Source.Equals(source, StringComparison.OrdinalIgnoreCase)))
TemplatePackageDisplay.cs (3)
283if (versionCheckResults.Any(result => result.Success && !result.IsLatestVersion) && showUpdates) 323if (versionCheckResults.Any(result => !result.Success)) 398var restrictedTemplates = evaluationResult.Where(r => r.Result.Any(cr => cr.EvaluationStatus != TemplateConstraintResult.Status.Allowed));
TemplateResolution\CliFilters.cs (1)
107if (templateLanguages.Any(lang => string.IsNullOrWhiteSpace(lang)))
TemplateResolution\TemplateGroupMatchInfo.cs (3)
175private bool IsGroupTemplateInfoMatch => _isTemplateMatchEvaluated && _templateMatchInfos.Any(template => TemplateInfoMatch(template)); 177private bool IsGroupTemplateParametersMatch => _isTemplateParameterMatchEvaluated && _templateMatchInfos.Any(template => TemplateParametersMatch(template)); 208if (groupMatchDispositions.Any(x => x.Kind == MatchKind.Mismatch))
TemplateResolution\TemplateMatchInfoExtensions.cs (6)
37if (otherMatches.Any(mi => mi.Kind == MatchKind.Mismatch || mi.Kind == MatchKind.InvalidName || mi.Kind == MatchKind.InvalidValue)) 42return constraintsMatches.Any(mi => mi.Kind == MatchKind.Mismatch); 52var filterMatches = templateMatchInfo.MatchDisposition.Where(mi => supportedFilters.Any(f => f == mi.Name)); 53var otherMatches = templateMatchInfo.MatchDisposition.Where(mi => !supportedFilters.Any(f => f == mi.Name)); 59if (otherMatches.Any(mi => mi.Kind == MatchKind.Mismatch || mi.Kind == MatchKind.InvalidName || mi.Kind == MatchKind.InvalidValue)) 64return filterMatches.Any(mi => mi.Kind == MatchKind.Mismatch);
TemplateResolution\TemplateResolutionResult.cs (13)
217internal bool HasLanguageMismatch => _matchedTemplateGroups.Any(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.All(mi => mi.HasLanguageMismatch())); 222internal bool HasTypeMismatch => _matchedTemplateGroups.Any(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.Any(mi => mi.HasTypeMismatch())); 227internal bool HasBaselineMismatch => _matchedTemplateGroups.Any(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.Any(mi => mi.HasBaselineMismatch())); 232internal bool HasAuthorMismatch => _matchedTemplateGroups.Any(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.Any(mi => mi.HasAuthorMismatch())); 237internal bool HasClassificationMismatch => _matchedTemplateGroups.Any(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.Any(mi => mi.HasClassificationMismatch())); 247internal int ContraintsMismatchGroupCount => _matchedTemplateGroups.Count(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.Any(mi => mi.HasMismatchOnConstraints())); 252internal int ListFilterMismatchGroupCount => _matchedTemplateGroups.Count(groupMatchInfo => groupMatchInfo.TemplateMatchInfos.Any(mi => mi.HasMismatchOnListFilters())); 292templateMatchInfo.MatchDisposition.Any( 354if (!_matchInformation.Any(groupMatchInfo => groupMatchInfo.IsGroupMatch && groupMatchInfo.IsGroupAndTemplateInfoMatch))
TemplateSearch\CliHostSearchCacheData.cs (1)
29if (_hostDataPropertyNames.Any(keys.Contains))
TemplateSearch\CliTemplateSearchCoordinator.cs (1)
158&& hit.MatchedTemplates.Any(t => t.Author == "Microsoft"))
Microsoft.TemplateEngine.Core (1)
VariableCollection.cs (1)
30if (values.Values.Any(o => o is null))
Microsoft.TemplateEngine.Edge (15)
Constraints\SdkVersionConstraintFactory.cs (1)
69supportedSdks.Any(supported => supported.CheckIfVersionIsValid(installed.ToString())))));
Constraints\WorkloadConstraintFactory.cs (1)
61bool isSupportedWorkload = supportedWorkloads.Any(_installedWorkloads.Contains);
Installers\NuGet\NugetApiPackageManager.cs (2)
259if (!foundPackagesBySource.Any(result => result.FoundPackages != null)) 472if (defaultSources.Any(s => s.Source.Equals(source, StringComparison.OrdinalIgnoreCase)))
Settings\FilteredTemplateInfo.cs (6)
22public bool IsMatch => MatchDisposition.Count > 0 && !MatchDisposition.Any(x => x.Kind == MatchKind.Mismatch); 26public bool IsPartialMatch => MatchDisposition.Any(x => x.Kind != MatchKind.Mismatch) 31public bool HasParameterMismatch => MatchDisposition.Any(x => x.Location == MatchLocation.OtherParameter && x.Kind != MatchKind.Exact); 33public bool IsParameterMatch => !HasParameterMismatch && MatchDisposition.Any(x => x.Location == MatchLocation.OtherParameter); 35public bool HasInvalidParameterValue => MatchDisposition.Any(x => x.Location == MatchLocation.OtherParameter && x.Kind == MatchKind.InvalidParameterValue); 37public bool HasAmbiguousParameterMatch => !HasInvalidParameterValue && MatchDisposition.Any(x => x.Location == MatchLocation.OtherParameter && x.Kind == MatchKind.AmbiguousParameterValue);
Settings\TemplateInfo.cs (1)
42if (shortNames.Any(string.IsNullOrWhiteSpace))
Settings\TemplateMatchInfo.cs (1)
48public bool IsPartialMatch => MatchDisposition.Any(x => x.Kind != MatchKind.Mismatch);
Template\InputDataSetExtensions.cs (1)
51return inputData.ParameterDefinitionSet.Any(p =>
TemplateConstraintManager.cs (1)
162if (tasksToWait.Any(t => !t.IsCompleted))
ValidationUtils.cs (1)
122if (!errors.Any(e => e.Severity == severity))
Microsoft.TemplateEngine.Utils (23)
EnumerableExtensions.cs (1)
22return sequence.GroupBy(x => x, comparer).Any(g => g.Count() > 1);
Glob.cs (1)
21_isNameOnlyMatch = canBeNameOnlyMatch && !_matchers.Any(x => x is PathMatcher || x is ExactPathMatcher || (x as LiteralMatcher)?.Char?.FirstOrDefault() == '/');
TemplateMatchInfoExtensions.cs (20)
18return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Name && (x.Kind == MatchKind.Exact || x.Kind == MatchKind.Partial)); 26return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Name && x.Kind == MatchKind.Exact); 34return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Name && x.Kind == MatchKind.Partial); 42return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Name && x.Kind == MatchKind.Mismatch); 50return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.ShortName && (x.Kind == MatchKind.Exact || x.Kind == MatchKind.Partial)); 58return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.ShortName && x.Kind == MatchKind.Exact); 66return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.ShortName && x.Kind == MatchKind.Partial); 74return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.ShortName && x.Kind == MatchKind.Mismatch); 82return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Type && x.Kind == MatchKind.Exact); 90return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Type && x.Kind == MatchKind.Mismatch); 98return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Classification && x.Kind == MatchKind.Exact); 106return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Classification && x.Kind == MatchKind.Mismatch); 114return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Language && x.Kind == MatchKind.Exact); 122return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Language && x.Kind == MatchKind.Mismatch); 130return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Baseline && x.Kind == MatchKind.Exact); 138return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Baseline && x.Kind == MatchKind.Mismatch); 146return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Author && (x.Kind == MatchKind.Exact || x.Kind == MatchKind.Partial)); // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "Author" 154return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Author && x.Kind == MatchKind.Exact); // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "Author" 162return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Author && x.Kind == MatchKind.Partial); // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "Author" 170return templateMatchInfo.MatchDisposition.Any(x => x.Name == MatchInfo.BuiltIn.Author && x.Kind == MatchKind.Mismatch); // CodeQL [cs/campaign/constantine] False Positive: CodeQL wrongly detected "Author"
WellKnownSearchFilters.cs (1)
25t => t.MatchDisposition.Any(x => x.Kind is MatchKind.Exact or MatchKind.Partial);
Microsoft.TestPlatform.CoreUtilities (1)
Helpers\FileHelper.cs (1)
59file => endsWithSearchPatterns.Any(
Microsoft.TestPlatform.CrossPlatEngine (2)
AttachmentsProcessing\TestRunAttachmentsProcessingManager.cs (1)
148var attachmentsToBeProcessed = attachments.Where(dataCollectionAttachment => attachmentProcessorUris.Any(uri => uri.Equals(dataCollectionAttachment.Uri))).ToArray();
DataCollection\ProxyDataCollectionManager.cs (1)
391if (enabledDataCollectors.Any(dcSettings => string.Equals(dcSettings.FriendlyName, settings.FriendlyName, StringComparison.OrdinalIgnoreCase)))
Microsoft.TestPlatform.Filter.Source (1)
FastFilter.cs (1)
108matched = values?.Any(result => result != null && FilterProperties[name].Contains(result)) == true;
Microsoft.TestUtilities (1)
XUnit\EnvironmentVariableConditionAttribute.cs (1)
67var hasMatched = Values.Any(value => string.Equals(value, _currentValue, StringComparison.OrdinalIgnoreCase));
Microsoft.VisualStudio.TestPlatform.Common (4)
DataCollection\DataCollectionManager.cs (1)
577if (runEnabledDataCollectors.Any(dcSettings => string.Equals(dcSettings.FriendlyName, settings.FriendlyName, StringComparison.OrdinalIgnoreCase)))
DataCollection\DataCollectionTelemetryManager.cs (2)
76dataCollectorInformation.TestExecutionEnvironmentVariables.Any(pair => pair.Key.StartsWith(ClrIeInstrumentationMethodConfigurationPrefix32Variable)) && 77dataCollectorInformation.TestExecutionEnvironmentVariables.Any(pair => pair.Key.StartsWith(ClrIeInstrumentationMethodConfigurationPrefix64Variable)))
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FastFilter.cs (1)
108matched = values?.Any(result => result != null && FilterProperties[name].Contains(result)) == true;
Microsoft.VisualStudio.TestPlatform.ObjectModel (17)
DataCollector\DataCollectionRunSettings.cs (1)
74return DataCollectorSettingsList.Any(setting => setting.IsEnabled);
Nuget.Frameworks\CompatibilityProvider.cs (2)
155return targetFrameworks.Count() <= candidateFrameworks.Count() && targetFrameworks.All(f => candidateFrameworks.Any(ff => IsCompatible(f, ff))); 170if (targetSet.Any(framework => IsCompatibleWithTargetCore(framework, currentCandidate)))
Nuget.Frameworks\FrameworkReducer.cs (14)
74if (possibleFrameworks.Any(e => e != NuGetFramework.UnsupportedFramework)) 93if (reduced.Count() > 1 && reduced.Any(f => NuGetFrameworkNameComparer.Instance.Equals(f, framework))) 115if (reduced.Any(f => f.IsPCL) 116&& reduced.Any(f => !f.IsPCL)) 144&& reduced.Any(f => f.IsPackageBased) 145&& reduced.Any(f => !f.IsPackageBased)) 156&& !reduced.Any(f => f.IsPCL)) 172&& reduced.Any(f => f.HasProfile) 173&& reduced.Any(f => !f.HasProfile)) 183if (!isNet6Era || reduced.Any(f => NuGetFrameworkNameComparer.Instance.Equals(framework, f) && f.Version.Major >= 6)) 188else if (isNet6Era && reduced.Any(f => 272if (frameworks.Any(e => e != NuGetFramework.AnyFramework)) 292if (frameworks.Any(e => e == NuGetFramework.AnyFramework)) 501currentFrameworks.Any(consideringFramework => StringComparer.OrdinalIgnoreCase.Equals(f, consideringFramework.Framework)));
Mono.Cecil.Rocks (1)
Mono.Cecil.Rocks\DocCommentId.cs (1)
135 return methodDefinition.GenericParameters.Any (i => i.Name == genericParameter.Name);
MSBuild (3)
src\msbuild\src\Shared\TypeLoader.cs (1)
638bool hasSystemRuntime = assembly.GetReferencedAssemblies().Any(a => string.Equals(a.Name, SystemRuntimeAssemblyName, StringComparison.OrdinalIgnoreCase));
XMake.cs (2)
2326var isLoggerThatRequiresTaskInputsConfigured = loggers.Any(l => l is TerminalLogger || l is BinaryLogger); 2621return automatedEnvironmentVariables.Any(envVar => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(envVar)));
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1093bool hasPackageReferenceItems = tfms.Values.Any(p => p.GetItems("PackageReference").Any());
NuGet.CommandLine.XPlat (18)
Commands\Package\Update\PackageUpdateCommandRunner.cs (3)
150.Where(id => packages is null || packages.Count == 0 || packages.Any(p => string.Equals(p.Id, id, StringComparison.OrdinalIgnoreCase))) 156.Where(l => l.Type == "package" && (packages is null || packages.Count == 0 || packages.Any(p => string.Equals(p.Id, l.Name, StringComparison.OrdinalIgnoreCase)))) 161.Where(d => d.LibraryRange.TypeConstraint == LibraryDependencyTarget.Package && (packages is null || packages.Count == 0 || packages.Any(p => string.Equals(p.Id, d.Name, StringComparison.OrdinalIgnoreCase))))
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (4)
83listPackageArgs.Renderer.GetProblems().Any(p => p.ProblemType == ProblemType.Error) 84|| listPackageReportModel.Projects.Where(p => p.ProjectProblems != null).SelectMany(p => p.ProjectProblems).Any(p => p.ProblemType == ProblemType.Error)) 373return packages.Any(p => p.TopLevelPackages.Any() || 427int maxParallel = listPackageArgs.PackageSources.Any(s => s.IsHttp)
Commands\Signing\SignCommand.cs (1)
152argument.Values.Any<string>(packagePath => string.IsNullOrEmpty(packagePath)))
Commands\Signing\VerifyCommand.cs (1)
83argument.Values.Any<string>(packagePath => string.IsNullOrEmpty(packagePath)))
Commands\Why\DependencyGraphFinder.cs (1)
55&& !userInputFrameworks.Any(f => string.Equals(targetAlias, f, StringComparison.OrdinalIgnoreCase)))
ListPackage\ListPackageConsoleRenderer.cs (4)
55if (_problems?.Any(p => p.ProblemType == ProblemType.Error) == true) 75if (listPackageReportModel.Projects.Any(p => p.AutoReferenceFound)) 99if (project.ProjectProblems?.Any(p => p.ProblemType == ProblemType.Error) == true) 110bool printPackages = project.TargetFrameworkPackages.Any(p => p.TopLevelPackages?.Any() == true ||
Program.cs (1)
82if (args.Any(arg => string.Equals(arg, CommandConstants.ForceEnglishOutputOption, StringComparison.OrdinalIgnoreCase)))
Utility\MSBuildAPIUtility.cs (2)
530.Where(itemGroupElement => itemGroupElement.Items.Any(item => item.ItemType == itemType))? 756userFrameworkInputs.Any(f => string.Equals(f, tfm.TargetAlias, StringComparison.OrdinalIgnoreCase))).ToList();
Utility\ProjectPackagesPrintUtility.cs (1)
90tableHasAutoReference = frameworkPackages.Any(p => p.AutoReference);
NuGet.Commands (19)
CommandRunners\PackCommandRunner.cs (2)
149if (collectorLogger.Errors.Any(e => e.Level == LogLevel.Error)) 988if (list.Any(r => r.Name == dependency.Name))
MSBuildProjectFactory.cs (1)
158if (!Files.Any(p => packageFile.Target.Equals(p.Target, StringComparison.CurrentCultureIgnoreCase)))
PackagesLockFileBuilder.cs (1)
43libraries = target.Libraries.Where(lib => !onlyTFM.Libraries.Any(tfmLib => tfmLib.Equals(lib)));
RestoreCommand\Diagnostics\UnresolvedMessages.cs (2)
215return versions.Any(e => e.IsPrerelease && range.Satisfies(e)) 216&& !versions.Any(e => !e.IsPrerelease && range.Satisfies(e));
RestoreCommand\ProjectRestoreCommand.cs (1)
98var hasNonEmptyRIDs = frameworkRuntimePairs.Any(
RestoreCommand\RestoreCommand.cs (2)
299if (checkResults.Any(r => !r.Success)) 751telemetry.TelemetryEvent[AnyPackageIdContainsNonAlphanumericDotDashOrUnderscoreCharacters] = graphs.Where(g => !g.InConflict).SelectMany(g => g.Flattened).Any(i => HasNonAlphanumericDotDashOrUnderscoreCharacters(i.Key.Name));
RestoreCommand\RestoreSummary.cs (1)
172if (installed.Any(i => i.Value > 0))
RestoreCommand\Utility\AuditUtility.cs (2)
222if (graph.Flattened.Any(r => r.Key.Type == LibraryType.Package)) 432currentProject?.Data.Dependencies.Any(d => string.Equals(d.Name, packageIdentity.Id, StringComparison.OrdinalIgnoreCase)) == true)
RestoreCommand\Utility\LockFileUtils.cs (2)
879return group?.Any(item => !item.Path.EndsWith(PackagingCoreConstants.ForwardSlashEmptyFolder, StringComparison.Ordinal)) == true; 1072if (!lockFileLib.Build.Any(item => item.Path.StartsWith("buildTransitive/", StringComparison.OrdinalIgnoreCase)))
RestoreCommand\Utility\MSBuildRestoreUtility.cs (1)
390&& (values?.Any(e => !StringComparer.OrdinalIgnoreCase.Equals(e, Clear)) == true);
RestoreCommand\Utility\PackageSpecFactory.cs (1)
199bool hasPackageReferenceItems = project.TargetFrameworks.Values.Any(p => p.GetItems("PackageReference").Any());
RestoreCommand\Utility\ToolRestoreUtility.cs (1)
136.OrderBy(e => e.Request.Project.TargetFrameworks.Any(f => f.FrameworkName is FallbackFramework) ? 1 : 0)
VerifyCommand\VerifyCommandRunner.cs (2)
135if (logMessages.Any(m => m.Level >= LogLevel.Warning)) 167return args.Verifications.Any(verification => verification == Verification.All || verification == v);
NuGet.Common (3)
AuthTypeFilteredCredentials.cs (1)
42return authType == null || !AuthTypes.Any() || AuthTypes.Any(x => StringComparer.OrdinalIgnoreCase.Equals(x, authType))
PathUtil\PathResolver.cs (1)
31return filters.Any(f => f.IsMatch(path));
RuntimeEnvironmentHelper.cs (1)
32return VisualStudioProcesses.Any(
NuGet.Configuration (6)
PackageSource\PackageSourceProvider.cs (2)
211var sourceMatching = loadedPackageSources.Any(p => p.Source.Equals(packageSource.Source, StringComparison.OrdinalIgnoreCase)); 212var feedNameMatching = loadedPackageSources.Any(p => p.Name.Equals(packageSource.Name, StringComparison.OrdinalIgnoreCase));
Proxy\WebProxy.cs (1)
74return _regExBypassList.Any(r => r.IsMatch(normalizedUri));
Settings\ConfigurationDefaults.cs (1)
71bool isEnabled = !disabledPackageSources.Any(p => p.Key.Equals(source.Key, StringComparison.OrdinalIgnoreCase));
Settings\Settings.cs (1)
472.Where(file => OrderedSettingsFileNames.Any(fileName => fileName.Equals(file.Name, comparer)));
Utility\SettingsUtility.cs (1)
423if (!allSources.Any(s => s.IsEnabled && s.Name.Equals(source, StringComparison.OrdinalIgnoreCase)))
NuGet.DependencyResolver.Core (1)
GraphModel\GraphOperations.cs (1)
862.Any(p => p.Disposition != Disposition.Rejected && !(tracker.IsDisputed(p.Item) || tracker.IsAmbiguous(p.Item)));
NuGet.Frameworks (16)
CompatibilityProvider.cs (2)
155return targetFrameworks.Count() <= candidateFrameworks.Count() && targetFrameworks.All(f => candidateFrameworks.Any(ff => IsCompatible(f, ff))); 170if (targetSet.Any(framework => IsCompatibleWithTargetCore(framework, currentCandidate)))
FrameworkReducer.cs (14)
74if (possibleFrameworks.Any(e => e != NuGetFramework.UnsupportedFramework)) 93if (reduced.Count() > 1 && reduced.Any(f => NuGetFrameworkNameComparer.Instance.Equals(f, framework))) 115if (reduced.Any(f => f.IsPCL) 116&& reduced.Any(f => !f.IsPCL)) 144&& reduced.Any(f => f.IsPackageBased) 145&& reduced.Any(f => !f.IsPackageBased)) 156&& !reduced.Any(f => f.IsPCL)) 172&& reduced.Any(f => f.HasProfile) 173&& reduced.Any(f => !f.HasProfile)) 183if (!isNet6Era || reduced.Any(f => NuGetFrameworkNameComparer.Instance.Equals(framework, f) && f.Version.Major >= 6)) 188else if (isNet6Era && reduced.Any(f => 272if (frameworks.Any(e => e != NuGetFramework.AnyFramework)) 292if (frameworks.Any(e => e == NuGetFramework.AnyFramework)) 501currentFrameworks.Any(consideringFramework => StringComparer.OrdinalIgnoreCase.Equals(f, consideringFramework.Framework)));
NuGet.PackageManagement (14)
IDE\PackageRestoreManager.cs (1)
71missing = packages.Any(p => p.IsMissing);
NuGetPackageManager.cs (4)
1104var includePrereleaseInGather = resolutionContext.IncludePrerelease || (projectInstalledPackageReferences.Any(p => (p.PackageIdentity.HasVersion && p.PackageIdentity.Version.IsPrerelease))); 1432newListOfInstalledPackages.Any(newPackage => 1802if (oldListOfInstalledPackages.Any(p => p.Equals(packageIdentity))) 3730var packageExistsInAnotherNuGetProject = (await otherNuGetProject.GetInstalledPackagesAsync(token)).Any(pr => pr.PackageIdentity.Equals(packageIdentity));
Resolution\GatherCacheResult.cs (1)
26if (Packages.Any(package => package == null))
Resolution\GatherExceptionHelpers.cs (1)
60if (packagesForId.Any() && !packagesForId.Any(package => configEntry.AllowedVersions.Satisfies(package.Version)))
Resolution\ResolverGather.cs (4)
216if (!combinedResults.Any(package => string.Equals(package.Id, targetId, StringComparison.OrdinalIgnoreCase))) 334package => package.Dependencies.Any(dependency => idsSearched.Contains(dependency.Id))) 632if (!_primaryResources.Any(sourceResource => sourceResource.Source.PackageSource.Equals(source))) 649if (!_allResources.Any(sourceResource => sourceResource.Source.PackageSource.Equals(source)))
Utility\PackageGraphAnalysisUtilities.cs (1)
85if (packageDependencyInfo.Dependencies.Any(d => package.Id == d.Id && package.Version == d.VersionRange.MinVersion))
Utility\UriHelper.cs (1)
86return packageSourceProvider.LoadPackageSources().Any(s => IsHttpSource(s.Source));
Utility\XElementExtensions.cs (1)
200return element.Nodes().Any(node => node.NodeType == XmlNodeType.Comment &&
NuGet.Packaging (28)
Core\FrameworkSpecificGroup.cs (1)
40HasEmptyFolder = items.Any(item => item.EndsWith(PackagingCoreConstants.ForwardSlashEmptyFolder,
PackageCreation\Authoring\ManifestMetadata.cs (1)
322if ((Authors == null || !Authors.Any(author => !String.IsNullOrEmpty(author))) && !PackageTypes.Contains(PackageType.SymbolsPackage))
PackageCreation\Authoring\ManifestVersionUtility.cs (2)
28metadata.PackageAssemblyReferences.Any(r => r.TargetFramework != null && r.TargetFramework.IsSpecificFramework)) || 35metadata.DependencyGroups.Any(d => d.TargetFramework != null && d.TargetFramework.IsSpecificFramework))
PackageCreation\Authoring\PackageBuilder.cs (7)
455bool hasContentOrTool = files.Any( 467bool hasEmptyLibFolder = files.Any( 477return contentFiles.Any(file => 484return dependencyGroups.Any(dependencyGroup => 486.Any(dependency => dependency.Include != null || dependency.Exclude != null)); 491return contentFiles.Any(file => 1112return PackagingConstants.Folders.Known.Any(folder =>
PackageCreation\Extensions\XElementExtensions.cs (1)
122return element.Nodes().Any(node => node.NodeType == XmlNodeType.Comment &&
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (1)
106set.Packages.Any(dependency => dependency.Exclude.Count > 0 || dependency.Include.Count > 0),
PackageExtraction\PackageHelper.cs (1)
68return !ExcludePaths.Any(p =>
PackageExtractor.cs (1)
1123if (collectorLogger.Errors.Any(e => e.Level >= LogLevel.Error))
PackageReaderBase.cs (2)
209if (group.Items.Any(e => !IsAllowedBuildFile(id, e))) 297if (referenceGroup.Items.Any(s => StringComparer.OrdinalIgnoreCase.Equals(s, file)))
Rules\ContentFolderInPackageReferenceProjectRule.cs (2)
26.Any(t => t.StartsWith 32.Any(t => t.StartsWith
Rules\UpholdBuildConventionRule.cs (1)
77if (!extension.Any(file => string.Equals(expectedFileName, file, StringComparison.OrdinalIgnoreCase)))
Signing\Archive\SignedPackageArchiveUtility.cs (2)
215return extraFields.Any(extraField => extraField is Zip64ExtendedInformationExtraField); 225return extraFields.Any(extraField => extraField is Zip64ExtendedInformationExtraField);
Signing\Authoring\RepositorySignPackageRequest.cs (1)
77if (packageOwners.Any(packageOwner => string.IsNullOrWhiteSpace(packageOwner)))
Signing\Signatures\NuGetPackageOwners.cs (1)
28if (packageOwners.Any(packageOwner => string.IsNullOrWhiteSpace(packageOwner)))
Signing\TrustStore\CertificateBundleX509ChainFactory.cs (1)
83if (root.ChainElementStatus.Any(status => status.Status.HasFlag(X509ChainStatusFlags.UntrustedRoot)) &&
Signing\Utility\AttributeUtility.cs (1)
160if (packageOwners.Any(packageOwner => string.IsNullOrWhiteSpace(packageOwner)))
Signing\Utility\CertificateUtility.cs (1)
357if (chain.ChainStatus.Any(
Signing\Utility\SignatureUtility.cs (1)
671if (chain.ChainStatus.Any(chainStatus =>
NuGet.ProjectModel (2)
DependencyGraphSpec.cs (1)
95if (closure.Any(e => StringComparer.OrdinalIgnoreCase.Equals(
PackageSpecOperations.cs (1)
102if (spec.TargetFrameworks.Any(tf => tf.Dependencies.Any(library => IsMatchingDependencyName(library, packageId))))
NuGet.Protocol (5)
LegacyFeed\V2FeedPackageInfo.cs (1)
303if (!deps.Any(p => string.Equals(p.Id, dependencyId, StringComparison.OrdinalIgnoreCase)))
LocalRepositories\LocalPackageSearchResource.cs (1)
142if (!versions.Any(v => v.Version == package.Identity.Version))
Plugins\PluginPackageReader.cs (2)
622if (group.Items.Any(e => !IsAllowedBuildFile(id, e))) 857if (referenceGroup.Items.Any(s => StringComparer.OrdinalIgnoreCase.Equals(s, file)))
Utility\OfflineFeedUtility.cs (1)
89if (invalidPathChars.Any(p => path.Contains(p, StringComparison.Ordinal)))
NuGet.Resolver (5)
PackageResolver.cs (1)
41if (!context.AvailablePackages.Any(p => StringComparer.OrdinalIgnoreCase.Equals(p.Id, requiredId)))
ResolverUtility.cs (4)
131if (!availablePackages.Any(package => StringComparer.OrdinalIgnoreCase.Equals(problemPackageId, package.Id)) || 229!availablePackages.Where(p => StringComparer.OrdinalIgnoreCase.Equals(p.Id, dependency.Id)).Any(p => IsDependencySatisfied(dependency, p)))) 307while (level < 20 && !walkedPackages.Any(package => StringComparer.OrdinalIgnoreCase.Equals(package.Id, packageId))) 339dependencies.All(d => result.Any(r => StringComparer.OrdinalIgnoreCase.Equals(r.Id, d.Id)));
NuGet.Versioning (3)
VersionRangeFactory.cs (3)
477if (!versionRanges.Any() || versionRanges.Any(range => !HasValidRange(range))) 487var excludeLowest = versionRanges.Any(range => range.HasLowerBound && 495var excludeHighest = versionRanges.Any(range => range.HasUpperBound &&
Pipelines.AppHost (2)
AppHost.cs (2)
50mounts.Any(m => m.Type == ContainerMountType.BindMount)) 232mounts.Any(m => m.Type == ContainerMountType.BindMount))
PresentationFramework (1)
MS\Internal\WindowsRuntime\Generated\WinRT\GuidGenerator.cs (1)
72var isFlags = type.CustomAttributes.Any(cad => cad.AttributeType == typeof(FlagsAttribute));
Qdrant.ApiService (1)
Program.cs (1)
22if (collections.Any(x => x.Contains("movie_collection")))
QuarantineTools.Tests (7)
ActiveIssueTests.cs (2)
419if (list.Attributes.Any(IsActiveIssueAttribute)) 441bool lastEndsWithNewline = last.GetTrailingTrivia().Any(t => t.IsKind(SyntaxKind.EndOfLineTrivia));
artifacts\obj\QuarantineTools.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
QuarantineScriptTests.cs (4)
146bool anyQuarantinedLeft = newRoot.DescendantNodes().OfType<AttributeSyntax>().Any(IsQuarantinedAttribute); 363if (list.Attributes.Any(IsQuarantinedAttribute)) 385bool lastEndsWithNewline = last.GetTrailingTrivia().Any(t => t.IsKind(SyntaxKind.EndOfLineTrivia)); 416if (root.Usings.Any(u => u.Name != null && u.Name.ToString() == namespaceName))
RepoTasks (5)
src\aspnetcore\src\Shared\CertificateGeneration\CertificateManager.cs (2)
212.Any(e => string.Equals(oid, e.Oid?.Value, StringComparison.Ordinal)); 963if (!request.CertificateExtensions.Any(ext => ext.Oid?.Value is SubjectKeyIdentifierOid or AuthorityKeyIdentifierOid))
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (1)
301return hashes.Any(h => string.Equals(h, certificate.Thumbprint, StringComparison.Ordinal));
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
371var isCertDirIncluded = existingDirs.Any(dir =>
src\aspnetcore\src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
123.Any(c => AreCertificatesEqual(c, certificate));
Roslyn.Diagnostics.Analyzers (36)
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (3)
67var appliedExportAttributes = exportAttributes.Where(e => namedTypeAttributes.Any(ad => ad.AttributeClass.DerivesFrom(e))).ToList(); 83if (appliedMetadataAttributes.Any(ad => badNamespaces.Contains(ad.AttributeClass.ContainingNamespace)) && 84!appliedMetadataAttributes.Any(ad => goodNamespaces.Contains(ad.AttributeClass.ContainingNamespace)))
ImportingConstructorShouldBeObsolete.cs (1)
82if (!exportAttributes.Any(ad => ad.AttributeClass.DerivesFrom(exportAttribute)))
PartsExportedWithMEFv2MustBeMarkedAsShared.cs (1)
62!namedTypeAttributes.Any(ad => ad.AttributeClass.Name == "SharedAttribute" &&
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (3)
840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 843=> sequence.Any(predicate); 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/>
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
69return symbol.GetMembers(WellKnownMemberNames.ObjectEquals).OfType<IMethodSymbol>().Any(m => m.IsObjectEqualsOverride());
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
20=> propertySymbol.ContainingType.GetMembers().OfType<IFieldSymbol>().Any(f => f.IsImplicitlyDeclared && propertySymbol.Equals(f.AssociatedSymbol));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
133.Any(method => method.HasDisposeSignatureByConvention());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageResult.cs (1)
41=> SymbolWritesMap.Values.Any(value => !value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
290if (list.Any(o => o != null && o.TextSpan.Contains(position)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
94if (operations.Any(o => o.TextSpan.Contains(span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\RefactoringHelpers\AbstractRefactoringHelpers.cs (1)
201if (nextToken != default && !commaToken.TrailingTrivia.Any(t => t.RawKind == syntaxKinds.EndOfLineTrivia))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (2)
247=> list.Any(syntaxFacts.IsPreprocessorDirective); 887=> node.ChildNodes().Any(c => c.RawKind == syntaxFacts.SyntaxKinds.GlobalStatement);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions.cs (8)
700return getAwaiters.Any(VerifyGetAwaiter); 716if (!returnType.GetMembers().OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.IsCompleted, Type.SpecialType: SpecialType.System_Boolean, GetMethod: not null })) 730if (!methods.Any(x => x is { Name: WellKnownMemberNames.OnCompleted, ReturnsVoid: true, Parameters: [{ Type.TypeKind: TypeKind.Delegate }] })) 734return methods.Any(m => m.Name == WellKnownMemberNames.GetResult && !m.Parameters.Any()); 755if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 761if (!members.OfType<IMethodSymbol>().Any(x => 795if (!members.OfType<IPropertySymbol>().Any(p => p is { Name: WellKnownMemberNames.CurrentPropertyName, GetMethod: not null })) 804if (!members.OfType<IMethodSymbol>().Any(x => x.Name == WellKnownMemberNames.MoveNextAsyncMethodName))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
414.Any(m => m.Parameters.Any());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
134return availableIndices != null && availableIndices.Any(b => b);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IMethodSymbolExtensions.cs (1)
173=> arg.removeAttributeTypes.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\IPropertySymbolExtensions.cs (1)
70=> arg.attributesToRemove.Any(attr => attr.Equals(a.AttributeClass)) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AbstractAddImportsService.cs (5)
43private bool HasAliases(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsAlias); 44private bool HasUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsSimpleUsing); 45private bool HasStaticUsings(SyntaxNode node) => GetUsingsAndAliases(node).Any(IsStaticUsing); 75if (GetUsingsAndAliases(node).Any(u => IsEquivalentImport(u, import))) 80if (GetExterns(node).Any(u => IsEquivalentImport(u, import)))
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
159namedType.GetBaseTypesAndThis().Any(b => SymbolTypesWithExpectedSymbolDeclaredEvent.Contains(b.Name, StringComparer.Ordinal)))
TestExportsShouldNotBeDiscoverable.cs (1)
85if (!namedTypeAttributes.Any(ad =>
Roslyn.Diagnostics.CSharp.Analyzers (38)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
182if (parentExpression.GetDiagnostics().Any(d => d.Severity == DiagnosticSeverity.Error))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArrowExpressionClauseSyntaxExtensions.cs (2)
43if (arrowExpression.ArrowToken.TrailingTrivia.Any(t => t.IsSingleOrMultiLineComment())) 46if (arrowExpression.ArrowToken.LeadingTrivia.Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
118if (parsed.GetDiagnostics().Any(static d => d.Severity == DiagnosticSeverity.Error)) 217expression = firstStatement.GetLeadingTrivia().Any(t => t.IsDirective || t.IsSingleOrMultiLineComment())
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
860if (expression.GetLeadingTrivia().Any(t => t.IsDirective)) 880if (expression.GetLeadingTrivia().Any(t => t.IsSingleOrMultiLineComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ILocalSymbolExtensions.cs (1)
45return typeParameters.HasValue && typeParameters.Value.Any(typeParameter => typeParameter.Identifier.ValueText == name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
88if (nodeParent.GetRequiredParent().ChildNodes().OfType<ArgumentSyntax>().Any(a => a.Expression.IsKind(opposite)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
331return node.GetAncestors<MemberDeclarationSyntax>().Any( 451=> node.DescendantNodes(n => n == node || !n.IsReturnableConstruct()).Any(n => n is YieldStatementSyntax); 605var hasLeadingDirective = node.GetLeadingTrivia().Any(t => SyntaxFacts.IsPreprocessorDirective(t.Kind())); 902var hasTrailingComments = from.GetTrailingTrivia().Any(t => t.IsRegularComment());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
478=> node.Ancestors().Any(n => n.Kind() is
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
108this.SemanticRootOfOriginalExpression.GetAncestors().Any(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
266.Any(n =>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
44if (!firstUsing.GetLeadingTrivia().Any(t => t.IsEndOfLine())) 57!currentUsing.GetLeadingTrivia().Any(t => t.IsEndOfLine()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
42if (globalStatements.Any(g => firstTypeOrNamespaceDecl.SpanStart < g.SpanStart))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
254if (!info.Context.GenerateDocumentationComments || node.GetLeadingTrivia().Any(t => t.IsDocComment()))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CompilationUnitSyntaxExtensions.cs (2)
150if (root.Usings[i].GetLeadingTrivia().Any(trivia => trivia.IsKind(SyntaxKind.IfDirectiveTrivia))) 155if (root.Usings[i].GetLeadingTrivia().Any(trivia => trivia.IsKind(SyntaxKind.EndIfDirectiveTrivia)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (4)
504targetToken.GetAncestors<StatementSyntax>().Any(s => s.IsKind(SyntaxKind.UnsafeStatement)) || 505targetToken.GetAncestors<MemberDeclarationSyntax>().Any(m => m.GetModifiers().Any(SyntaxKind.UnsafeKeyword) || 506targetToken.GetAncestors<LocalFunctionStatementSyntax>().Any(f => f.GetModifiers().Any(SyntaxKind.UnsafeKeyword))) || 507targetToken.GetAncestors<UsingDirectiveSyntax>().Any(d => d.UnsafeKeyword.IsKind(SyntaxKind.UnsafeKeyword));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
1714=> tuple.Arguments.Any(a => a.NameColon != null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
97if (reference.GetSyntax().ChildTokens().Any(t => t.IsKind(SyntaxKind.UnsafeKeyword)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
47if (unnecessaryImports == null || unnecessaryImports.Any(import => import.OverlapsHiddenPosition(cancellationToken)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
126=> trivia.Any(t => !t.IsWhitespaceOrEndOfLine());
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
48if (localDeclarationStatement.Declaration.Variables.Any(IsDiscardDeclaration))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (7)
334if (types.Any(t => t is INamedTypeSymbol)) 499if (methods.Any(IsEnumHasFlag)) 610invocationTypes.Any(t => Compilation.ClassifyConversion(m.ReturnType, t).IsImplicit)).ToList(); 1467if (types.Any(t => t is IArrayTypeSymbol)) 1477if (types.Any(t => t is IArrayTypeSymbol)) 1486if (types.Any(t => t is INamedTypeSymbol)) 1509if (types.Any(t => t is INamedTypeSymbol))
rzc (1)
DefaultExtensionDependencyChecker.cs (1)
75if (_ignoredAssemblies.Any(n => reference.Name.StartsWith(n, StringComparison.Ordinal)))
sdk-tasks (3)
EnvironmentVariableFilter.cs (1)
42.Where(e => _prefixesOfEnvironmentVariablesToRemove.Any(p => e.StartsWith(p)));
ExtractArchiveToDirectory.cs (1)
200private bool ShouldExtractItem(string path) => DirectoriesToCopy?.Any(p => path.StartsWith(p.ItemSpec)) ?? false;
GenerateMSBuildExtensionsSWR.cs (1)
46if (files.Any(f => !Path.GetFileName(f).Equals("_._")))
SuperFileCheck (4)
Program.cs (4)
290return !x.Token.Parent.Ancestors().Any(p => p.IsKind(SyntaxKind.MethodDeclaration) && p.Span.Contains(x.Span)); 327if (!checkPrefixes.Any(x => prefix.EndsWith(x))) 454return args.Any(x => x.Contains("-h")); 683var hasInputFile = args.Any(x => x.Equals(CommandLineInputFile));
System.CommandLine (5)
Help\HelpBuilder.cs (3)
135displayOptionTitle = parentCommand.Options.Any(x => x.Recursive && !x.Hidden); 146var hasCommandWithHelp = command.Subcommands.Any(x => !x.Hidden); 153displayOptionTitle = displayOptionTitle || (command.Options.Any(x => !x.Hidden));
Parsing\ParseDiagramAction.cs (1)
59if (parseResult.Errors.Any(e => e.SymbolResult == symbolResult))
VersionOption.cs (1)
54parent.Children.Any(r =>
System.CommandLine.StaticCompletions (5)
shells\FishShellProvider.cs (2)
213var hasAnyValueOptions = states.Any(s => 214s.cmd.HierarchicalOptions().Any(o => !o.Hidden && !o.IsFlag()));
shells\PowershellShellProvider.cs (1)
215if (command.Arguments.Any(argument => argument.IsDynamic))
shells\ZshShellProvider.cs (2)
138if (command.Subcommands.Any(c => !c.Hidden)) 350if (staticCompletions.Any(c => c.InsertText is not null || c.Detail is not null || c.Documentation is not null))
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (1)
799if (changedExports.Any(import.IsConstraintSatisfiedBy))
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
558return part.ImportDefinitions.Any(import => import.IsRecomposable);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
351return ExportDefinitions.Any(definition =>
System.Composition.TypedParts (5)
System\Composition\CompositionContextExtensions.cs (1)
73m.CustomAttributes.Any(ca => ca.AttributeType == typeof(OnImportsSatisfiedAttribute)));
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
34where attrs.Any(a => a is ImportAttribute || a is ImportManyAttribute)
System\Composition\TypedParts\ContractHelpers.cs (1)
19if (attributes.Any(a => a is ImportAttribute || a is ImportManyAttribute))
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (1)
236if (_appliedArguments.Any(args => Enumerable.SequenceEqual(args, typeArguments)))
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (1)
67if (!forKey.Any(x => x.Metadata.Any()))
System.Linq.Expressions (1)
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
1060if (method != null && method.GetParametersCached().Any(p => p.ParameterType.IsByRef))
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\ClassDataContract.cs (1)
1468return !dataMembers.Any(dm => dm.IsRequired);
System.Private.Windows.Core.TestUtilities (2)
BinarySerialization.cs (2)
33if (!attributes.Any(a => a is SerializableAttribute)) 45if (attributes.Any(a => a is CompilerGeneratedAttribute))
System.Security.Cryptography.Pkcs (1)
System\Security\Cryptography\Pkcs\SignedCms.cs (1)
481else if (_signedData.SignerInfos.Any(si => si.Version == 3))
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Emitter.cs (2)
1252Debug.Assert(paramCount > 0 || parameters.Any(p => p.RefKind == RefKind.Out)); 1472bool hasRefOrRefReadonlyParams = parameters.Any(p => p.RefKind == RefKind.Ref || p.RefKind == RefKindRefReadOnlyParameter);
System.Text.RegularExpressions.Generator (3)
UpgradeToGeneratedRegexCodeFixer.cs (3)
132if (!GetAllMembers(typeSymbol).Any(m => m.Name == memberName)) 367typeDeclaration.Modifiers.Any(m => m.IsKind(SyntaxKind.PartialKeyword)) ? 531if (descendant.Ancestors().TakeWhile(a => a != declSyntax).Any(a =>
System.Windows.Forms (6)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (2)
343|| _annualBoldDates.Any(d => d.Month == currentDate.Month && d.Day == currentDate.Day) 344|| _monthlyBoldDates.Any(d => d.Day == currentDate.Day);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (4)
769.Any(c => c?.BoundPage is not null)) 815if (_buttons.Any(e => e.IsCreatable && !e.IsStandardButton && IsNativeStringNullOrEmpty(e.Text))) 820if (_radioButtons.Any(e => e.IsCreatable && IsNativeStringNullOrEmpty(e.Text))) 929if (_boundCustomButtons.Any(e => e.IsCreated && e is TaskDialogCommandLinkButton))
System.Windows.Forms.Analyzers.CodeFixes.CSharp (2)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (2)
70.Any(a => a.Name.ToString() == DesignerSerializationVisibilityAttributeName)) 103.Any(u => u?.Name?.ToString() == SystemComponentModelName))
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\ImplementITypedDataObject\ImplementITypedDataObjectAnalyzer.cs (1)
41.Any(assembly => assembly.Name == "System.Windows.Forms"))
System.Windows.Forms.Design (1)
System\ComponentModel\Design\ExceptionCollection.cs (1)
20if (exceptions.ToArray().Any(e => e is not Exception))
Testing.Tests (1)
artifacts\obj\Testing.Tests\Debug\net8.0\XunitAutoGeneratedEntryPoint.cs (1)
10 if (global::System.Linq.Enumerable.Any(args, arg => arg == "-automated" || arg == "@@"))
tlens (2)
TLens.Analyzers\DuplicatedCodeAnalyzer.cs (1)
31if (method.HasParameters && method.Parameters.Any(l => l.Name == str))
TLens.Analyzers\UnusedParametersAnalyzer.cs (1)
25if (method.HasCustomAttributes && method.CustomAttributes.Any(l => l.AttributeType.Name == "IntrinsicAttribute"))
vstest.console (7)
CommandLine\Executor.cs (4)
122var isDiag = args != null && args.Any(arg => arg.StartsWith("--diag", StringComparison.OrdinalIgnoreCase)); 142if (args == null || args.Length == 0 || args.Any(StringUtils.IsNullOrWhiteSpace)) 261if (processors.Any(i => i.Metadata.Value.CommandName == processor.Metadata.Value.CommandName)) 369var isActionIncluded = argumentProcessors.Any((processor) => processor.Metadata.Value.IsAction);
Processors\EnableBlameArgumentProcessor.cs (3)
143var hasCollectDumpKey = blameArgumentList.Any(isDumpCollect); 144var hasCollectHangDumpKey = blameArgumentList.Any(isHangDumpCollect); 145var hasMonitorPostmortemDebugger = blameArgumentList.Any(isMonitorPostmortemDebugger);
vstest.console.arm64 (7)
src\vstest\src\vstest.console\CommandLine\Executor.cs (4)
122var isDiag = args != null && args.Any(arg => arg.StartsWith("--diag", StringComparison.OrdinalIgnoreCase)); 142if (args == null || args.Length == 0 || args.Any(StringUtils.IsNullOrWhiteSpace)) 261if (processors.Any(i => i.Metadata.Value.CommandName == processor.Metadata.Value.CommandName)) 369var isActionIncluded = argumentProcessors.Any((processor) => processor.Metadata.Value.IsAction);
src\vstest\src\vstest.console\Processors\EnableBlameArgumentProcessor.cs (3)
143var hasCollectDumpKey = blameArgumentList.Any(isDumpCollect); 144var hasCollectHangDumpKey = blameArgumentList.Any(isHangDumpCollect); 145var hasMonitorPostmortemDebugger = blameArgumentList.Any(isMonitorPostmortemDebugger);