3666 references to Func
aspire (20)
Backchannel\AppHostCliBackchannel.cs (1)
153Func<JsonRpc, CancellationToken, Task<IAsyncEnumerable<T>>> startStream,
Commands\BaseCommand.cs (1)
75SetAction((Func<ParseResult, CancellationToken, Task<int>>)(async (parseResult, cancellationToken) =>
Commands\RootCommand.cs (1)
203this.SetAction((Func<ParseResult, CancellationToken, Task<int>>)((context, cancellationToken) =>
Commands\TemplateCommand.cs (2)
11private readonly Func<ParseResult, CancellationToken, Task<CommandResult>> _executeCallback; 15public TemplateCommand(ITemplate template, Func<ParseResult, CancellationToken, Task<CommandResult>> executeCallback, CommonCommandServices services)
Diagnostics\FileLoggerProvider.cs (1)
226public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
DotNet\DotNetSdkInstaller.cs (2)
16private readonly Func<string, string, ProcessStartInfo> _createProcessStartInfo = CreateProcessStartInfo; 18internal DotNetSdkInstaller(IConfiguration configuration, IEnvironment environment, Func<string, string, ProcessStartInfo> createProcessStartInfo)
Interaction\SpectreConsoleLoggerProvider.cs (1)
44public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
src\Shared\SearchTextParser.cs (1)
363public static bool MatchesAllFragments<TState>(string[] fragments, TState state, Func<TState, string, bool> matchesFragment)
Templating\CallbackTemplate.cs (2)
11Func<CliExecutionContext, string, string> pathDeriverCallback, 31public Func<CliExecutionContext, string, string> PathDeriver => pathDeriverCallback;
Templating\CliTemplateFactory.cs (1)
251private async Task<string?> ResolveOutputPathAsync(TemplateInputs inputs, Func<CliExecutionContext, string, string> pathDeriver, string projectName, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Templating\DotNetTemplateFactory.cs (4)
412private async Task<TemplateResult> ApplySingleFileTemplate(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 439private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 457private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, TemplateInputs inputs, string name, string outputPath, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 608private async Task<string?> GetOutputPathAsync(TemplateInputs inputs, Func<CliExecutionContext, string, string> pathDeriver, string projectName, ParseResult parseResult, CancellationToken cancellationToken)
Templating\ITemplate.cs (1)
41Func<CliExecutionContext, string, string> PathDeriver { get; }
Utils\EnvironmentChecker\DcpKubeconfig.cs (1)
23internal static async Task<DcpKubeconfig> ReadFileWithRetryAsync(string path, Func<TimeSpan, CancellationToken, Task>? delayAsync = null, CancellationToken cancellationToken = default)
Utils\ProcessCaptureRunner.cs (1)
24Func<Process, CancellationToken, Task<TCapture>> captureAsync,
Aspire.Cli.Tests (43)
Commands\InitCommandTests.cs (1)
2178public Func<ScaffoldContext, CancellationToken, Task<bool>>? ScaffoldAsyncCallback { get; set; }
Commands\UpdateCommandTests.cs (1)
3558public Func<UpdatePackagesContext, CancellationToken, Task<ProjectUpdateResult>>? UpdateProjectAsyncCallback { get; set; }
DotNetSdkInstallerTests.cs (1)
305Func<string, string, ProcessStartInfo>? createProcessStartInfo = null)
ProfileCaptureServiceTests.cs (1)
548private static TestProcessExecution CreateStartedProcess(Func<ProcessInvocationOptions, CancellationToken, Task<int>> waitForExitAsync)
Projects\DotNetAppHostProjectTests.cs (1)
4303public Func<FileInfo, CancellationToken, Task<AppHostProjectInfo>>? GetAppHostInfoAsyncCallback { get; init; }
Telemetry\InternalMicrosoftDetectorTests.cs (1)
638private sealed class TestGitHubHttpMessageHandler(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> sendAsync) : HttpMessageHandler
tests\Shared\Logging\TestLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\Logging\TestLoggerT.cs (1)
30Func<TState, Exception?, string> formatter)
tests\Shared\Logging\WriteContext.cs (1)
16public Func<object?, Exception?, string>? Formatter { get; set; }
tests\Shared\Logging\XunitLoggerProvider.cs (1)
60LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
TestServices\CapturingLogger.cs (1)
18public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
TestServices\TestAppHostAuxiliaryBackchannel.cs (3)
69public Func<bool, CancellationToken, IAsyncEnumerable<ResourceSnapshot>>? WatchResourceSnapshotsHandler { get; set; } 81public Func<GetConsoleLogsRequest, CancellationToken, IAsyncEnumerable<ResourceLogLine>>? GetConsoleLogsHandler { get; set; } 87public Func<GetConsoleLogsRequest, CancellationToken, IAsyncEnumerable<ResourceLogBatch>>? GetConsoleLogBatchesHandler { get; set; }
TestServices\TestAppHostCliBackchannel.cs (2)
25public Func<string, CancellationToken, Task>? ConnectAsyncCallback { get; set; } 35public Func<string?, CancellationToken, Task<GetPipelineStepsResponse>>? GetPipelineStepsAsyncCallback { get; set; }
TestServices\TestAppHostProjectFactory.cs (5)
30public Func<FileInfo, CancellationToken, Task<string?>>? GetAspireHostingVersionAsyncCallback { get; set; } 35public Func<FileInfo, CancellationToken, Task<AppHostValidationResult>>? ValidateAppHostAsyncCallback { get; set; } 37public Func<AppHostProjectContext, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 39public Func<AddPackageContext, CancellationToken, Task<bool>>? AddPackageAsyncCallback { get; set; } 41public Func<UpdatePackagesContext, CancellationToken, Task<UpdatePackagesResult>>? UpdatePackagesAsyncCallback { get; set; }
TestServices\TestAppHostServerProjectFactory.cs (1)
10public Func<string, CancellationToken, Task<IAppHostServerProject>>? CreateAsyncCallback { get; set; }
TestServices\TestCliDownloader.cs (1)
20public Func<string, CancellationToken, Task<string>>? DownloadLatestCliAsyncCallback { get; set; }
TestServices\TestCliUpdateNotifier.cs (2)
14public Func<DirectoryInfo, CancellationToken, Task<CliVersionStatus>>? GetVersionStatusAsyncCallback { get; set; } 16public Func<DirectoryInfo, CancellationToken, Task>? CheckForCliUpdatesAsyncCallback { get; set; }
TestServices\TestConfigurationService.cs (1)
60public Func<string, DirectoryInfo, string?>? OnGetConfigurationFromDirectory { get; set; }
TestServices\TestExtensionBackchannel.cs (5)
17public Func<string, string, Task>? DisplayMessageAsyncCallback { get; set; } 32public Func<string, string, Task>? DisplayIncompatibleVersionErrorAsyncCallback { get; set; } 51public Func<string, bool, Task<bool>>? ConfirmAsyncCallback { get; set; } 66public Func<LogLevel, string, Task>? LogMessageAsyncCallback { get; set; } 72public Func<string, CancellationToken, Task<bool>>? HasCapabilityAsyncCallback { get; set; }
TestServices\TestExtensionInteractionService.cs (3)
26public Func<string, bool, bool>? ConfirmCallback { get; set; } 28public Func<string, IReadOnlyList<string>, string>? SelectionCallback { get; set; } 29public Func<IRenderable, Func<Action<IRenderable>, Task>, Task>? DisplayLiveAsyncCallback { get; set; }
TestServices\TestGitRepository.cs (1)
12public Func<DirectoryInfo, CancellationToken, Task<IReadOnlySet<string>?>>? GetIncludedFilesAsyncCallback { get; set; }
TestServices\TestInteractionService.cs (1)
26public Func<string, bool, bool>? ConfirmCallback { get; set; }
TestServices\TestNewCommandPrompter.cs (1)
20public Func<string, Func<string, ValidationResult>?, string>? PromptForOutputPathWithValidatorCallback { get; set; }
TestServices\TestProcessExecutionFactory.cs (4)
41public Func<int, ProcessInvocationOptions, (int ExitCode, string? Stdout)>? AttemptCallback { get; set; } 105var attemptCallback = AttemptCallback; 198public Func<ProcessInvocationOptions, CancellationToken, Task<int>>? WaitForExitAsyncCallback { get; init; } 346Func<int, ProcessInvocationOptions, (int ExitCode, string? Stdout)> attemptCallback,
TestServices\TestScaffoldingService.cs (1)
10public Func<ScaffoldContext, CancellationToken, Task<bool>>? ScaffoldAsyncCallback { get; set; }
TestServices\TestTypeScriptStarterProjectFactory.cs (1)
50public Func<AddPackageContext, CancellationToken, Task<bool>>? AddPackageAsyncCallback { get; set; }
Aspire.Dashboard (26)
Components\Controls\ResourceActions.razor.cs (1)
39public required Func<ResourceViewModel, CommandViewModel, bool> IsCommandExecuting { get; set; }
Components\Controls\ResourceDetails.razor.cs (2)
41public required Func<ResourceViewModel, CommandViewModel, bool> IsCommandExecuting { get; set; } 228["OnExecuteCommandAsync"] = (Func<ResourceViewModel, CommandViewModel, Task>)ExecuteResourceCommandAsync,
Components\Controls\SelectResourceOptions.razor.cs (1)
18public required Func<TValue, bool, Task> OnValueVisibilityChangedAsync { get; set; }
Model\Interaction\InteractionsInputsDialogViewModel.cs (1)
17public required Func<WatchInteractionsResponseUpdate, bool, Task> OnSubmitCallback { get; init; }
Model\Otlp\TelemetryFilter.cs (9)
102private static Func<string?, string, bool> ConditionToFuncString(FilterCondition c) => 119private static Func<DateTime, DateTime, bool> ConditionToFuncDate(FilterCondition c) => 133private static Func<double, double, bool> ConditionToFuncNumber(FilterCondition c) => 162var func = ConditionToFuncNumber(condition); 188var func = ConditionToFuncNumber(condition); 206var func = ConditionToFuncNumber(Condition); 217var func = ConditionToFuncDate(Condition); 224var func = ConditionToFuncNumber(Condition); 231var func = ConditionToFuncString(Condition);
Model\ResourceMenuBuilder.cs (2)
66Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting, 255private void AddCommandMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource, EventCallback<CommandViewModel> commandSelected, Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting)
Model\TraceHelpers.cs (2)
16public static void VisitSpans<TState>(OtlpTrace trace, Func<OtlpSpan, TState, TState> spanAction, TState state) 44static void Visit(Dictionary<OtlpSpan, List<OtlpSpan>> spanLookup, OtlpSpan span, Func<OtlpSpan, TState, TState> spanAction, TState state, Func<OtlpSpan, DateTime> orderByFunc)
Model\TraceLinkHelpers.cs (1)
20Func<string, string, OtlpSpan?> getSpan,
ServiceClient\DashboardClient.cs (1)
449private async Task WatchWithRecoveryAsync(Func<RetryContext, CancellationToken, Task<RetryResult>> action, string actionName, CancellationToken cancellationToken)
src\Shared\SearchTextParser.cs (1)
363public static bool MatchesAllFragments<TState>(string[] fragments, TState state, Func<TState, string, bool> matchesFragment)
Telemetry\DashboardTelemetrySender.cs (3)
18private readonly Channel<(OperationContext, Func<HttpClient, Func<OperationContextProperty, object>, Task>)> _channel; 38_channel = Channel.CreateBounded<(OperationContext, Func<HttpClient, Func<OperationContextProperty, object>, Task>)>(channelOptions); 162public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
Telemetry\IDashboardTelemetrySender.cs (1)
12public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc);
Telemetry\TelemetryLoggerProvider.cs (1)
44public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Dashboard.Components.Tests (8)
tests\Shared\Logging\TestLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\Logging\TestLoggerT.cs (1)
30Func<TState, Exception?, string> formatter)
tests\Shared\Logging\WriteContext.cs (1)
16public Func<object?, Exception?, string>? Formatter { get; set; }
tests\Shared\Logging\XunitLoggerProvider.cs (1)
60LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\TestDashboardTelemetrySender.cs (1)
21public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
tests\Shared\TestDialogService.cs (3)
11private readonly Func<object, DialogParameters, Task<IDialogReference>>? _onShowDialog; 13public TestDialogService(Func<object, DialogParameters, Task<IDialogReference>>? onShowDialog = null) 22public event Func<string, DialogParameters, Task<IDialogReference?>>? OnUpdateAsync;
Aspire.Dashboard.Tests (10)
Telemetry\DashboardTelemetrySenderTests.cs (2)
156private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _value; 158public TestHttpMessageHandler(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> value)
tests\Shared\Logging\TestLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\Logging\TestLoggerT.cs (1)
30Func<TState, Exception?, string> formatter)
tests\Shared\Logging\WriteContext.cs (1)
16public Func<object?, Exception?, string>? Formatter { get; set; }
tests\Shared\Logging\XunitLoggerProvider.cs (1)
60LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\TestDashboardTelemetrySender.cs (1)
21public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
tests\Shared\TestDialogService.cs (3)
11private readonly Func<object, DialogParameters, Task<IDialogReference>>? _onShowDialog; 13public TestDialogService(Func<object, DialogParameters, Task<IDialogReference>>? onShowDialog = null) 22public event Func<string, DialogParameters, Task<IDialogReference?>>? OnUpdateAsync;
Aspire.Hosting (38)
ApplicationModel\CertificateTrustConfigurationCallbackAnnotation.cs (2)
125public ReferenceExpression CreateCustomBundle(Func<X509Certificate2Collection, CancellationToken, Task<byte[]>> bundleGenerator) 151internal Dictionary<string, Func<X509Certificate2Collection, CancellationToken, Task<byte[]>>> CustomBundlesFactories { get; } = new();
ApplicationModel\CertificateTrustExecutionConfigurationGatherer.cs (1)
151public Dictionary<string, Func<X509Certificate2Collection, CancellationToken, Task<byte[]>>> CustomBundlesFactories { get; } = new();
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
269public required Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> Callback { get; init; }
ApplicationModel\McpServerEndpointAnnotation.cs (2)
19public McpServerEndpointAnnotation(Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> endpointUrlResolver) 28public Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> EndpointUrlResolver { get; }
ApplicationModel\ResourceLoggerService.cs (2)
119public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 832public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Backchannel\BackchannelLoggerProvider.cs (1)
91public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Cli\CliOrphanDetector.cs (2)
18internal Func<int, long, bool> IsProcessRunningWithStartTime { get; set; } = (int pid, long expectedStartTimeUnix) => 23internal Func<int, long, bool> IsProcessRunningWithLegacyStartTime { get; set; } = (int pid, long expectedStartTimeUnix) =>
ContainerResourceBuilderExtensions.cs (2)
1461public static IResourceBuilder<T> WithContainerFiles<T>(this IResourceBuilder<T> builder, string destinationPath, Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> callback, int? defaultOwner = null, int? defaultGroup = null, UnixFileMode? umask = null) where T : ContainerResource 1604Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> callback,
Dcp\DcpExecutor.cs (1)
394Func<TDcpResource, TDcpResource, bool> isInDesiredState,
Dcp\DcpResourceWatcher.cs (2)
199async Task WatchKubernetesResourceAsync<T>(Func<WatchEventType, T, Task> handler) where T : CustomResource, IKubernetesStaticMetadata 271private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource, IKubernetesStaticMetadata
Dcp\KubernetesService.cs (1)
267var innerWatchFactory = ((WatchEventType, T)? lastValue, CancellationToken restartCancellationToken) =>
Dcp\ProxylessEndpointPortAllocator.cs (3)
38private readonly Func<int, ProtocolType, bool> _tryProbe; 54internal ProxylessEndpointPortAllocator(int rangeStart, int rangeEnd, Random random, Func<int, ProtocolType, bool> tryProbe) 59internal ProxylessEndpointPortAllocator(int rangeStart, int rangeEnd, int randomWalkOffset, int randomWalkStep, Func<int, ProtocolType, bool> tryProbe)
DistributedApplicationEventingExtensions.cs (4)
23public static T OnBeforeStart<T>(this T builder, Func<BeforeStartEvent, CancellationToken, Task> callback) 35public static T OnBeforePublish<T>(this T builder, Func<BeforePublishEvent, CancellationToken, Task> callback) 47public static T OnAfterPublish<T>(this T builder, Func<AfterPublishEvent, CancellationToken, Task> callback) 129private static T OnApplicationEvent<T, TEvent>(this T builder, Func<TEvent, CancellationToken, Task> callback)
Eventing\DistributedApplicationEventing.cs (5)
119/// <inheritdoc cref="IDistributedApplicationEventing.Subscribe{T}(Func{T, CancellationToken, Task})" /> 120public DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent 158/// <inheritdoc cref="IDistributedApplicationEventing.Subscribe{T}(Func{T, CancellationToken, Task})" /> 159public DistributedApplicationEventSubscription Subscribe<T>(IResource resource, Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationResourceEvent 161var resourceFilteredCallback = async (T @event, CancellationToken cancellationToken) =>
Eventing\DistributedApplicationEventSubscription.cs (3)
13public class DistributedApplicationEventSubscription(Func<IDistributedApplicationEvent, CancellationToken, Task> callback) 18public Func<IDistributedApplicationEvent, CancellationToken, Task> Callback { get; } = callback; 25public class DistributedApplicationResourceEventSubscription(IResource? resource, Func<IDistributedApplicationResourceEvent, CancellationToken, Task> callback)
Eventing\IDistributedApplicationEventing.cs (2)
20DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent; 29DistributedApplicationEventSubscription Subscribe<T>(IResource resource, Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationResourceEvent;
Pipelines\PipelineLoggerProvider.cs (1)
79public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
ResourceBuilderExtensions.cs (1)
4899Func<string, CancellationToken, Task<TLaunchConfiguration>> launchConfigurationProducer,
Utils\PeriodicRestartAsyncEnumerable.cs (2)
20public static async IAsyncEnumerable<T> CreateAsync<T>(Func<T?, CancellationToken, Task<IAsyncEnumerable<T>>> enumerableFactory, TimeSpan restartInterval, [EnumeratorCancellation] CancellationToken cancellationToken) where T : struct 76public static async IAsyncEnumerable<T> CreateAsync<T>(Func<T?, CancellationToken, Task<IAsyncEnumerable<T>>> enumerableFactory, TimeSpan restartInterval, [EnumeratorCancellation] CancellationToken cancellationToken) where T : class?
Aspire.Hosting.Azure (5)
AzureProvisioningController.cs (1)
4347Func<AzureProvisioningController, ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand,
AzureProvisioningResource.cs (1)
125public static T CreateExistingOrNewProvisionableResource<T>(AzureResourceInfrastructure infrastructure, Func<string, BicepValue<string>, T> createExisting, Func<AzureResourceInfrastructure, T> createNew)
AzurePublishingContext.cs (2)
495private static Task VisitAsync(object? value, Func<object, CancellationToken, Task> visitor, CancellationToken cancellationToken = default) => 498private static async Task VisitAsync(object? value, Func<object, CancellationToken, Task> visitor, HashSet<object> visited, CancellationToken cancellationToken = default)
IAzureKeyVaultResource.cs (1)
27Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; }
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
95internal Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; } 97Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? IAzureKeyVaultResource.SecretResolver
Aspire.Hosting.Azure.Kubernetes (2)
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
721Func<string, string, Task<AzCommandResult>> runAzCommandAsync) 783Func<string, string, Task<AzCommandResult>> runAzCommandAsync)
Aspire.Hosting.Azure.Tests (4)
AcrLoginServiceTests.cs (1)
117private sealed class CallbackHttpMessageHandler(Func<int, CancellationToken, Task<HttpResponseMessage>> callback) : HttpMessageHandler
AzureRunAsEmulatorModeTests.cs (3)
11public static TheoryData<string, Func<IDistributedApplicationBuilder, Action, IResource>> RunAsEmulatorResources => new() 25public void RunAsEmulator_InRunMode_ConfiguresLocalContainer(string resourceType, Func<IDistributedApplicationBuilder, Action, IResource> addResource) 39public void RunAsEmulator_InPublishMode_DoesNotConfigureLocalContainer(string resourceType, Func<IDistributedApplicationBuilder, Action, IResource> addResource)
Aspire.Hosting.Browsers (7)
BrowserHost.cs (1)
149Func<string, IReadOnlyList<string>, IBrowserLogsPipeBrowserProcess>? startPipeBrowserProcess = null)
BrowserHostRegistry.cs (2)
19private readonly Func<BrowserConfiguration, string, BrowserLogsUserDataDirectory> _createUserDataDirectory; 40Func<BrowserConfiguration, string, BrowserLogsUserDataDirectory>? createUserDataDirectory,
BrowserLogsCdpProtocol.cs (1)
288Func<string?, TParameters, TEvent> createEvent)
BrowserLogsRunningSession.cs (3)
26Task StartCompletionObserver(Func<int?, Exception?, Task> onCompleted); 171public Task StartCompletionObserver(Func<int?, Exception?, Task> onCompleted) 299private async Task ObserveCompletionAsync(Func<int?, Exception?, Task> onCompleted)
Aspire.Hosting.Browsers.Tests (9)
BrowserLogsBuilderExtensionsTests.cs (2)
1884public Task StartCompletionObserver(Func<int?, Exception?, Task> onCompleted) 1919private async Task ObserveCompletionAsync(Func<int?, Exception?, Task> onCompleted)
src\Aspire.Hosting.Browsers\BrowserHost.cs (1)
149Func<string, IReadOnlyList<string>, IBrowserLogsPipeBrowserProcess>? startPipeBrowserProcess = null)
src\Aspire.Hosting.Browsers\BrowserHostRegistry.cs (2)
19private readonly Func<BrowserConfiguration, string, BrowserLogsUserDataDirectory> _createUserDataDirectory; 40Func<BrowserConfiguration, string, BrowserLogsUserDataDirectory>? createUserDataDirectory,
src\Aspire.Hosting.Browsers\BrowserLogsCdpProtocol.cs (1)
288Func<string?, TParameters, TEvent> createEvent)
src\Aspire.Hosting.Browsers\BrowserLogsRunningSession.cs (3)
26Task StartCompletionObserver(Func<int?, Exception?, Task> onCompleted); 171public Task StartCompletionObserver(Func<int?, Exception?, Task> onCompleted) 299private async Task ObserveCompletionAsync(Func<int?, Exception?, Task> onCompleted)
Aspire.Hosting.CodeGeneration.Go.Tests (2)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (2)
344Func<string, int, string> transform) 749Func<TestCallbackContext, TestEnvironmentContext, Task> callback)
Aspire.Hosting.CodeGeneration.Java.Tests (2)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (2)
344Func<string, int, string> transform) 749Func<TestCallbackContext, TestEnvironmentContext, Task> callback)
Aspire.Hosting.CodeGeneration.Python.Tests (2)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (2)
344Func<string, int, string> transform) 749Func<TestCallbackContext, TestEnvironmentContext, Task> callback)
Aspire.Hosting.CodeGeneration.Rust.Tests (2)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (2)
344Func<string, int, string> transform) 749Func<TestCallbackContext, TestEnvironmentContext, Task> callback)
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
TestTypes\TestExtensions.cs (2)
344Func<string, int, string> transform) 749Func<TestCallbackContext, TestEnvironmentContext, Task> callback)
Aspire.Hosting.EntityFrameworkCore (1)
EFResourceBuilderExtensions.cs (1)
356Func<EFCoreOperationExecutor, string?, Task<EFOperationResult>> executeOperation)
Aspire.Hosting.EntityFrameworkCore.Tests (1)
EFCoreOperationExecutorTests.cs (1)
247public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentResource.cs (1)
214internal Func<KubernetesEnvironmentResource, PipelineStepFactoryContext, Task<IReadOnlyList<PipelineStep>>>? DeploymentEngineStepsFactory { get; set; }
Aspire.Hosting.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
924public Func<IResourceBuilder<MauiProjectResource>, string, IResourceBuilder<IResource>> AddPlatformWithCustomName { get; } 939Func<IResourceBuilder<MauiProjectResource>, string, IResourceBuilder<IResource>> addCustom,
Aspire.Hosting.Radius (2)
Publishing\SealedSecretApplyStep.cs (2)
513Func<IReadOnlyList<string>, CancellationToken, Task<(int ExitCode, string StdOut, string StdErr)>> runKubectl) 631Func<IReadOnlyList<string>, CancellationToken, Task<(int ExitCode, string StdOut, string StdErr)>> runKubectl)
Aspire.Hosting.Radius.Tests (1)
ResourceMapping\ResourceTypeMapperTests.cs (1)
196public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Hosting.RemoteHost (2)
OrphanDetector.cs (2)
30internal Func<int, long, bool> IsProcessRunningWithStartTime { get; set; } = static (pid, expectedStartTimeUnix) => ProcessStartTimeHelper.IsProcessRunning(pid, expectedStartTimeUnix); 32internal Func<int, long, bool> IsProcessRunningWithLegacyStartTime { get; set; } = static (pid, expectedStartTimeUnix) =>
Aspire.Hosting.RemoteHost.Tests (2)
AtsCapabilityScannerTests.cs (1)
833Func<ContainerResource, ProjectResource, Task> callback)
RecordingLogger.cs (1)
21public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Hosting.Testing (3)
DistributedApplicationEntryPointInvoker.cs (1)
18public static Func<string[], CancellationToken, Task<DistributedApplication>>? ResolveEntryPoint(
DistributedApplicationFactory.cs (2)
383var factory = DistributedApplicationEntryPointInvoker.ResolveEntryPoint( 403private async Task InvokeEntryPoint(Func<string[], CancellationToken, Task<DistributedApplication>> factory)
Aspire.Hosting.Testing.Tests (4)
tests\Shared\Logging\TestLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\Logging\TestLoggerT.cs (1)
30Func<TState, Exception?, string> formatter)
tests\Shared\Logging\WriteContext.cs (1)
16public Func<object?, Exception?, string>? Formatter { get; set; }
tests\Shared\Logging\XunitLoggerProvider.cs (1)
60LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Hosting.Tests (7)
Dashboard\DashboardResourceTests.cs (1)
893public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Dcp\GatedLogger.cs (1)
31Func<TState, Exception?, string> formatter)
Dcp\TestKubernetesService.cs (1)
36Func<CustomResource, string, Stream>? startStream = null,
ExecutionConfigurationGathererTests.cs (2)
596var factory = metadata.CustomBundlesFactories.Values.Single(); 656var factory = metadata.CustomBundlesFactories.Values.Single();
Utils\PeriodicRestartAsyncEnumerableTests.cs (2)
21var innerFactory = (int? lastValue, CancellationToken cancellationToken) => Task.FromResult(CountingAsyncEnumerable(0, TimeSpan.FromMilliseconds(50), cancellationToken)); 44var innerFactory = (int? lastValue, CancellationToken cancellationToken) => Task.FromResult(RefCountingAsyncEnumerable(0, TimeSpan.FromMilliseconds(10), cancellationToken));
Aspire.Hosting.TestUtilities (7)
Helpers\CallbackLifecycleHook.cs (2)
12private readonly Func<DistributedApplicationModel, CancellationToken, Task> _beforeStartCallback; 14public CallbackLifecycleHook(Func<DistributedApplicationModel, CancellationToken, Task> beforeStartCallback)
tests\Shared\Logging\TestLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\Logging\TestLoggerT.cs (1)
30Func<TState, Exception?, string> formatter)
tests\Shared\Logging\WriteContext.cs (1)
16public Func<object?, Exception?, string>? Formatter { get; set; }
tests\Shared\Logging\XunitLoggerProvider.cs (1)
60LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Utils\DockerUtils.cs (1)
38Func<string?, CancellationToken, Task<ContainerRuntimeInfo?>> runtimeDetector)
Aspire.NATS.Net (16)
AspireNatsClientExtensions.cs (16)
25/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 29/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 33/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 37/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 38public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 41/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 55public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 60/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 68/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 76/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 84/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 85public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 92/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 111public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 118private static void AddNatsClientInternal(this IHostApplicationBuilder builder, string connectionName, object? serviceKey, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 210private static Func<IServiceProvider, NatsOpts, NatsOpts>? Wrap(Func<NatsOpts, NatsOpts>? func)
Aspire.NATS.Net.Tests (4)
NatsClientPublicApiTests.cs (4)
27Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptionsWithService = null; 63Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptionsWithService = null; 95Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptionsWithService = null; 131Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptionsWithService = null;
Aspire.Playground.Tests (4)
tests\Shared\Logging\TestLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
tests\Shared\Logging\TestLoggerT.cs (1)
30Func<TState, Exception?, string> formatter)
tests\Shared\Logging\WriteContext.cs (1)
16public Func<object?, Exception?, string>? Formatter { get; set; }
tests\Shared\Logging\XunitLoggerProvider.cs (1)
60LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\RabbitMQEventSourceLogForwarder.cs (1)
13private static readonly Func<ErrorEventSourceEvent, Exception?, string> s_formatErrorEvent = FormatErrorEvent;
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
279public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.RabbitMQ.Client.v6.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
279public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.TestTools (2)
GitHubCli.cs (1)
236internal static Func<IReadOnlyList<string>, CancellationToken, Task<string>>? GhInvokerOverride { get; set; }
TrxReader.cs (1)
11public static IList<TestResult> GetTestResultsFromTrx(string filepath, Func<string, string, bool>? testFilter = null)
Binding.Http.IntegrationTests (2)
HttpBindingTestHelpers.cs (2)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 31public Func<HttpResponseMessage, CancellationToken, Task<HttpResponseMessage>> OnSentAsync { get; set; }
Binding.ReliableSession.IntegrationTests (2)
src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\HttpBindingTestHelpers.cs (2)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 31public Func<HttpResponseMessage, CancellationToken, Task<HttpResponseMessage>> OnSentAsync { get; set; }
CodeStyleConfigFileGenerator (1)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
csc (2)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
195Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 218Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
dotnet (9)
Commands\DotNetCommandFactory.cs (3)
55Func<MSBuildArgs, string, VirtualProjectBuildingCommand> createVirtualCommand, 56Func<MSBuildArgs, string?, CommandBase> createPhysicalCommand, 60Func<MSBuildArgs, ImmutableArray<string>, MSBuildArgs>? transformer = null)
Commands\New\PostActions\DotnetAddPostActionProcessor.cs (2)
14Func<string, string, bool>? addProjectReferenceCallback = null) : PostActionProcessorBase 17private readonly Func<string, string, bool> _addProjectReferenceCallback = addProjectReferenceCallback ?? DotnetCommandCallbacks.AddProjectReference;
Commands\Test\MTP\IPC\NamedPipeServer.cs (2)
16private readonly Func<NamedPipeServer, IRequest, Task<IResponse>> _callback; 29Func<NamedPipeServer, IRequest, Task<IResponse>> callback,
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26424.106\contentFiles\cs\net11.0\BuildServerConnection.cs (2)
195Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 218Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
dotnet-format (1)
Logging\SimpleConsoleLogger.cs (1)
37public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
GenerateDocumentationAndConfigFiles (168)
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory,
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
16public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 19public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 22public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 25public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (3)
75Func<SemanticModel, TNode, bool> canReplace, 119Func<SemanticModel, TNode, bool> canReplace, 154Func<ISyntaxFactsService, SyntaxNode, SyntaxNode> getSemanticBoundary,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\OptionsProvider.cs (2)
21private sealed class OptionsReaderProvider<TOptions>(IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader) : OptionsProvider<TOptions> 27public static OptionsProvider<TOptions> GetProvider<TOptions>(this IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader)
ILAssembler (1)
VTableFixupSupport.cs (1)
178Func<int, int, int> getMethodToken)
ILCompiler.ReadyToRun (4)
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (1)
364Func<uint, ushort, bool> hasEntryInBucket = (uint bucketIndex, ushort fprint) =>
TypeSystem\Mutable\MutableModule.cs (3)
197public Func<TypeSystemMetadataEmitter, object, int> HandleGenerationFunction; 202public Func<T, int?> CreateCacheFunc<T>(Func<TypeSystemMetadataEmitter, object, int> handleFunc) 259public PerMetadataFormCache(MutableModule module, Func<TypeSystemMetadataEmitter, object, int> handleFunc, int cacheIndex)
ILCompiler.TypeSystem (7)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\MetadataVirtualMethodAlgorithm.cs (3)
381private static MethodDesc FindMatchingVirtualMethodOnTypeByNameAndSig(MethodDesc targetMethod, DefType currentType, bool reverseMethodSearch, Func<MethodDesc, MethodDesc, bool> nameSigMatchMethodIsValidCandidate) 481private static readonly Func<MethodDesc, MethodDesc, bool> s_VerifyMethodsHaveTheSameVirtualSlot = VerifyMethodsHaveTheSameVirtualSlot; 490private static readonly Func<MethodDesc, MethodDesc, bool> s_VerifyMethodIsPublic = VerifyMethodIsPublic;
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\CustomAttributeTypeNameParser.cs (2)
24Func<ModuleDesc, string, TypeDesc> canonGenericResolver = null) 102internal Func<ModuleDesc, string, TypeDesc> _canonGenericResolver;
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaSignatureParser.cs (2)
15private Func<EntityHandle, NotFoundBehavior, TypeDesc> _typeResolver; 25public EcmaSignatureParser(TypeSystemContext tsc, Func<EntityHandle, NotFoundBehavior, TypeDesc> typeResolver, BlobReader reader, NotFoundBehavior notFoundBehavior)
Infrastructure.Tests (2)
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (2)
345Func<string, string, string> currentSectionBodyFactory, 347Func<string, string, string>? olderSectionBodyFactory = null)
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
XunitLoggerProvider.cs (1)
42public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Analyzers.Extra (5)
LegacyLoggingFixer.cs (5)
39internal Func<Document, CancellationToken, Task<SyntaxNode?>> GetSyntaxRootAsync = (d, t) => d.GetSyntaxRootAsync(t); 40internal Func<Document, CancellationToken, Task<SemanticModel?>> GetSemanticModelAsync = (d, t) => d.GetSemanticModelAsync(t); 42internal Func<Compilation, string, INamedTypeSymbol?> GetTypeByMetadataName1 = (c, n) => c.GetTypeByMetadataName(n); 43internal Func<Compilation, string, INamedTypeSymbol?> GetTypeByMetadataName2 = (c, n) => c.GetTypeByMetadataName(n); 44internal Func<Compilation, string, INamedTypeSymbol?> GetTypeByMetadataName3 = (c, n) => c.GetTypeByMetadataName(n);
Microsoft.AspNetCore.App.Analyzers (5)
Infrastructure\VirtualChars\VirtualCharSequence.Chunks.cs (1)
77internal static int BinarySearch<TElement, TValue>(ImmutableList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (2)
18private static readonly Func<SyntaxTriviaList, int, SyntaxToken> FindSkippedTokenBackwardFunc = FindSkippedTokenBackward; 83var findSkippedToken = includeSkipped ? FindSkippedTokenBackwardFunc : ((l, p) => default);
RouteEmbeddedLanguage\RoutePatternBraceMatcher.cs (1)
79private static TNode? FindNode<TNode>(RoutePatternNode node, VirtualChar ch, Func<TNode, VirtualChar, bool> predicate)
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
127private static TNode? FindNode<TNode>(RoutePatternNode node, VirtualChar ch, Func<TNode, VirtualChar, bool> predicate)
Microsoft.AspNetCore.Components (1)
_generated\0\LoggerMessage.g.cs (1)
206public static readonly global::System.Func<__SkippingEventOnDisposedComponentStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
Microsoft.AspNetCore.Components.Endpoints (3)
_generated\0\LoggerMessage.g.cs (3)
367public static readonly global::System.Func<__ConstructorParameterStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 451public static readonly global::System.Func<__MatchingConstructorParameterFoundStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 518public static readonly global::System.Func<__CustomParameterNameMetadataStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
Microsoft.AspNetCore.Components.QuickGrid (4)
Columns\GridSort.cs (4)
17private readonly Func<IQueryable<TGridItem>, bool, IOrderedQueryable<TGridItem>> _first; 18private List<Func<IOrderedQueryable<TGridItem>, bool, IOrderedQueryable<TGridItem>>>? _then; 26internal GridSort(Func<IQueryable<TGridItem>, bool, IOrderedQueryable<TGridItem>> first, (LambdaExpression, bool) firstExpression) 94foreach (var clause in _then)
Microsoft.AspNetCore.Components.Server (3)
_generated\0\LoggerMessage.g.cs (1)
1154public static readonly global::System.Func<__PersistedCircuitStateDiscardedStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
Builder\ServerComponentsEndpointOptions.cs (1)
56public Func<HttpContext, WebSocketAcceptContext, Task>? ConfigureWebSocketAcceptContext { get; set; }
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
167Func<HttpContext, WebSocketAcceptContext, Task>? configureConnection,
Microsoft.AspNetCore.Components.WebAssembly (1)
Services\WebAssemblyConsoleLogger.cs (1)
44public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.AspNetCore.Components.WebView (2)
IpcReceiver.cs (2)
25private readonly Func<string, string, Task> _onAttachMessage; 27public IpcReceiver(Func<string, string, Task> onAttachMessage)
Microsoft.AspNetCore.Connections.Abstractions (4)
ConnectionBuilderExtensions.cs (3)
34/// Prefer using <see cref="Use(IConnectionBuilder, Func{ConnectionContext, ConnectionDelegate, Task})"/> for better performance as shown below: 46public static IConnectionBuilder Use(this IConnectionBuilder connectionBuilder, Func<ConnectionContext, Func<Task>, Task> middleware) 65public static IConnectionBuilder Use(this IConnectionBuilder connectionBuilder, Func<ConnectionContext, ConnectionDelegate, Task> middleware)
TlsConnectionCallbackOptions.cs (1)
21public Func<TlsConnectionCallbackContext, CancellationToken, ValueTask<SslServerAuthenticationOptions>> OnConnection { get; set; } = default!;
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
HealthCheckOptions.cs (1)
71public Func<HttpContext, HealthReport, Task> ResponseWriter { get; set; } = HealthCheckResponseWriters.WriteMinimalPlaintext;
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Logging\AcceptanceTests.cs (1)
143private static Task RunAsync(LogLevel level, Action<IServiceCollection> configure, Func<FakeLogCollector, HttpClient, Task> func)
Logging\AcceptanceTests.Mvc.cs (1)
51private static Task RunControllerAsync(LogLevel level, Action<IServiceCollection> configure, Func<FakeLogCollector, HttpClient, Task> func)
Microsoft.AspNetCore.Hosting (4)
GenericHostWebHostBuilderExtensions.cs (1)
62Func<IHostBuilder, WebHostBuilderOptions, IWebHostBuilder> createWebHostBuilder,
Internal\HostingRequestFinishedLog.cs (1)
14internal static readonly Func<object, Exception?, string> Callback = (state, exception) => ((HostingRequestFinishedLog)state).ToString();
Internal\HostingRequestStartingLog.cs (1)
15internal static readonly Func<object, Exception?, string> Callback = (state, exception) => ((HostingRequestStartingLog)state).ToString();
Internal\HostingRequestUnhandledLog.cs (1)
13internal static readonly Func<object, Exception?, string> Callback = (state, exception) => ((HostingRequestUnhandledLog)state).ToString();
Microsoft.AspNetCore.Http.Abstractions (5)
Extensions\EndpointBuilder.cs (2)
13private List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>? _filterFactories; 18public IList<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>> FilterFactories => _filterFactories ??= new();
Extensions\UseExtensions.cs (3)
17/// Prefer using <see cref="Use(IApplicationBuilder, Func{HttpContext, RequestDelegate, Task})"/> for better performance as shown below: 29public static IApplicationBuilder Use(this IApplicationBuilder app, Func<HttpContext, Func<Task>, Task> middleware) 48public static IApplicationBuilder Use(this IApplicationBuilder app, Func<HttpContext, RequestDelegate, Task> middleware)
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
558private static bool SequenceEqual<T>(IEnumerable<T> current, IEnumerable<T> incoming, Func<T, T, bool> equals)
Microsoft.AspNetCore.Http.Connections.Client (2)
HttpConnectionOptions.cs (1)
71public Func<WebSocketConnectionContext, CancellationToken, ValueTask<WebSocket>>? WebSocketFactory { get; set; }
Internal\WebSocketsTransport.cs (1)
305var factory = _httpConnectionOptions.WebSocketFactory ?? DefaultWebSocketFactory;
Microsoft.AspNetCore.Http.Extensions (16)
_generated\0\LoggerMessage.g.cs (3)
221public static readonly global::System.Func<__ConstructorParameterStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 305public static readonly global::System.Func<__MatchingConstructorParameterFoundStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 372public static readonly global::System.Func<__CustomParameterNameMetadataStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
RequestDelegateFactory.cs (10)
190var targetableRequestDelegate = CreateTargetableRequestDelegate(handler.Method, targetExpression, factoryContext, targetFactory); 243var untargetableRequestDelegate = CreateTargetableRequestDelegate(methodInfo, targetExpression: null, factoryContext); 255var targetableRequestDelegate = CreateTargetableRequestDelegate(methodInfo, targetExpression, factoryContext, context => targetFactory(context)); 314private static Func<object?, HttpContext, Task>? CreateTargetableRequestDelegate( 497var currentFilterFactory = factoryContext.EndpointBuilder.FilterFactories[i]; 1263private static Func<object?, HttpContext, Task> HandleRequestBodyAndCompileRequestDelegate(Expression responseWritingMethodCall, RequestDelegateFactoryContext factoryContext) 1290return Expression.Lambda<Func<object?, HttpContext, Task>>( 1304private static Func<object?, HttpContext, Task> HandleRequestBodyAndCompileRequestDelegateForJson(Expression responseWritingMethodCall, RequestDelegateFactoryContext factoryContext) 1459private static Func<object?, HttpContext, Task> HandleRequestBodyAndCompileRequestDelegateForForm( 1716var tryParseMethodCall = ParameterBindingMethodCache.Instance.FindTryParseMethod(nonNullableParameterType);
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 80public Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type type) 85Func<ParameterExpression, Expression, Expression>? Finder(Type type)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (9)
StaticRouteHandlerModel\EndpointParameter.cs (9)
74IsParsable = TryGetParsability(Type, wellKnownTypes, out var preferredTryParseInvocation); 81IsParsable = TryGetParsability(Type, wellKnownTypes, out var preferredTryParseInvocation); 88IsParsable = TryGetParsability(Type, wellKnownTypes, out var preferredTryParseInvocation); 124IsParsable = TryGetParsability(Type, wellKnownTypes, out var preferredTryParseInvocation); 240else if (TryGetParsability(Type, wellKnownTypes, out var preferredTryParseInvocation)) 264|| TryGetParsability(Type, wellKnownTypes, out var _) 265|| (IsArray && TryGetParsability(ElementType, wellKnownTypes, out var _)); 298public Func<string, string, string>? PreferredTryParseInvocation { get; set; } 324private bool TryGetParsability(ITypeSymbol typeSymbol, WellKnownTypes wellKnownTypes, [NotNullWhen(true)] out Func<string, string, string>? preferredTryParseInvocation)
Microsoft.AspNetCore.HttpLogging (1)
HttpLog.cs (1)
15internal static readonly Func<object, Exception?, string> Callback = (state, exception) => ((HttpLog)state).ToString();
Microsoft.AspNetCore.Identity (21)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (21)
52using MetadataPopulator = System.Func<System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult>; 68MetadataPopulator populateMetadata = (methodInfo, options) => 187MetadataPopulator populateMetadata = (methodInfo, options) => 373MetadataPopulator populateMetadata = (methodInfo, options) => 391var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Authentication.BearerToken.AccessTokenResponse>, global::Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.SignInHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult>> (global::Microsoft.AspNetCore.Identity.Data.RefreshRequest arg0, global::System.IServiceProvider arg1) => throw null!); 472var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Authentication.BearerToken.AccessTokenResponse>, global::Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.SignInHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult>> (global::Microsoft.AspNetCore.Identity.Data.RefreshRequest arg0, global::System.IServiceProvider arg1) => throw null!); 489MetadataPopulator populateMetadata = (methodInfo, options) => 635MetadataPopulator populateMetadata = (methodInfo, options) => 754MetadataPopulator populateMetadata = (methodInfo, options) => 772var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ForgotPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 853var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ForgotPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 870MetadataPopulator populateMetadata = (methodInfo, options) => 888var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ResetPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 969var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ResetPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 986MetadataPopulator populateMetadata = (methodInfo, options) => 1105MetadataPopulator populateMetadata = (methodInfo, options) => 1122var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!); 1190var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!); 1207MetadataPopulator populateMetadata = (methodInfo, options) => 1330MetadataPopulator populateMetadata, 1353var filterFactory = routeHandlerFilters[i];
Microsoft.AspNetCore.InternalTesting (4)
Logging\TestLogger.cs (1)
42public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Logging\TestLoggerT.cs (1)
32Func<TState, Exception, string> formatter)
Logging\WriteContext.cs (1)
18public Func<object, Exception, string> Formatter { get; set; }
Logging\XunitLoggerProvider.cs (1)
62LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.AspNetCore.JsonPatch (1)
Internal\DynamicObjectAdapter.cs (1)
185var callsite = CallSite<Func<CallSite, object, object>>.Create(binder);
Microsoft.AspNetCore.Mvc.Abstractions (10)
Formatters\InputFormatterContext.cs (3)
36Func<Stream, Encoding, TextReader> readerFactory) 65Func<Stream, Encoding, TextReader> readerFactory, 120public Func<Stream, Encoding, TextReader> ReaderFactory { get; }
Formatters\OutputFormatterWriteContext.cs (2)
21public OutputFormatterWriteContext(HttpContext httpContext, Func<Stream, Encoding, TextWriter> writerFactory, Type? objectType, object? @object) 50public virtual Func<Stream, Encoding, TextWriter> WriterFactory { get; protected set; }
ModelBinding\Metadata\ModelBindingMessageProvider.cs (1)
47public virtual Func<string, string, string> AttemptedValueIsInvalidAccessor { get; } = default!;
ModelBinding\ModelMetadata.cs (1)
643internal static Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type modelType)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 80public Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type type) 85Func<ParameterExpression, Expression, Expression>? Finder(Type type)
Microsoft.AspNetCore.Mvc.Core (33)
_generated\0\LoggerMessage.g.cs (5)
593public static readonly global::System.Func<__TransformingClientErrorStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 1499public static readonly global::System.Func<__AttemptingToBindCollectionUsingIndicesStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 1559public static readonly global::System.Func<__AttemptingToBindCollectionOfKeyValuePairStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 1619public static readonly global::System.Func<__NoNonIndexBasedFormatFoundForCollectionStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 1773public static readonly global::System.Func<__NoKeyValueFormatForDictionaryModelBinderStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
Controllers\ControllerActivatorProvider.cs (4)
16private static readonly Func<ControllerContext, object, ValueTask> _disposeAsync = DisposeAsync; 17private static readonly Func<ControllerContext, object, ValueTask> _syncDisposeAsync = SyncDisposeAsync; 20private readonly Func<ControllerContext, object, ValueTask>? _controllerActivatorReleaseAsync; 81public Func<ControllerContext, object, ValueTask>? CreateAsyncReleaser(ControllerActionDescriptor descriptor)
Controllers\ControllerFactoryProvider.cs (2)
14private readonly Func<ControllerContext, object, ValueTask>? _factoryReleaseControllerAsync; 94public Func<ControllerContext, object, ValueTask>? CreateAsyncControllerReleaser(ControllerActionDescriptor descriptor)
Controllers\IControllerActivatorProvider.cs (1)
30Func<ControllerContext, object, ValueTask>? CreateAsyncReleaser(ControllerActionDescriptor descriptor)
Controllers\IControllerFactoryProvider.cs (1)
30Func<ControllerContext, object, ValueTask>? CreateAsyncControllerReleaser(ControllerActionDescriptor descriptor)
Infrastructure\ActionSelectionTable.cs (1)
104Func<T, string, string> getRouteValue)
Infrastructure\AsyncEnumerableReader.cs (5)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new(); 52public bool TryGetReader(Type type, [NotNullWhen(true)] out Func<object, CancellationToken, Task<ICollection>>? reader) 67var converter = (Func<object, CancellationToken, Task<ICollection>>)Converter 69.CreateDelegate(typeof(Func<object, CancellationToken, Task<ICollection>>), this);
Infrastructure\ControllerActionInvokerCache.cs (1)
63var controllerReleaser = _controllerFactoryProvider.CreateAsyncControllerReleaser(actionDescriptor);
Infrastructure\ControllerActionInvokerCacheEntry.cs (2)
15Func<ControllerContext, object, ValueTask>? controllerReleaser, 34public Func<ControllerContext, object, ValueTask>? ControllerReleaser { get; }
Infrastructure\ObjectResultExecutor.cs (1)
56protected Func<Stream, Encoding, TextWriter> WriterFactory { get; }
ModelBinding\Binders\BodyModelBinder.cs (1)
23private readonly Func<Stream, Encoding, TextReader> _readerFactory;
ModelBinding\Binders\TryParseModelBinder.cs (4)
25private readonly Func<ValueProviderResult, ModelBindingContext, object?> _tryParseOperation; 107private static Func<ValueProviderResult, ModelBindingContext, object?> CreateTryParseOperation(Type modelType) 110var tryParseMethodExpession = ModelMetadata.FindTryParseMethod(modelType) 139return Expression.Lambda<Func<ValueProviderResult, ModelBindingContext, object?>>(expression, new[] { ValueProviderResultExpression, BindingContextExpression }).Compile();
ModelBinding\Metadata\DefaultModelBindingMessageProvider.cs (3)
20private Func<string, string, string> _attemptedValueIsInvalidAccessor; 129public override Func<string, string, string> AttemptedValueIsInvalidAccessor => _attemptedValueIsInvalidAccessor; 136public void SetAttemptedValueIsInvalidAccessor(Func<string, string, string> attemptedValueIsInvalidAccessor)
Routing\ActionEndpointFactory.cs (1)
477var filterFactory = routeHandlerFilters[i];
src\aspnetcore\src\Shared\PropertyActivator\PropertyActivator.cs (1)
65Func<PropertyInfo, TAttribute, PropertyActivator<TContext>> createActivateInfo,
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
MvcDataAnnotationsLocalizationOptions.cs (1)
20public Func<Type, IStringLocalizerFactory, IStringLocalizer> DataAnnotationLocalizerProvider = null!;
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
XmlDataContractSerializerOutputFormatter.cs (1)
230if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
XmlSerializerOutputFormatter.cs (1)
208if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
Microsoft.AspNetCore.Mvc.NewtonsoftJson (7)
NewtonsoftJsonOutputFormatter.cs (1)
153if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
NewtonsoftJsonResultExecutor.cs (1)
105if (value != null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader))
src\aspnetcore\src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (5)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new(); 52public bool TryGetReader(Type type, [NotNullWhen(true)] out Func<object, CancellationToken, Task<ICollection>>? reader) 67var converter = (Func<object, CancellationToken, Task<ICollection>>)Converter 69.CreateDelegate(typeof(Func<object, CancellationToken, Task<ICollection>>), this);
Microsoft.AspNetCore.Mvc.Razor (1)
RazorPagePropertyActivator.cs (1)
19private readonly Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> _rootFactory;
Microsoft.AspNetCore.Mvc.RazorPages (34)
Infrastructure\DefaultPageActivatorProvider.cs (4)
20public Func<PageContext, ViewContext, object> CreateActivator(CompiledPageActionDescriptor actionDescriptor) 65private static Func<PageContext, ViewContext, object> CreatePageFactory(Type pageTypeInfo) 74var pageFactory = Expression 75.Lambda<Func<PageContext, ViewContext, object>>(newExpression, parameter1, parameter2)
Infrastructure\DefaultPageFactoryProvider.cs (2)
42public Func<PageContext, ViewContext, object> CreatePageFactory(CompiledPageActionDescriptor actionDescriptor) 51var activatorFactory = _pageActivator.CreateActivator(actionDescriptor);
Infrastructure\DefaultPageModelActivatorProvider.cs (3)
15private readonly Func<PageContext, object, ValueTask> _asyncDisposer = DisposeAsync; 16private readonly Func<PageContext, object, ValueTask> _syncAsyncDisposer = SyncDisposeAsync; 48public Func<PageContext, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor actionDescriptor)
Infrastructure\DefaultPageModelFactoryProvider.cs (1)
60public Func<PageContext, object, ValueTask>? CreateAsyncModelDisposer(CompiledPageActionDescriptor descriptor)
Infrastructure\ExecutorFactory.cs (6)
79private readonly Func<object, object?[]?, Task> _thunk; 87_thunk = Expression.Lambda<Func<object, object?[]?, Task>>( 109private readonly Func<object, object?[]?, Task<object>> _thunk; 117_thunk = Expression.Lambda<Func<object, object?[]?, Task<object>>>( 171private readonly Func<object, object?[]?, IActionResult?> _thunk; 179_thunk = Expression.Lambda<Func<object, object?[]?, IActionResult?>>(
Infrastructure\PageActionInvokerCache.cs (4)
75var viewDataFactory = ViewDataDictionaryFactory.CreateFactory(compiledActionDescriptor.DeclaredModelTypeInfo); 77var pageFactory = _pageFactoryProvider.CreatePageFactory(compiledActionDescriptor); 79var propertyBinder = PageBinderFactory.CreatePropertyBinder( 86Func<PageContext, object, ValueTask>? modelReleaser = null;
Infrastructure\PageActionInvokerCacheEntry.cs (8)
16Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> viewDataFactory, 17Func<PageContext, ViewContext, object> pageFactory, 20Func<PageContext, object, ValueTask>? releaseModel, 21Func<PageContext, object, Task> propertyBinder, 42public Func<PageContext, ViewContext, object> PageFactory { get; } 54public Func<PageContext, object, ValueTask>? ReleaseModel { get; } 60public Func<PageContext, object, Task> PropertyBinder { get; } 66public Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> ViewDataFactory { get; }
Infrastructure\PageBinderFactory.cs (2)
10internal static readonly Func<PageContext, object, Task> NullPropertyBinder = (context, arguments) => Task.CompletedTask; 13public static Func<PageContext, object, Task> CreatePropertyBinder(
IPageActivatorProvider.cs (1)
18Func<PageContext, ViewContext, object> CreateActivator(CompiledPageActionDescriptor descriptor);
IPageFactoryProvider.cs (1)
18Func<PageContext, ViewContext, object> CreatePageFactory(CompiledPageActionDescriptor descriptor);
IPageModelActivatorProvider.cs (1)
30Func<PageContext, object, ValueTask>? CreateAsyncReleaser(CompiledPageActionDescriptor descriptor)
IPageModelFactoryProvider.cs (1)
30Func<PageContext, object, ValueTask>? CreateAsyncModelDisposer(CompiledPageActionDescriptor descriptor)
Microsoft.AspNetCore.Mvc.TagHelpers (8)
AttributeMatcher.cs (1)
26Func<TMode, TMode, int> compare,
Cache\CacheTagKey.cs (5)
21private static readonly Func<IRequestCookieCollection, string, string> CookieAccessor = (c, key) => c[key]; 22private static readonly Func<IHeaderDictionary, string, string> HeaderAccessor = (c, key) => c[key]; 23private static readonly Func<IQueryCollection, string, string> QueryAccessor = (c, key) => c[key]; 24private static readonly Func<RouteValueDictionary, string, string> RouteValueAccessor = (c, key) => 268Func<TSourceCollection, string, string> accessor)
LinkTagHelper.cs (1)
52private static readonly Func<Mode, Mode, int> Compare = (a, b) => a - b;
ScriptTagHelper.cs (1)
50private static readonly Func<Mode, Mode, int> Compare = (a, b) => a - b;
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
RemoteAttributeBase.cs (1)
183var provider = options.Value.DataAnnotationLocalizerProvider;
ViewDataDictionaryFactory.cs (2)
12public static Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary> CreateFactory(Type modelType) 24Expression.Lambda<Func<IModelMetadataProvider, ModelStateDictionary, ViewDataDictionary>>(
Microsoft.AspNetCore.OpenApi (7)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (4)
52using MetadataPopulator = System.Func<System.Reflection.MethodInfo, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions?, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult>; 67MetadataPopulator populateMetadata = (methodInfo, options) => 168MetadataPopulator populateMetadata, 191var filterFactory = routeHandlerFilters[i];
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
46private readonly ConcurrentDictionary<Type, Func<ParameterExpression, Expression, Expression>?> _stringMethodCallCache = new(); 80public Func<ParameterExpression, Expression, Expression>? FindTryParseMethod(Type type) 85Func<ParameterExpression, Expression, Expression>? Finder(Type type)
Microsoft.AspNetCore.OutputCaching (8)
DispatcherExtensions.cs (1)
51public async Task<TValue?> ScheduleAsync<TState>(TKey key, TState state, Func<TKey, TState, Task<TValue?>> valueFactory)
OutputCachePolicyBuilder.cs (5)
20private List<Func<OutputCacheContext, CancellationToken, ValueTask<bool>>>? _requirements; 64public OutputCachePolicyBuilder With(Func<OutputCacheContext, CancellationToken, ValueTask<bool>> predicate) 198public OutputCachePolicyBuilder SetCacheKeyPrefix(Func<HttpContext, CancellationToken, ValueTask<string>> keyPrefix) 243public OutputCachePolicyBuilder VaryByValue(Func<HttpContext, CancellationToken, ValueTask<KeyValuePair<string, string>>> varyBy) 334foreach (var r in _requirements)
Policies\SetCacheKeyPrefixPolicy.cs (1)
18public SetCacheKeyPrefixPolicy(Func<HttpContext, CancellationToken, ValueTask<string>> varyBy)
Policies\VaryByValuePolicy.cs (1)
18public VaryByValuePolicy(Func<HttpContext, CancellationToken, ValueTask<KeyValuePair<string, string>>> varyBy)
Microsoft.AspNetCore.Owin (4)
WebSockets\OwinWebSocketAdapter.cs (3)
15Func<ArraySegment<byte> /* data */, 35private readonly WebSocketReceiveAsync _receiveAsync; 49_receiveAsync = (WebSocketReceiveAsync)websocketContext[OwinConstants.WebSocket.ReceiveAsync];
WebSockets\WebSocketAdapter.cs (1)
15Func<ArraySegment<byte> /* data */,
Microsoft.AspNetCore.RateLimiting (9)
DefaultRateLimiterPolicy.cs (3)
12private readonly Func<OnRejectedContext, CancellationToken, ValueTask>? _onRejected; 14public DefaultRateLimiterPolicy(Func<HttpContext, RateLimitPartition<DefaultKeyType>> partitioner, Func<OnRejectedContext, CancellationToken, ValueTask>? onRejected) 20public Func<OnRejectedContext, CancellationToken, ValueTask>? OnRejected => _onRejected;
IRateLimiterPolicy.cs (2)
15/// Gets the <see cref="Func{OnRejectedContext, CancellationToken, ValueTask}"/> that handles requests rejected by this middleware. 17Func<OnRejectedContext, CancellationToken, ValueTask>? OnRejected { get; }
RateLimiterOptions.cs (2)
29/// Gets or sets a <see cref="Func{OnRejectedContext, CancellationToken, ValueTask}"/> that handles requests rejected by this middleware. 31public Func<OnRejectedContext, CancellationToken, ValueTask>? OnRejected { get; set; }
RateLimitingMiddleware.cs (2)
18private readonly Func<OnRejectedContext, CancellationToken, ValueTask>? _defaultOnRejected; 119var thisRequestOnRejected = _defaultOnRejected;
Microsoft.AspNetCore.Razor (2)
TagHelpers\TagHelperOutput.cs (2)
14private readonly Func<bool, HtmlEncoder, Task<TagHelperContent>> _getChildContentAsync; 43Func<bool, HtmlEncoder, Task<TagHelperContent>> getChildContentAsync)
Microsoft.AspNetCore.Razor.Utilities.Shared (58)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\EnumerableExtensions.cs (1)
95public static ImmutableArray<TResult> SelectAsArray<T, TResult>(this IEnumerable<T> source, Func<T, int, TResult> selector)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ImmutableArrayExtensions.cs (16)
89public static ImmutableArray<TResult> SelectAsArray<T, TResult>(this ImmutableArray<T> array, Func<T, int, TResult> selector) 105public static ImmutableArray<TResult> SelectAsArray<T, TArg, TResult>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, TResult> selector) 169public static TResult[] SelectAsPlainArray<T, TResult>(this ImmutableArray<T> array, Func<T, int, TResult> selector) 201public static TResult[] SelectAsPlainArray<T, TArg, TResult>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, TResult> selector) 368public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, int, bool> predicate) 450public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 618public static bool Any<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 647public static bool All<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 678public static T First<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 708public static T? FirstOrDefault<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 739public static T Last<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 769public static T? LastOrDefault<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 802public static T LastOrDefault<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 835public static T? SingleOrDefault<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate) 880public static T SingleOrDefault<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 1007public static int BinarySearchBy<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, int> comparer)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\PooledArrayBuilder`1.cs (11)
754public readonly bool Any<TArg>(TArg arg, Func<T, TArg, bool> predicate) 803public readonly bool All<TArg>(TArg arg, Func<T, TArg, bool> predicate) 913public readonly T First<TArg>(TArg arg, Func<T, TArg, bool> predicate) 1017public readonly T? FirstOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate) 1048public readonly T FirstOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 1114public readonly T Last<TArg>(TArg arg, Func<T, TArg, bool> predicate) 1221public readonly T? LastOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate) 1253public readonly T LastOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 1351public readonly T Single<TArg>(TArg arg, Func<T, TArg, bool> predicate) 1518public readonly T? SingleOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate) 1561public readonly T SingleOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate, T defaultValue)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ReadOnlyListExtensions.cs (12)
63public static ImmutableArray<TResult> SelectAsArray<T, TResult>(this IReadOnlyList<T> list, Func<T, int, TResult> selector) 178public static bool Any<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 233public static bool All<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 307public static T First<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 423public static T? FirstOrDefault<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 456public static T? FirstOrDefault<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 530public static T Last<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 616public static T? LastOrDefault<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 679public static T LastOrDefault<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 785public static T Single<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 922public static T? SingleOrDefault<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate) 1009public static T SingleOrDefault<T, TArg>(this IReadOnlyList<T> list, TArg arg, Func<T, TArg, bool> predicate, T defaultValue)
Microsoft.AspNetCore.Routing (9)
Builder\EndpointFilterExtensions.cs (2)
92public static TBuilder AddEndpointFilter<TBuilder>(this TBuilder builder, Func<EndpointFilterInvocationContext, EndpointFilterDelegate, ValueTask<object?>> routeHandlerFilter) 104public static TBuilder AddEndpointFilterFactory<TBuilder>(this TBuilder builder, Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate> filterFactory)
Builder\RouteHandlerServices.cs (2)
39Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata, 69Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult> populateMetadata,
Matching\ILEmitTrieJumpTable.cs (1)
32internal Func<string, PathSegment, int> _getDestination;
Patterns\RoutePatternFactory.cs (1)
1104Func<int, string, Action<T>>? checkDuplicates = null,
RequestDelegateFilterPipelineBuilder.cs (1)
44var currentFilterFactory = options.EndpointBuilder.FilterFactories[i];
RouteEndpointDataSource.cs (2)
64Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult>? inferMetadataFunc, 347public required Func<MethodInfo, RequestDelegateFactoryOptions?, RequestDelegateMetadataResult>? InferMetadataFunc { get; init; }
Microsoft.AspNetCore.Server.Kestrel.Core (9)
_generated\0\LoggerMessage.g.cs (2)
255public static readonly global::System.Func<__FlaggedObserversStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString(); 1097public static readonly global::System.Func<__Http2FlowControlQueueMaximumTooLowStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
DirectTlsEndpointOptions.cs (1)
45public Func<ConnectionContext?, string?, X509Certificate2?>? ServerCertificateSelector { get; set; }
HttpsConnectionAdapterOptions.cs (1)
57public Func<ConnectionContext?, string?, X509Certificate2?>? ServerCertificateSelector { get; set; }
Internal\AddressBindContext.cs (2)
14Func<ListenOptions, CancellationToken, Task> createBinding) 28public Func<ListenOptions, CancellationToken, Task> CreateBinding { get; }
Internal\Infrastructure\KestrelTrace.cs (1)
25public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Internal\SniOptionsSelector.cs (1)
25private readonly Func<ConnectionContext, string?, X509Certificate2?>? _fallbackServerCertificateSelector;
Middleware\HttpsConnectionMiddleware.cs (1)
43private readonly Func<ConnectionContext, string?, X509Certificate2?>? _serverCertificateSelector;
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (6)
Connection\DirectTlsConnectionListener.cs (2)
30private readonly Func<ConnectionContext?, string?, (TlsContext Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? _contextResolver; 58Func<ConnectionContext?, string?, (TlsContext Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? contextResolver,
DirectTlsTransportFactory.cs (1)
109Func<ConnectionContext?, string?, (TlsContext Context, RemoteCertificateValidationCallback? ClientCertificateValidation)> contextResolver =
TlsEventPump.cs (2)
77private Func<ConnectionContext?, string?, (TlsContext Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? _contextResolver; 173Func<ConnectionContext?, string?, (TlsContext Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? contextResolver,
TlsEventPumpPool.cs (1)
52Func<ConnectionContext?, string?, (TlsContext Context, RemoteCertificateValidationCallback? ClientCertificateValidation)>? contextResolver,
Microsoft.AspNetCore.SignalR.Client.Core (7)
HubConnection.cs (4)
385public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task<object?>> handler, object state) 418public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task> handler, object state) 2395private readonly Func<object?[], object, Task> _callback; 2398public InvocationHandler(Type[] parameterTypes, Func<object?[], object, Task> callback, object state)
HubConnectionExtensions.cs (1)
260public static IDisposable On<T1, T2>(this HubConnection hubConnection, string methodName, Func<T1, T2, Task> handler)
HubConnectionExtensions.OnResult.cs (2)
108public static IDisposable On<T1, T2, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, TResult> handler) 288public static IDisposable On<T1, T2, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, Task<TResult>> handler)
Microsoft.AspNetCore.SignalR.Core (12)
_generated\0\LoggerMessage.g.cs (1)
129public static readonly global::System.Func<__ProtocolVersionFailedStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
DefaultHubLifetimeManager.cs (2)
99private Task SendToAllConnections(string methodName, object?[] args, Func<HubConnectionContext, object?, bool>? include, object? state = null, CancellationToken cancellationToken = default) 147private static void SendToGroupConnections(string methodName, object?[] args, ConcurrentDictionary<string, HubConnectionContext> connections, Func<HubConnectionContext, object?, bool>? include, object? state, ref List<Task>? tasks, ref SerializedHubMessage? message, CancellationToken cancellationToken)
HubConnectionHandler.cs (1)
287private static bool SequenceEqual<T>(IEnumerable<T> current, IEnumerable<T> incoming, Func<T, T, bool> equals)
IHubFilter.cs (1)
34Task OnDisconnectedAsync(HubLifetimeContext context, Exception? exception, Func<HubLifetimeContext, Exception?, Task> next) => next(context, exception);
Internal\DefaultHubDispatcher.cs (2)
33private readonly Func<HubLifetimeContext, Exception?, Task>? _onDisconnectedMiddleware; 77var disconnectedFilter = _onDisconnectedMiddleware;
Internal\HubFilterFactory.cs (1)
56public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception? exception, Func<HubLifetimeContext, Exception?, Task> next)
Internal\HubMethodDescriptor.cs (4)
29private Func<object, CancellationToken, IAsyncEnumerator<object?>>? _makeCancelableEnumerator; 229private static Func<object, CancellationToken, IAsyncEnumerator<object?>> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) 250var lambda = Expression.Lambda<Func<object, CancellationToken, IAsyncEnumerator<object?>>>(methodCall, parameters); 258private static Func<object, CancellationToken, IAsyncEnumerator<object?>> ConvertToEnumeratorWithReflection(MethodInfo adapterMethodInfo, Type streamReturnType)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Internal\RedisSubscriptionManager.cs (2)
13public async Task AddSubscriptionAsync(string id, HubConnectionContext connection, Func<string, HubConnectionStore, Task> subscribeMethod) 42public async Task RemoveSubscriptionAsync(string id, HubConnectionContext connection, object state, Func<object, string, Task> unsubscribeMethod)
Microsoft.Build (73)
BackEnd\Components\Scheduler\Scheduler.cs (1)
993private void AssignUnscheduledRequestsWithPlan(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulingPlan.PlanConfigData, SchedulingPlan.PlanConfigData, bool> comparisonFunction)
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
142private TConfig[] FillConfiguration<TConfig, TRule>(string projectFullPath, IReadOnlyList<TRule> ruleIds, Func<string, TRule, TConfig> configurationProvider)
Evaluation\Expander\ArgumentParser.cs (2)
398internal static bool TryExecuteArithmeticOverload(object[] args, Func<long, long, long> integerOperation, Func<double, double, double> realOperation, out object? resultValue)
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\9f0d3f3da306d8cf\IEnumerableExtensions.cs (13)
25public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 186public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 197public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 235public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 353public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 382public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 415public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 443public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 468public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 511public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 552Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 876public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 908public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\9f0d3f3da306d8cf\ImmutableArrayExtensions.cs (18)
157public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 241public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 404public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 422public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 486public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 546public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 549private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 618public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 634public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 698public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 711public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1139public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1319internal static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer) 1322internal static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> array, TValue value, Func<TElement, TValue, int> comparer) 1350internal static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\ArrayBuilder.cs (7)
234public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 237public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 240public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 279public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 761public bool Any<A>(Func<T, A, bool> predicate, A arg) 785public bool All<A>(Func<T, A, bool> predicate, A arg) 841public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\msbuild\src\Shared\TaskEngineAssemblyResolver.cs (1)
165private Func<AssemblyLoadContext, AssemblyName, Assembly> _eventHandler = null;
Utilities\ImmutableCollectionsExtensions.cs (1)
29public static bool Any<TElement, TArg>(this ImmutableArray<TElement> immutableArray, Func<TElement, TArg, bool> predicate, TArg arg)
Microsoft.Build.Framework (25)
BuildCheck\EnumerableExtensions.cs (2)
87Func<TValue, TValue, TValue> mergeValues) 115Func<TValue, TValue, TValue> mergeValues)
BuildEventArgs.cs (1)
286internal static Func<string, string?[], string> ResourceStringFormatter = (resourceName, arguments) =>
BuildException\BuildExceptionSerializationHelper.cs (8)
14public TypeConstructionTuple(Type type, Func<string, Exception?, BuildExceptionBase> factory) 21public Func<string, Exception?, BuildExceptionBase> Factory { get; } 24private static Dictionary<string, Func<string, Exception?, BuildExceptionBase>>? s_exceptionFactories; 26private static readonly Func<string, Exception?, BuildExceptionBase> s_defaultFactory = 49var exceptionFactories = new Dictionary<string, Func<string, Exception?, BuildExceptionBase>>(); 54Func<string, Exception?, BuildExceptionBase> exceptionFactory = typeConstructionTuple.Factory; 73internal static Func<string, Exception?, BuildExceptionBase> CreateExceptionFactory(string serializationType) 77return s_exceptionFactories.TryGetValue(serializationType, out Func<string, Exception?, BuildExceptionBase>? factory)
Collections\RefArrayBuilder.cs (10)
410public readonly bool Any<TArg>(TArg arg, Func<T, TArg, bool> predicate) 460public readonly bool All<TArg>(TArg arg, Func<T, TArg, bool> predicate) 523public readonly T First<TArg>(TArg arg, Func<T, TArg, bool> predicate) 596public readonly T? FirstOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate) 611public readonly T FirstOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 665public readonly T Last<TArg>(TArg arg, Func<T, TArg, bool> predicate) 738public readonly T? LastOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate) 753public readonly T LastOrDefault<TArg>(TArg arg, Func<T, TArg, bool> predicate, T defaultValue) 788private readonly T? TryGetFirst<TArg>(Func<T, TArg, bool> predicate, TArg arg, out bool found) 835private readonly T? TryGetLast<TArg>(Func<T, TArg, bool> predicate, TArg arg, out bool found)
Coordinator\Messages\ClientMessage.Factory.cs (1)
25private Factory(ClientMessageType messageType, Func<BinaryReader, byte, ClientMessage> messageCreator, byte supportedExtendedFields = 0)
Coordinator\Messages\Message.FactoryBase.cs (2)
30private readonly Func<BinaryReader, byte, TMessage>? _messageCreator; 32protected FactoryBase(TMessageType messageType, Func<BinaryReader, byte, TMessage> messageCreator, byte supportedExtendedFields)
Coordinator\Messages\ServerMessage.Factory.cs (1)
28private Factory(ServerMessageType messageType, Func<BinaryReader, byte, ServerMessage> messageCreator, byte supportedExtendedFields = 0)
Microsoft.Build.Tasks.CodeAnalysis (3)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
195Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 218Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Microsoft.Build.Tasks.Git (3)
GitOperations.cs (3)
347internal static ITaskItem[] GetUntrackedFiles(GitRepository repository, ITaskItem[] files, string projectDirectory, Func<GitEnvironment, string, GitRepository?> repositoryFactory) 382internal static DirectoryNode BuildDirectoryTree(GitRepository repository, Func<GitEnvironment, string, GitRepository?> repositoryFactory) 464internal static int BinarySearch<T, TValue>(IReadOnlyList<T> list, TValue value, Func<T, TValue, int> compare)
Microsoft.CodeAnalysis (163)
Collections\CachingFactory.cs (2)
47private readonly Func<TKey, TValue, bool> _keyValueEquality; 52Func<TKey, TValue, bool> keyValueEquality) :
Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
CommandLine\CommonCompiler.cs (1)
205internal virtual Func<string, MetadataReferenceProperties, PortableExecutableReference> GetMetadataProvider()
CommandLine\CommonCompiler.LoggingMetadataFileReferenceResolver.cs (2)
17private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _provider; 19public LoggingMetadataFileReferenceResolver(RelativePathResolver pathResolver, Func<string, MetadataReferenceProperties, PortableExecutableReference> provider, TouchedFileLogger? logger)
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
43private readonly Func<SyntaxTree, CancellationToken, bool> _isGeneratedCode;
DiagnosticAnalyzer\AnalyzerExecutor.cs (16)
293Func<TAnalysisContext, AnalyzerOptions, TAnalysisContext> withOptions) 411out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 474out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 593out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 645out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 703out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 753out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 783Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 808Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1048Action<AnalyzerDiagnosticReporter, Func<Diagnostic, CancellationToken, bool>, ExecutionData, TArgs, CancellationToken> executeActions, 1049Action<HashSet<TBlockAction>, AnalyzerDiagnosticReporter, Func<Diagnostic, CancellationToken, bool>, ExecutionData, TArgs, CancellationToken> executeBlockActions, 1091out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 1157out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 1176Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1262out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 1280Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic,
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (19)
570private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 599Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 693private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 738Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 777private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 814internal Func<Diagnostic, CancellationToken, bool> IsSupportedDiagnostic => _isSupportedDiagnostic; 832Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1143private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1200Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1392private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1461Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1524private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1566Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1603private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1636Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1676private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1744Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1786private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1851Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic,
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (1)
43internal static void VerifyArguments(Diagnostic diagnostic, Compilation? compilation, Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, CancellationToken cancellationToken)
InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory,
InternalUtilities\SpanUtilities.cs (1)
11public static bool All<TElement, TParam>(this ReadOnlySpan<TElement> span, TParam param, Func<TElement, TParam, bool> predicate)
MetadataReader\MetadataReaderExtensions.cs (1)
177internal static bool DeclaresType(this MetadataReader reader, Func<MetadataReader, TypeDefinition, bool> predicate)
PEWriter\CustomDebugInfoWriter.cs (1)
167Func<LocalScope, ILocalDefinition, T> getInfo)
SourceGeneration\Nodes\PredicateSyntaxStrategy.cs (5)
18private readonly Func<GeneratorSyntaxContext, CancellationToken, T> _transformFunc; 20private readonly Func<SyntaxNode, CancellationToken, bool> _filterFunc; 24Func<SyntaxNode, CancellationToken, bool> filterFunc, 25Func<GeneratorSyntaxContext, CancellationToken, T> transformFunc, 123static ImmutableArray<SyntaxNode> getFilteredNodes(SyntaxNode root, Func<SyntaxNode, CancellationToken, bool> func, CancellationToken token)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (2)
85Func<SyntaxNode, CancellationToken, bool> predicate, 86Func<GeneratorAttributeSyntaxContext, CancellationToken, T> transform)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
57Func<SyntaxNode, CancellationToken, bool> predicate) 156Func<SyntaxNode, CancellationToken, bool> predicate,
SourceGeneration\Nodes\SyntaxValueProvider.cs (2)
42public IncrementalValuesProvider<T> CreateSyntaxProvider<T>(Func<SyntaxNode, CancellationToken, bool> predicate, Func<GeneratorSyntaxContext, CancellationToken, T> transform)
SourceGeneration\Nodes\TransformNode.cs (3)
20private readonly Func<TInput, CancellationToken, ImmutableArray<TOutput>> _func; 26public TransformNode(IIncrementalGeneratorNode<TInput> sourceNode, Func<TInput, CancellationToken, TOutput> userFunc, bool wrapUserFunc = false, IEqualityComparer<TOutput>? comparer = null, string? name = null) 31public TransformNode(IIncrementalGeneratorNode<TInput> sourceNode, Func<TInput, CancellationToken, ImmutableArray<TOutput>> userFunc, bool wrapUserFunc = false, IEqualityComparer<TOutput>? comparer = null, string? name = null)
SourceGeneration\Nodes\ValueSourceExtensions.cs (7)
24public static IncrementalValueProvider<TResult> Select<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, TResult> selector) => new IncrementalValueProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 35public static IncrementalValuesProvider<TResult> Select<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, TResult> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 46public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, ImmutableArray<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 57public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, IEnumerable<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector.WrapUserFunctionAsImmutableArray(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 68public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, ImmutableArray<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 79public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, IEnumerable<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector.WrapUserFunctionAsImmutableArray(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 121internal static IncrementalValuesProvider<TSource> Where<TSource>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, bool> predicate) => source.SelectMany((item, c) => predicate(item, c) ? ImmutableArray.Create(item) : ImmutableArray<TSource>.Empty);
SourceGeneration\UserFunction.cs (4)
63internal static Func<TInput, CancellationToken, TOutput> WrapUserFunction<TInput, TOutput>(this Func<TInput, CancellationToken, TOutput> userFunction, bool catchAnalyzerExceptions) 78internal static Func<TInput, CancellationToken, ImmutableArray<TOutput>> WrapUserFunctionAsImmutableArray<TInput, TOutput>(this Func<TInput, CancellationToken, IEnumerable<TOutput>> userFunction, bool catchAnalyzerExceptions)
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (3)
342Func<int, TArg, byte[]?> getMethodCustomDebugInfo, 343Func<int, TArg, ImmutableArray<string>> getMethodImportStrings, 490Func<int, TArg, ImmutableArray<string>> getMethodImportStrings)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
Symbols\Attributes\MarshalPseudoCustomAttributeData.cs (1)
194Func<TTypeSymbol, TArg, TTypeSymbol> translator, TArg arg)
Syntax\SyntaxList.cs (3)
29protected internal override SyntaxNode ReplaceCore<TNode>(IEnumerable<TNode>? nodes = null, Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, IEnumerable<SyntaxToken>? tokens = null, Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, IEnumerable<SyntaxTrivia>? trivia = null, Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia = null)
Syntax\SyntaxNode.cs (4)
858public TNode? FirstAncestorOrSelf<TNode, TArg>(Func<TNode, TArg, bool> predicate, TArg argument, bool ascendOutOfTrivia = true) 1617Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 1619Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 1621Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia = null)
Syntax\SyntaxNodeExtensions.cs (6)
33Func<SyntaxNode, SyntaxNode, SyntaxNode>? computeReplacementNode, 35Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken, 37Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia) 56public static TRoot ReplaceNodes<TRoot, TNode>(this TRoot root, IEnumerable<TNode> nodes, Func<TNode, TNode, SyntaxNode> computeReplacementNode) 218public static TRoot ReplaceTokens<TRoot>(this TRoot root, IEnumerable<SyntaxToken> tokens, Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken) 247public static TRoot ReplaceTrivia<TRoot>(this TRoot root, IEnumerable<SyntaxTrivia> trivia, Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia> computeReplacementTrivia)
Microsoft.CodeAnalysis.Analyzers (185)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
117ImmutableArray<IArgumentOperation> arguments, bool isUsedAsExtensionMethod, Func<SyntaxGenerator, IEnumerable<SyntaxNode>, SyntaxNode> getReplacementNode,
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory, 56using var _b = PooledDelegates.GetPooledFunction(updateValueFactory, factoryArgument, out var pooledUpdateValueFactory);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 46private readonly Func<T?, T?, bool> _equals = equals;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
30public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 33public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 36public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 39public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (13)
37public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 55public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 72public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 215public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 233public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 250public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 413public readonly Func<TSource, CancellationToken, ValueTask> LoopBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 586Func<TSource, CancellationToken, ValueTask> body) : 612Func<TSource, CancellationToken, ValueTask> body) : 639Func<T, CancellationToken, ValueTask> body) :
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (3)
75Func<SemanticModel, TNode, bool> canReplace, 119Func<SemanticModel, TNode, bool> canReplace, 154Func<ISyntaxFactsService, SyntaxNode, SyntaxNode> getSemanticBoundary,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\OptionsProvider.cs (2)
21private sealed class OptionsReaderProvider<TOptions>(IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader) : OptionsProvider<TOptions> 27public static OptionsProvider<TOptions> GetProvider<TOptions>(this IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader)
Microsoft.CodeAnalysis.AnalyzerUtilities (185)
src\66dd3055a1c91c38\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
798Func<TOperation, object?, PointsToAbstractValue?> baseVisit)
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory, 56using var _b = PooledDelegates.GetPooledFunction(updateValueFactory, factoryArgument, out var pooledUpdateValueFactory);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 46private readonly Func<T?, T?, bool> _equals = equals;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
30public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 33public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 36public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 39public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (13)
37public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 55public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 72public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 215public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 233public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 250public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 413public readonly Func<TSource, CancellationToken, ValueTask> LoopBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 586Func<TSource, CancellationToken, ValueTask> body) : 612Func<TSource, CancellationToken, ValueTask> body) : 639Func<T, CancellationToken, ValueTask> body) :
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\ListExtensions.cs (1)
24public static ImmutableArray<T> ExtractAll<T, TArg>(this List<T> list, Func<T, TArg, bool> predicate, TArg argument)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (1)
184public override void Reset(Func<AnalysisEntity, CopyAbstractValue, CopyAbstractValue> getResetValue)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (1)
88public override void Reset(Func<AnalysisEntity, PointsToAbstractValue, PointsToAbstractValue> getResetValue)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityBasedPredicateAnalysisData.cs (1)
131public virtual void Reset(Func<AnalysisEntity, TValue, TValue> getResetValue)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
45Func<BasicBlock, TAnalysisData, TBlockAnalysisResult> getBlockResult,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\MapAbstractDomain.cs (1)
128Func<TValue, TValue, TValue> intersect)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
Microsoft.CodeAnalysis.CodeStyle (179)
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
28public AccessedFields Where<TArg>(Func<IFieldSymbol, TArg, bool> predicate, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory, 56using var _b = PooledDelegates.GetPooledFunction(updateValueFactory, factoryArgument, out var pooledUpdateValueFactory);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 46private readonly Func<T?, T?, bool> _equals = equals;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
30public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 33public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 36public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 39public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (13)
37public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 55public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 72public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 215public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 233public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 250public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 413public readonly Func<TSource, CancellationToken, ValueTask> LoopBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 586Func<TSource, CancellationToken, ValueTask> body) : 612Func<TSource, CancellationToken, ValueTask> body) : 639Func<T, CancellationToken, ValueTask> body) :
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
246Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
325Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (3)
75Func<SemanticModel, TNode, bool> canReplace, 119Func<SemanticModel, TNode, bool> canReplace, 154Func<ISyntaxFactsService, SyntaxNode, SyntaxNode> getSemanticBoundary,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\OptionsProvider.cs (2)
21private sealed class OptionsReaderProvider<TOptions>(IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader) : OptionsProvider<TOptions> 27public static OptionsProvider<TOptions> GetProvider<TOptions>(this IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader)
Microsoft.CodeAnalysis.CSharp (54)
Binder\Binder_Conversions.cs (2)
672Func<TArg, MethodSymbol, bool> predicate) 763private static MethodSymbol? TryFindSingleMethod<TArg>(TypeSymbol type, string name, TArg arg, Func<TArg, MethodSymbol, bool> predicate)
Binder\PatternExplainer.cs (1)
133Func<ImmutableArray<BoundDecisionDagNode>, bool, bool> handler)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
806private static int? UniqueBestValidIndex<T>(ImmutableArray<T> items, Func<T, bool> valid, Func<T, T, BetterResult> better)
BoundTree\BoundDecisionDag.cs (2)
93public BoundDecisionDag Rewrite(Func<BoundDecisionDagNode, IReadOnlyDictionary<BoundDecisionDagNode, BoundDecisionDagNode>, BoundDecisionDagNode> makeReplacement) 120/// A trivial node replacement function for use with <see cref="Rewrite(Func{BoundDecisionDagNode, IReadOnlyDictionary{BoundDecisionDagNode, BoundDecisionDagNode}, BoundDecisionDagNode})"/>.
BoundTree\BoundNodeExtensions.cs (1)
110Func<TInterpolatedStringType, TArg, bool> stringCallback,
CSharpExtensions.cs (1)
304public static SyntaxToken ReplaceTrivia(this SyntaxToken token, IEnumerable<SyntaxTrivia> trivia, Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia> computeReplacementTrivia)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (2)
545private Symbol? VisitNamedTypeMember<T>(T member, Func<T, T, bool> predicate) 560private T? FindMatchingMember<T>(ISymbolInternal otherTypeOrNamespace, T sourceMember, Func<T, T, bool> predicate)
Emitter\Model\PEModuleBuilder.cs (1)
2026private MethodSymbol EnsurePrivateImplClassMethodExists<TArg>(SyntaxNode syntaxNode, string methodName, Func<SynthesizedPrivateImplementationDetailsType, TArg, MethodSymbol> createMethodSymbol, TArg arg, DiagnosticBag diagnostics)
FlowAnalysis\NullableWalker.cs (5)
4297(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = 4315Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 4344Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 4380(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 4473Func<TypeSymbol, MethodSymbol?, int> inferInitialObjectStateAsContinuation(
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
33private static readonly Func<(int position, Snapshot snapshot), int, int> BinarySearchComparer = (current, target) => current.position.CompareTo(target);
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
236public static bool CheckNestedFunctions(Scope scope, Func<Scope, NestedFunction, bool> func)
Lowering\ClosureConversion\ClosureConversion.cs (1)
674private BoundNode IntroduceFrame(BoundNode node, Analysis.ClosureEnvironment env, Func<ArrayBuilder<BoundExpression>, ArrayBuilder<LocalSymbol>, BoundNode> F)
Lowering\StateMachineRewriter\CapturedSymbol.cs (4)
26public abstract BoundExpression Replacement<TArg>(SyntaxNode node, Func<NamedTypeSymbol, TArg, BoundExpression> makeFrame, TArg arg); 39public override BoundExpression Replacement<TArg>(SyntaxNode node, Func<NamedTypeSymbol, TArg, BoundExpression> makeFrame, TArg arg) 57public override BoundExpression Replacement<TArg>(SyntaxNode node, Func<NamedTypeSymbol, TArg, BoundExpression> makeFrame, TArg arg) 78public override BoundExpression Replacement<TArg>(SyntaxNode node, Func<NamedTypeSymbol, TArg, BoundExpression> makeFrame, TArg arg)
Lowering\StateMachineRewriter\RefInitializationHoister.cs (2)
63Func<THoistedSymbol, TArg, THoistedAccess> createHoistedAccess, 142Func<THoistedSymbol, TArg, THoistedAccess> createHoistedAccess,
Parser\LanguageParser.cs (3)
4473Func<LanguageParser, SyntaxKind, bool> abortFunction, 4515Func<LanguageParser, SyntaxKind, bool> abortFunction, 4563Func<LanguageParser, SyntaxKind, bool> abortFunction,
src\roslyn\src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
57Func<SyntaxNode, int?, bool> shouldSkip,
Symbols\FunctionTypeSymbol.cs (3)
40private readonly Func<Binder, BoundExpression, NamedTypeSymbol?>? _calculateDelegate; 45internal static FunctionTypeSymbol? CreateIfFeatureEnabled(SyntaxNode syntax, Binder binder, Func<Binder, BoundExpression, NamedTypeSymbol?> calculateDelegate) 52private FunctionTypeSymbol(Binder binder, Func<Binder, BoundExpression, NamedTypeSymbol?> calculateDelegate)
Symbols\Source\ExtensionGroupingInfo.cs (1)
456static void checkCollisions(IEnumerable<SourceNamedTypeSymbol> extensions, Func<SourceNamedTypeSymbol, SourceNamedTypeSymbol, bool> compare,
Symbols\Source\SourceAssemblySymbol.cs (1)
1670Func<AttributeSyntax, Binder?, bool> attributeMatches = attribute switch
Symbols\SubstitutedNamedTypeSymbol.cs (1)
27private static readonly Func<Symbol, NamedTypeSymbol, Symbol> s_symbolAsMemberFunc = SymbolExtensions.SymbolAsMember;
Symbols\Symbol_Attributes.cs (2)
309Func<AttributeSyntax, Binder?, bool>? attributeMatchesOpt = null, 594Func<AttributeSyntax, Binder, bool> attributeMatchesOpt,
Syntax\CSharpSyntaxNode.cs (3)
464Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 466Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 468Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia = null)
Syntax\SyntaxReplacer.cs (12)
18Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 20Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 22Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia = null) 43Func<SyntaxNode, SyntaxNode, SyntaxNode>? computeReplacementNode = null, 45Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 47Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia = null) 66private readonly Func<TNode, TNode, SyntaxNode>? _computeReplacementNode; 67private readonly Func<SyntaxToken, SyntaxToken, SyntaxToken>? _computeReplacementToken; 68private readonly Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? _computeReplacementTrivia; 81Func<TNode, TNode, SyntaxNode>? computeReplacementNode, 83Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken, 85Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia)
Utilities\FirstAmongEqualsSet.cs (2)
43private readonly Func<T, T, int> _canonicalComparer; 48Func<T, T, int> canonicalComparer)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\984dec8966cb7923\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
230private static SyntaxKind Aggregate<T>(SyntaxKind seed, SyntaxList<T> nodes, Func<SyntaxKind, T, SyntaxKind> func)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
928Func<TConditionalOrSwitchExpression, ExpressionSyntax, ExpressionSyntax?> getAlternativeArm,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
41Func<TParentExpression, InitializerExpressionSyntax, TParentExpression> withInitializer,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
39Func<TMatch?, ExpressionSyntax, TElementSyntax> createElement)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
176Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
241Func<string, T, SyntaxToken> tokenFactory) 252Func<string, T, SyntaxToken> tokenFactory,
Microsoft.CodeAnalysis.CSharp.Features (12)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (3)
37protected override SyntaxTriviaList CreatePragmaRestoreDirectiveTrivia(Diagnostic diagnostic, Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, bool needsLeadingEndOfLine, bool needsTrailingEndOfLine, CancellationToken cancellationToken) 44Diagnostic diagnostic, Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, bool needsLeadingEndOfLine, bool needsTrailingEndOfLine, CancellationToken cancellationToken) 51SyntaxToken disableOrRestoreKeyword, Diagnostic diagnostic, Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, bool needsLeadingEndOfLine, bool needsTrailingEndOfLine, CancellationToken cancellationToken)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
532Func<IdentifierNameSyntax, TArg, bool> canConvertToSubpattern,
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
377Func<ExpressionSyntax, ExpressionSyntax, StatementSyntax> leafExpressionCreationMethod,
Copilot\CSharpCopilotCodeFixProvider.DocumentChangeCodeAction.cs (1)
23Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument,
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (1)
164Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument,
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1459internal override Func<SyntaxToken, SyntaxToken, bool> AreTokensEquivalent
src\984dec8966cb7923\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
230private static SyntaxKind Aggregate<T>(SyntaxKind seed, SyntaxList<T> nodes, Func<SyntaxKind, T, SyntaxKind> func)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
41Func<TParentExpression, InitializerExpressionSyntax, TParentExpression> withInitializer,
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
39Func<TMatch?, ExpressionSyntax, TElementSyntax> createElement)
src\roslyn\src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
57Func<SyntaxNode, int?, bool> shouldSkip,
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.CodeQuality.Analyzers\Maintainability\CSharpUseCrossPlatformIntrinsicsFixer.cs (1)
32protected override SyntaxNode ReplaceWithBinaryOperator(SyntaxNode currentNode, SyntaxGenerator generator, bool isCommutative, Func<SyntaxNode, SyntaxNode, SyntaxNode?> binaryOpFunc)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Classification\SyntaxClassification\DocCommentCodeBlockClassifier.cs (1)
69Func<TArgs, SyntaxToken, bool> processToken,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
928Func<TConditionalOrSwitchExpression, ExpressionSyntax, ExpressionSyntax?> getAlternativeArm,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
176Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
241Func<string, T, SyntaxToken> tokenFactory) 252Func<string, T, SyntaxToken> tokenFactory,
Microsoft.CodeAnalysis.Extensions.Package (85)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 46private readonly Func<T?, T?, bool> _equals = equals;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Internal\ExtensionMessageHandlerFactory.cs (1)
39Func<object, Type, IExtensionMessageHandlerWrapper<TArgument>> wrapperCreator,
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (2)
InlineHints\OmniSharpInlineHintsService.cs (2)
34private readonly Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>> _getDescriptionAsync; 41Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>> getDescriptionAsync)
Microsoft.CodeAnalysis.Features (46)
AddFileBanner\AddFileBannerHelpers.cs (1)
52Func<SyntaxTrivia, string, SyntaxTrivia> createTrivia)
AddImport\References\Reference.cs (1)
57private static readonly ImmutableArray<Func<Reference, Document, IComparable>> s_comparers
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (2)
47protected abstract SyntaxTriviaList CreatePragmaDisableDirectiveTrivia(Diagnostic diagnostic, Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, bool needsLeadingEndOfLine, bool needsTrailingEndOfLine, CancellationToken cancellationToken); 48protected abstract SyntaxTriviaList CreatePragmaRestoreDirectiveTrivia(Diagnostic diagnostic, Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, bool needsLeadingEndOfLine, bool needsTrailingEndOfLine, CancellationToken cancellationToken);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
57Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (4)
28Func<SyntaxToken, TextSpan, SyntaxToken> getNewStartToken, 29Func<SyntaxToken, TextSpan, SyntaxToken> getNewEndToken, 107Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, 159Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode,
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionCacheServiceFactory.cs (2)
18Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> processBatchAsync) 24private readonly Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> _processBatchAsync = processBatchAsync;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
436internal abstract Func<SyntaxToken, SyntaxToken, bool> AreTokensEquivalent { get; } 2014Func<TSyntaxNode, TSyntaxNode, bool> areEquivalent, 2015Func<TSyntaxNode, TSyntaxNode, bool>? areSimilar, 2082Func<TSyntaxNode, TSyntaxNode, bool> comparer, 2172private static int IndexOfEquivalent<TSyntaxNode>(SyntaxNode newNode, List<SyntaxNode?> oldNodes, int startIndex, Func<TSyntaxNode, TSyntaxNode, bool> comparer)
EditAndContinue\ActiveStatementsMap.cs (1)
292Func<TElement, TPosition, int> startPositionComparer)
EditAndContinue\RudeEditDiagnosticsBuilder.cs (1)
44public ImmutableArray<RudeEditDiagnostic> GetAllDiagnostics(Func<RudeEditDiagnostic, RudeEditReportingCondition, bool> includeDeferred)
EditAndContinue\TraceLog.cs (1)
92public async ValueTask WriteAsync(Func<Stream, CancellationToken, ValueTask> writer, DebuggingSessionId sessionId, string directory, string fileName, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (1)
109private static TNode? FindNode<TNode>(RegexNode node, VirtualChar ch, Func<TNode, VirtualChar, bool> predicate)
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
280Func<DocumentId, TextSpan, bool> filter,
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (1)
212private static async Task<TResult?> GetOrDefaultAsync<TData, TResult>(TData value, Func<TData, CancellationToken, Task<TResult?>> funcAsync, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
323private static readonly Func<int, ProjectId, string> s_enqueueLogger = (t, i) => string.Format("[{0}] {1}", t, i.ToString());
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
52Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken)
ExtractMethod\SelectionResult.cs (1)
127private bool CheckNodesInSelection(Func<ISyntaxFacts, SyntaxNode, bool> predicate)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
602Func<SemanticModel, SyntaxGenerator, TStatementSyntax> generateCheck,
InlineHints\InlineHint.cs (4)
20private readonly Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? _getDescriptionAsync; 25Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null) 34Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null) 44Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null)
InlineHints\InlineHintHelpers.cs (1)
19public static Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? GetDescriptionFunction(int position, ISymbol symbol, SymbolDescriptionOptions options)
Navigation\INavigableLocation.cs (2)
23internal sealed class NavigableLocation(Func<NavigationOptions, CancellationToken, Task<bool>> callback) : INavigableLocation 25private readonly Func<NavigationOptions, CancellationToken, Task<bool>> _callback = callback;
Shared\Extensions\DocumentExtensions.cs (2)
44Func<SyntaxNode, SyntaxNode, SyntaxNode> computeReplacementNode, 73Func<Document, CancellationToken, Task<bool>> contextChecker,
SignatureHelp\CommonSignatureHelpUtilities.cs (2)
108Func<TSyntax, SyntaxToken, bool> isArgumentListToken, 125Func<TSyntax, SyntaxToken, bool> isArgumentListToken,
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
28public AccessedFields Where<TArg>(Func<IFieldSymbol, TArg, bool> predicate, TArg arg)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
246Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
325Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\roslyn\src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (2)
126private ProjectOptionsChangeAction(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 131public static ProjectOptionsChangeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution)
src\roslyn\src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (3)
342Func<int, TArg, byte[]?> getMethodCustomDebugInfo, 343Func<int, TArg, ImmutableArray<string>> getMethodImportStrings, 490Func<int, TArg, ImmutableArray<string>> getMethodImportStrings)
Wrapping\WrapItemsAction.cs (1)
20internal sealed class WrapItemsAction(string title, string parentTitle, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument)
Microsoft.CodeAnalysis.Features.ExternalAccess (1)
Copilot\Completion\IContextProvider.cs (1)
19Func<ImmutableArray<IContextItem>, CancellationToken, ValueTask> callback,
Microsoft.CodeAnalysis.NetAnalyzers (28)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotRaiseExceptionsInUnexpectedLocations.cs (2)
130private readonly Func<IMethodSymbol, Compilation, bool> _matchFunction; 148public MethodCategory(Func<IMethodSymbol, Compilation, bool> matchFunction, bool analyzeOnlyPublicMethods, DiagnosticDescriptor rule, params ITypeSymbol?[] allowedExceptionTypes)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClasses.cs (1)
71var instantiatingAttributeChecker = new List<(Func<INamedTypeSymbol, bool> isAttributeTarget, Func<AttributeData, Compilation, INamedTypeSymbol?> findTypeOrDefault)>
Microsoft.CodeQuality.Analyzers\Maintainability\UseCrossPlatformIntrinsicsFixer.cs (1)
69protected abstract SyntaxNode ReplaceWithBinaryOperator(SyntaxNode currentNode, SyntaxGenerator generator, bool isCommutative, Func<SyntaxNode, SyntaxNode, SyntaxNode?> binaryOpFunc);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AssigningSymbolAndItsMemberInSameStatement.cs (1)
80private static bool AnalyzeAssignmentToMember<T>(ISimpleAssignmentOperation assignmentOperation, T instance, Func<T, T, bool> equalityComparer) where T : class, IOperation
Microsoft.NetCore.Analyzers\Runtime\ForwardCancellationTokenToInvocations.Analyzer.cs (1)
280private static bool AnyArgument<TArg>(ImmutableArray<IArgumentOperation> arguments, Func<IArgumentOperation, TArg, bool> predicate, TArg arg)
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.cs (3)
63foreach (var selector in CaseSelectors) 332private static readonly ImmutableArray<Func<IOperation, RequiredSymbols, bool>> CaseSelectors = 333ImmutableArray.Create<Func<IOperation, RequiredSymbols, bool>>(
Microsoft.NetFramework.Analyzers\Helpers\SecurityDiagnosticHelpers.cs (1)
182private static int GetSpecifiedParameterIndex(IMethodSymbol? method, CompilationSecurityTypes xmlTypes, Func<ITypeSymbol, CompilationSecurityTypes, bool> func)
src\9382845807600969\AnalysisEntityBasedPredicateAnalysisData.cs (1)
130public virtual void Reset(Func<AnalysisEntity, TValue, TValue> getResetValue)
src\ffd9070534249528\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
795Func<TOperation, object?, PointsToAbstractValue?> baseVisit)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ImmutableArrayExtensions.cs (1)
52public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
59internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 63internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 67private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 92Expression<Func<T, TProperty, T>> expression = 93Expression.Lambda<Func<T, TProperty, T>>( 118internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 142Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\Extensions\ListExtensions.cs (1)
23public static ImmutableArray<T> ExtractAll<T, TArg>(this List<T> list, Func<T, TArg, bool> predicate, TArg argument)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (1)
183public override void Reset(Func<AnalysisEntity, CopyAbstractValue, CopyAbstractValue> getResetValue)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (1)
87public override void Reset(Func<AnalysisEntity, PointsToAbstractValue, PointsToAbstractValue> getResetValue)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
44Func<BasicBlock, TAnalysisData, TBlockAnalysisResult> getBlockResult,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\MapAbstractDomain.cs (1)
127Func<TValue, TValue, TValue> intersect)
SyntaxEditorBasedCodeFixProvider.cs (1)
58/// <see cref="SyntaxEditor.ReplaceNode(SyntaxNode, Func{SyntaxNode, SyntaxGenerator, SyntaxNode})"/>
SyntaxEditorFixAllProvider.cs (1)
53/// <see cref="SyntaxEditor.ReplaceNode(SyntaxNode, Func{SyntaxNode, SyntaxGenerator, SyntaxNode})"/>
Microsoft.CodeAnalysis.Razor.Compiler (27)
Language\Legacy\SpanEditHandlerBuilder.cs (2)
21private Func<AcceptedCharactersInternal, Func<string, IEnumerable<SyntaxToken>>, SpanEditHandler>? _factory; 46public Func<AcceptedCharactersInternal, Func<string, IEnumerable<SyntaxToken>>, SpanEditHandler>? Factory
Language\Legacy\TokenizerBackedParser.cs (2)
299Func<SyntaxToken, TArg, bool> predicate, 507protected void AcceptWhile<TArg>(Func<SyntaxToken, TArg, bool> condition, TArg arg)
Language\Syntax\RazorSyntaxNode.cs (2)
27Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 29Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null)
Language\Syntax\SyntaxList.cs (2)
63Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 65Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null)
Language\Syntax\SyntaxNode.cs (2)
401Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 403Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null)
Language\Syntax\SyntaxNodeExtensions.cs (4)
146Func<SyntaxNode, SyntaxNode, SyntaxNode> computeReplacementNode, 148Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken) 166public static TRoot ReplaceNodes<TRoot, TNode>(this TRoot root, IEnumerable<TNode> nodes, Func<TNode, TNode, SyntaxNode> computeReplacementNode) 213public static TRoot ReplaceTokens<TRoot>(this TRoot root, IEnumerable<SyntaxToken> tokens, Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken)
Language\Syntax\SyntaxReplacer.cs (8)
17Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 19Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null) 37Func<SyntaxNode, SyntaxNode, SyntaxNode>? computeReplacementNode = null, 39Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null) 58private readonly Func<TNode, TNode, SyntaxNode>? _computeReplacementNode; 59private readonly Func<SyntaxToken, SyntaxToken, SyntaxToken>? _computeReplacementToken; 69Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 71Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null)
Language\TagHelperCollection.cs (1)
251public TagHelperCollection Where<TState>(TState state, Func<TagHelperDescriptor, TState, bool> predicate)
SourceGenerators\IncrementalValueProviderExtensions.cs (4)
17internal static IncrementalValueProvider<T> WithLambdaComparer<T>(this IncrementalValueProvider<T> source, Func<T?, T?, bool> equal) 23internal static IncrementalValuesProvider<T> WithLambdaComparer<T>(this IncrementalValuesProvider<T> source, Func<T?, T?, bool> equal) 74private readonly Func<T?, T?, bool> _equal; 76public LambdaComparer(Func<T?, T?, bool> equal)
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
294Func<string, SourceText, SyntaxTree> createSyntaxTreeFunc)
Microsoft.CodeAnalysis.ResxSourceGenerator (178)
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory, 56using var _b = PooledDelegates.GetPooledFunction(updateValueFactory, factoryArgument, out var pooledUpdateValueFactory);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 46private readonly Func<T?, T?, bool> _equals = equals;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
30public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 33public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 36public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 39public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (13)
37public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 55public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 72public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 215public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 233public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 250public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 413public readonly Func<TSource, CancellationToken, ValueTask> LoopBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 586Func<TSource, CancellationToken, ValueTask> body) : 612Func<TSource, CancellationToken, ValueTask> body) : 639Func<T, CancellationToken, ValueTask> body) :
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
Microsoft.CodeAnalysis.Scripting (4)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (4)
40private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _createFromFileFunc; 54Func<string, MetadataReferenceProperties, PortableExecutableReference>? createFromFileFunc = null) 71Func<string, MetadataReferenceProperties, PortableExecutableReference>? createFromFileFunc = null) 85Func<string, MetadataReferenceProperties, PortableExecutableReference>? createFromfileFunc = null)
Microsoft.CodeAnalysis.VisualBasic (14)
Parser\ParseScan.vb (1)
205Private Function PeekAheadFor(Of TArg)(predicate As Func(Of SyntaxToken, TArg, Boolean), arg As TArg, <Out()> ByRef token As SyntaxToken) As Integer
Symbols\SynthesizedSymbols\SynthesizedClonedTypeParameterSymbol.vb (1)
36mapFunction As Func(Of TypeParameterSymbol, Symbol, TypeParameterSymbol)) As ImmutableArray(Of TypeParameterSymbol)
Syntax\SyntaxReplacer.vb (12)
18Optional computeReplacementNode As Func(Of TNode, TNode, SyntaxNode) = Nothing, 20Optional computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) = Nothing, 22Optional computeReplacementTrivia As Func(Of SyntaxTrivia, SyntaxTrivia, SyntaxTrivia) = Nothing) As SyntaxNode 36Optional computeReplacementNode As Func(Of SyntaxNode, SyntaxNode, SyntaxNode) = Nothing, 38Optional computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) = Nothing, 40Optional computeReplacementTrivia As Func(Of SyntaxTrivia, SyntaxTrivia, SyntaxTrivia) = Nothing) As SyntaxToken 54Private ReadOnly _computeReplacementNode As Func(Of TNode, TNode, SyntaxNode) 55Private ReadOnly _computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) 56Private ReadOnly _computeReplacementTrivia As Func(Of SyntaxTrivia, SyntaxTrivia, SyntaxTrivia) 69computeReplacementNode As Func(Of TNode, TNode, SyntaxNode), 71computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken), 73computeReplacementTrivia As Func(Of SyntaxTrivia, SyntaxTrivia, SyntaxTrivia))
Microsoft.CodeAnalysis.Workspaces (263)
Classification\ClassifierHelper.cs (1)
240Func<TClassifiedSpan, TextSpan, TClassifiedSpan> createSpan)
CodeActions\CodeAction.cs (14)
490internal static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey) 501public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 536public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 540string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey, CodeActionPriority priority, CodeActionCleanup cleanup) 652private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> _createChangedDocument; 653private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>>? _createChangedDocumentPreview; 657Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 658Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>>? createChangedDocumentPreview, 670Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 679Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 699private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution; 705Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 718Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 728Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution,
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (1)
75FixAllContext fixAllContext, Func<Document, Document?, ValueTask> onDocumentFixed)
CodeFixesAndRefactorings\DefaultFixAllProviderHelpers.cs (4)
26Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 52Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 58Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 64Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync)
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (2)
28Func<TFixAllContext, Func<Document, Document?, ValueTask>, Task> getFixedDocumentsAsync)
CodeRefactorings\FixAllOccurences\DocumentBasedRefactorAllProvider.cs (1)
84RefactorAllContext refactorAllContext, Func<Document, Document?, ValueTask> onDocumentRefactored)
Editing\SyntaxEditor.cs (5)
149public void ReplaceNode(SyntaxNode node, Func<SyntaxNode, SyntaxGenerator, SyntaxNode> computeReplacement) 158internal void ReplaceNode(SyntaxNode node, Func<SyntaxNode, SyntaxGenerator, IEnumerable<SyntaxNode>> computeReplacement) 278private readonly Func<SyntaxNode, SyntaxGenerator, SyntaxNode?> _modifier; 282Func<SyntaxNode, SyntaxGenerator, SyntaxNode?> modifier) 295Func<SyntaxNode, SyntaxGenerator, IEnumerable<SyntaxNode>> modifier) : Change(node)
FindSymbols\FindReferences\DependentTypeFinder.cs (1)
65Func<INamedTypeSymbol, SymbolSet, bool> typeMatches,
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
331Func<SyntaxTreeIndex, T, bool> predicate,
Remote\RemoteHostClient.cs (2)
61Func<TService, CancellationToken, ValueTask> invocation, 70Func<TService, CancellationToken, ValueTask<TResult>> invocation,
Remote\RemoteServiceConnection.cs (2)
23Func<TService, CancellationToken, ValueTask> invocation, 27Func<TService, CancellationToken, ValueTask<TResult>> invocation,
Rename\LightweightRenameLocations.cs (1)
128public LightweightRenameLocations Filter(Func<DocumentId, TextSpan, bool> filter)
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory,
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
16public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 19public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 22public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 25public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (3)
75Func<SemanticModel, TNode, bool> canReplace, 119Func<SemanticModel, TNode, bool> canReplace, 154Func<ISyntaxFactsService, SyntaxNode, SyntaxNode> getSemanticBoundary,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\OptionsProvider.cs (2)
21private sealed class OptionsReaderProvider<TOptions>(IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader) : OptionsProvider<TOptions> 27public static OptionsProvider<TOptions> GetProvider<TOptions>(this IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader)
Workspace\Host\Metadata\IMetadataReferenceCacheService.cs (1)
14Func<string, MetadataReferenceProperties, PortableExecutableReference> createReference);
Workspace\Host\Metadata\MetadataReferenceCache.cs (2)
28Func<string, MetadataReferenceProperties, PortableExecutableReference> createReference) 51Func<string, MetadataReferenceProperties, PortableExecutableReference> createReference)
Workspace\Host\Metadata\MetadataServiceFactory.cs (1)
26private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _createReference;
Workspace\Host\SyntaxTreeFactory\ISyntaxTreeCacheService.cs (2)
16Func<TArg, CancellationToken, SyntaxTree> parseSyntaxTree, 17Func<SyntaxNode, TArg, SyntaxTree> createSyntaxTreeFromRoot,
Workspace\IsolatedAnalyzerFileReference.cs (3)
78private ImmutableArray<DiagnosticAnalyzer> PinAnalyzers<TArg>(Func<AnalyzerReference, TArg, ImmutableArray<DiagnosticAnalyzer>> getItems, TArg arg) 81private ImmutableArray<ISourceGenerator> PinGenerators<TArg>(Func<AnalyzerReference, TArg, ImmutableArray<ISourceGenerator>> getItems, TArg arg) 86Func<AnalyzerReference, TArg, ImmutableArray<TItem>> getItems,
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (6)
61private readonly Func<Solution, DocumentId, bool> _documentAlreadyInWorkspace; 68Func<Solution, DocumentId, bool> documentAlreadyInWorkspace, 419Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 421Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments, 434Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 436Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments,
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
77private readonly List<Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState>> _projectPropertyModificationsInBatch = []; 604foreach (var propertyModification in _projectPropertyModificationsInBatch)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (12)
51private readonly Func<bool, ImmutableArray<string>, Task> _onDocumentsAddedMaybeAsync; 81Func<bool, ImmutableArray<string>, Task> onDocumentsAddedMaybeAsync, 271public void ApplyChangeToWorkspaceWithProjectUpdateState(Func<Workspace, ProjectUpdateState, ProjectUpdateState> action) 294/// <inheritdoc cref="ApplyBatchChangeToWorkspaceAsync(Func{SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState}, Action{ProjectUpdateState}?)"/> 295public void ApplyBatchChangeToWorkspace(Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 300/// <inheritdoc cref="ApplyBatchChangeToWorkspaceAsync(Func{SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState}, Action{ProjectUpdateState}?)"/> 301public Task ApplyBatchChangeToWorkspaceAsync(Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 306/// <inheritdoc cref="ApplyBatchChangeToWorkspaceAsync(Func{SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState}, Action{ProjectUpdateState}?)"/> 307public async Task ApplyBatchChangeToWorkspaceMaybeAsync(bool useAsync, Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 323public async Task ApplyBatchChangeToWorkspaceMaybe_NoLockAsync(bool useAsync, Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 370Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 913Func<SolutionServices, TReference, TReference> createNewReference,
Workspace\ProjectSystem\ReferenceFileChangeTracker.cs (2)
38private readonly Func<string, CancellationToken, Task> _callback; 44Func<string, CancellationToken, Task> callback)
Workspace\Solution\DocumentState.cs (1)
24private static readonly Func<string?, PreservationMode, string> s_fullParseLog = (path, mode) => $"{path} : {mode}";
Workspace\Solution\Project.cs (7)
258private static TDocument GetOrAddDocumentUnderLock<TDocument, TArg>(DocumentId documentId, ref Dictionary<DocumentId, TDocument>? idMap, Func<DocumentId, TArg, TDocument> tryCreate, TArg arg) 469Func<SyntaxTreeIndex, CancellationToken, bool> predicate, CancellationToken cancellationToken) 479Func<TopLevelSyntaxTreeIndex, CancellationToken, bool> predicate, CancellationToken cancellationToken) 497private static readonly Func<DocumentId, Project, Document?> s_tryCreateDocumentFunction = 500private static readonly Func<DocumentId, Project, AdditionalDocument?> s_tryCreateAdditionalDocumentFunction = 503private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction = 506private static readonly Func<DocumentId, (SourceGeneratedDocumentState state, Project project), SourceGeneratedDocument> s_createSourceGeneratedDocumentFunction =
Workspace\Solution\Solution.cs (1)
163private static readonly Func<ProjectId, Solution, Project> s_createProjectFunction = CreateProject;
Workspace\Solution\SolutionCompilationState.cs (5)
168Func<StateChange, TArg, TranslationAction?> translate, 273Func<ProjectId, TArgCanReuse, bool> canReuse, 794Func<DocumentInfo.DocumentAttributes, TArg, DocumentInfo.DocumentAttributes> updateAttributes) 888Func<ProjectState, ImmutableArray<TDocumentState>, TranslationAction> getTranslationAction) 1173private static readonly Func<ProjectId, SolutionState, RegularCompilationTracker> s_createCompilationTrackerFunction = CreateCompilationTracker;
Workspace\Solution\SolutionState.cs (1)
973Func<DocumentInfo.DocumentAttributes, TArg, DocumentInfo.DocumentAttributes> updateAttributes)
Workspace\Solution\StateChecksums.cs (3)
542public static Checksum GetOrCreate<TValue, TArg>(TValue value, Func<TValue, TArg, Checksum> checksumCreator, TArg arg) 592public static TResult GetOrCreate<TArg>(TValue value, Func<TValue, TArg, TResult> checksumCreator, TArg arg) 599static TResult GetOrCreateSlow(TValue value, Func<TValue, TArg, TResult> checksumCreator, TArg arg)
Workspace\Solution\TextDocumentStates.cs (2)
134public ImmutableArray<TValue> SelectAsArray<TValue, TArg>(Func<TState, TArg, TValue> selector, TArg arg) 199public TextDocumentStates<TState> UpdateStates<TArg>(Func<TState, TArg, TState> transformation, TArg arg)
Workspace\Solution\VersionSource\SimpleTreeAndVersionSource.cs (2)
36Func<TArg, CancellationToken, Task<TreeAndVersion>> asynchronousComputeFunction, 37Func<TArg, CancellationToken, TreeAndVersion>? synchronousComputeFunction, TArg arg)
Workspace\Workspace.cs (7)
197/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, ValueTuple{WorkspaceChangeKind, ProjectId?, DocumentId?}}, Action{Solution, Solution}?, Action{Solution, Solution}?)"/> 229Func<Solution, Solution, (WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind, 249Func<Solution, Solution, (WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind, 443Func<Solution, TData, Solution> transformation, 462/// <inheritdoc cref="SetCurrentSolution{TData}(TData, Func{Solution, TData, Solution}, bool, Action{Solution, Solution, TData}?, Action{Solution, Solution, TData}?)"/> 466Func<Solution, TData, Solution> transformation, 1248Func<Solution, DocumentId, TextDocument?> getDocumentInSolution,
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\DiagnosticReporterLoggerProvider.cs (1)
40public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Microsoft.CSharp (11)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (5)
144var trueFalseSite = CallSite<Func<CallSite, T, bool>> 152var site = CallSite<Func<CallSite, T, object>> 164var site = CallSite<Func<CallSite, T, K>>.Create(Binder.Convert(kind, type, accessibilityContext)); 306var site = CallSite<Func<CallSite, T, object>>.Create(binder); 419var site = CallSite<Func<CallSite, object, object>>.Create(new GetMemberValueBinder(name, ignoreCase));
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (6)
250private static Func<MemberInfo, MemberInfo, bool> s_MemberEquivalence = (m1, m2) => 265Func<MemberInfo, MemberInfo, bool> apiDelegate = apiMethod.CreateDelegate<Func<MemberInfo, MemberInfo, bool>>(); 287var memberEquivalence = Expression.Lambda<Func<MemberInfo, MemberInfo, bool>>( 307Func<MemberInfo, MemberInfo, bool> fallbackMemberEquivalence = (m1param, m2param) => m1param.IsEquivalentTo(m2param);
Microsoft.Data.Analysis (2)
PrimitiveColumnContainer.cs (1)
178public void ApplyElementwise(Func<T?, long, T?> func)
PrimitiveDataFrameColumn.cs (1)
659public void ApplyElementwise(Func<T?, long, T?> func) => _columnContainer.ApplyElementwise(func);
Microsoft.Diagnostics.NETCore.Client (2)
DiagnosticsIpc\IpcSocket.cs (1)
73Func<AsyncCallback, object, IAsyncResult> beginConnect = (callback, state) => {
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (1)
520Func<AsyncCallback, object, IAsyncResult> beginConnect = (callback, state) => {
Microsoft.DotNet.ApiCompatibility (2)
ApiComparer.cs (1)
25Func<IRuleFactory, IRuleContext, IRuleRunner>? ruleRunnerFactory = null,
ApiComparerFactory.cs (1)
16Func<IRuleFactory, IRuleContext, IRuleRunner>? ruleRunnerFactory = null,
Microsoft.DotNet.Cli.CommandLine (2)
ForwardedOptionExtensions.cs (2)
60private Func<ParseResult, IEnumerable<string>> GetForwardingFunction(Func<TValue, ParseResult, IEnumerable<string>> func) 109public Option<TValue> SetForwardingFunction(Func<TValue?, ParseResult, IEnumerable<string>> func)
Microsoft.DotNet.HotReload.Watch (11)
HotReload\HotReloadDotNetWatcher.cs (3)
987Func<IReadOnlyList<string>, CancellationToken, ValueTask<string>>? frameworkSelector, 988Func<IReadOnlyList<DeviceInfo>, CancellationToken, ValueTask<DeviceInfo>>? deviceSelector, 1201Func<IReadOnlyList<DeviceInfo>, CancellationToken, ValueTask<DeviceInfo>> deviceSelector,
HotReload\ProjectUpdatesBuilder.cs (1)
224Func<IEnumerable<string>, CancellationToken, Task<bool>> restartPrompt,
src\sdk\src\Dotnet.Watch\AspireService\Helpers\LoggerProvider.cs (1)
20public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
src\sdk\src\Dotnet.Watch\HotReloadClient\ClientTransport.cs (1)
39public abstract ValueTask WriteAsync(byte type, Func<Stream, CancellationToken, ValueTask>? writePayload, CancellationToken cancellationToken);
src\sdk\src\Dotnet.Watch\HotReloadClient\NamedPipeClientTransport.cs (1)
66public override async ValueTask WriteAsync(byte type, Func<Stream, CancellationToken, ValueTask>? writePayload, CancellationToken cancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\WebSocketClientTransport.cs (2)
78public override ValueTask WriteAsync(byte type, Func<Stream, CancellationToken, ValueTask>? writePayload, CancellationToken cancellationToken) 167public async ValueTask WriteAsync(byte type, Func<Stream, CancellationToken, ValueTask>? writePayload, CancellationToken cancellationToken)
UI\IReporter.cs (1)
97public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Utilities\ImmutableDictionaryExtensions.cs (1)
40public static Task ForEachValueAsync<TKey, TValue>(this ImmutableDictionary<TKey, ImmutableArray<TValue>> dictionary, Func<TValue, CancellationToken, Task> action, CancellationToken cancellationToken)
Microsoft.DotNet.HotReload.WebAssembly.Browser (4)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (4)
38private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _assemblyResolvingHandlerToInstall; 39private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _installedAssemblyResolvingHandler; 45Func<AssemblyLoadContext, AssemblyName, Assembly?>? assemblyResolvingHandler, 125var handler = Interlocked.Exchange(ref _assemblyResolvingHandlerToInstall, null);
Microsoft.Extensions.AI (19)
ChatCompletion\ChatClientBuilder.cs (2)
18private List<Func<IChatClient, IServiceProvider, IChatClient>>? _clientFactories; 82public ChatClientBuilder Use(Func<IChatClient, IServiceProvider, IChatClient> clientFactory)
ChatCompletion\FunctionInvokingChatClient.cs (1)
274public Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>>? FunctionInvoker { get; set; }
Common\FunctionInvocationProcessor.cs (2)
25private readonly Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>> _invokeFunction; 42Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>> invokeFunction,
Embeddings\EmbeddingGeneratorBuilder.cs (2)
21private List<Func<IEmbeddingGenerator<TInput, TEmbedding>, IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>>>? _generatorFactories; 86Func<IEmbeddingGenerator<TInput, TEmbedding>, IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> generatorFactory)
Files\HostedFileClientBuilder.cs (2)
19private List<Func<IHostedFileClient, IServiceProvider, IHostedFileClient>>? _clientFactories; 83public HostedFileClientBuilder Use(Func<IHostedFileClient, IServiceProvider, IHostedFileClient> clientFactory)
Image\ImageGeneratorBuilder.cs (2)
19private List<Func<IImageGenerator, IServiceProvider, IImageGenerator>>? _generatorFactories; 79public ImageGeneratorBuilder Use(Func<IImageGenerator, IServiceProvider, IImageGenerator> generatorFactory)
Realtime\FunctionInvokingRealtimeClient.cs (1)
122public Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>>? FunctionInvoker { get; set; }
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
122private Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>>? FunctionInvoker => _client.FunctionInvoker;
Realtime\RealtimeClientBuilder.cs (2)
19private List<Func<IRealtimeClient, IServiceProvider, IRealtimeClient>>? _clientFactories; 81public RealtimeClientBuilder Use(Func<IRealtimeClient, IServiceProvider, IRealtimeClient> clientFactory)
SpeechToText\SpeechToTextClientBuilder.cs (2)
19private List<Func<ISpeechToTextClient, IServiceProvider, ISpeechToTextClient>>? _clientFactories; 75public SpeechToTextClientBuilder Use(Func<ISpeechToTextClient, IServiceProvider, ISpeechToTextClient> clientFactory)
TextToSpeech\TextToSpeechClientBuilder.cs (2)
19private List<Func<ITextToSpeechClient, IServiceProvider, ITextToSpeechClient>>? _clientFactories; 75public TextToSpeechClientBuilder Use(Func<ITextToSpeechClient, IServiceProvider, ITextToSpeechClient> clientFactory)
Microsoft.Extensions.AI.Abstractions (12)
ChatCompletion\ChatResponseExtensions.cs (1)
438Func<TContent, TContent, bool>? canMerge,
ChatRouting\RoutingChatClient.cs (3)
43Func<RoutingContext, CancellationToken, ValueTask<IChatClient>> clientSelector) 123private readonly Func<RoutingContext, CancellationToken, ValueTask<IChatClient>> _clientSelector; 126Func<RoutingContext, CancellationToken, ValueTask<IChatClient>> clientSelector)
Functions\AIFunctionFactory.cs (5)
788ParameterMarshallers = parameters.Length > 0 ? new Func<AIFunctionArguments, CancellationToken, object?>[parameters.Length] : []; 852public Func<AIFunctionArguments, CancellationToken, object?>[] ParameterMarshallers { get; } 853public Func<object?, CancellationToken, ValueTask<object?>> ReturnParameterMarshaller { get; } 908private static Func<AIFunctionArguments, CancellationToken, object?> GetParameterMarshaller( 1029private static Func<object?, CancellationToken, ValueTask<object?>> GetReturnParameterMarshaller(
Functions\AIFunctionFactoryOptions.cs (1)
150public Func<ParameterInfo, AIFunctionArguments, object?>? BindParameter { get; init; }
Utilities\AIJsonSchemaCreateOptions.cs (1)
25public Func<AIJsonSchemaCreateContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
Utilities\AIJsonSchemaTransformOptions.cs (1)
17public Func<AIJsonSchemaTransformContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
Microsoft.Extensions.AI.Abstractions.Tests (12)
Functions\DelegatingAIFunctionTests.cs (1)
88private sealed class OverridesInvocation(AIFunction innerFunction, Func<AIFunctionArguments, CancellationToken, ValueTask<object?>> invokeAsync) : DelegatingAIFunction(innerFunction)
TestChatClient.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
TestEmbeddingGenerator.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
TestHostedFileClient.cs (2)
27public Func<HostedFileClientOptions?, CancellationToken, IAsyncEnumerable<HostedFileContent>>? ListFilesAsyncCallback { get; set; } 31public Func<Type, object?, object?> GetServiceCallback { get; set; }
TestImageGenerator.cs (1)
21public Func<Type, object?, object?> GetServiceCallback { get; set; }
TestRealtimeClientSession.cs (2)
15public Func<RealtimeClientMessage, CancellationToken, Task>? SendAsyncCallback { get; set; } 21public Func<Type, object?, object?>? GetServiceCallback { get; set; }
TestSpeechToTextClient.cs (1)
36public Func<Type, object?, object?> GetServiceCallback { get; set; }
TestTextToSpeechClient.cs (1)
35public Func<Type, object?, object?> GetServiceCallback { get; set; }
Utilities\AIJsonUtilitiesTests.cs (2)
100case null when property.PropertyType == typeof(Func<AIJsonSchemaCreateContext, JsonNode, JsonNode>): 101Func<AIJsonSchemaCreateContext, JsonNode, JsonNode> transformer = static (context, schema) => (JsonNode)true;
Microsoft.Extensions.AI.Evaluation.NLP (1)
Common\BLEUAlgorithm.cs (1)
140double[]? weights = null, Func<RationalNumber[], int, double[]>? smoothingFunction = null)
Microsoft.Extensions.AI.Integration.Tests (3)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestImageGenerator.cs (1)
21public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (1)
36public Func<Type, object?, object?> GetServiceCallback { get; set; }
Microsoft.Extensions.AI.Templates.Tests (1)
XunitLoggerProvider.cs (1)
42public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.AI.Tests (15)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
123private sealed class CustomCachingChatClient(IChatClient innerClient, IDistributedCache storage, Func<IEnumerable<ChatMessage>, ChatOptions?, bool> enableCaching) :
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
68Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>> invoker = (ctx, ct) => new ValueTask<object?>("test");
Files\HostedFileClientBuilderTests.cs (1)
24Assert.Throws<ArgumentNullException>("clientFactory", () => builder.Use((Func<IHostedFileClient, IServiceProvider, IHostedFileClient>)null!));
Files\OpenTelemetryHostedFileClientTests.cs (1)
596private static Func<Type, object?, object?> CreateMetadataCallback() =>
Functions\AIFunctionFactoryTest.cs (1)
278Func<string, string, string> dotnetFunc3 = [Description("This is a test function")] ([Description("This is A")] a, [Description("This is B")] b) => b + " " + a;
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestEmbeddingGenerator.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestHostedFileClient.cs (2)
27public Func<HostedFileClientOptions?, CancellationToken, IAsyncEnumerable<HostedFileContent>>? ListFilesAsyncCallback { get; set; } 31public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestImageGenerator.cs (1)
21public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestRealtimeClientSession.cs (2)
15public Func<RealtimeClientMessage, CancellationToken, Task>? SendAsyncCallback { get; set; } 21public Func<Type, object?, object?>? GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (1)
36public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestTextToSpeechClient.cs (1)
35public Func<Type, object?, object?> GetServiceCallback { get; set; }
Realtime\RealtimeClientBuilderTests.cs (1)
55Assert.Throws<ArgumentNullException>("clientFactory", () => builder.Use((Func<IRealtimeClient, IServiceProvider, IRealtimeClient>)null!));
Microsoft.Extensions.AmbientMetadata.Application.Tests (2)
AcceptanceTests.cs (2)
58private static async Task RunAsync(Func<ApplicationMetadata, IHostEnvironment, Task> func, string? sectionName) 80private static async Task RunAsync_HostBuilder(Func<ApplicationMetadata, IHostEnvironment, Task> func, string? sectionName)
Microsoft.Extensions.Caching.Abstractions (8)
Hybrid\HybridCache.cs (8)
32public abstract ValueTask<T> GetOrCreateAsync<TState, T>(string key, TState state, Func<TState, CancellationToken, ValueTask<T>> factory, 84Func<TState, CancellationToken, ValueTask<T>> factory, 124Func<TState, CancellationToken, ValueTask<T>> factory, 228Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 245Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 284Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, 325public static readonly Func<Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>>, HybridCacheEntryContext, CancellationToken, ValueTask<T>> Instance = 349public static readonly Func<Func<CancellationToken, ValueTask<T>>, CancellationToken, ValueTask<T>> Instance = static (callback, ct) => callback(ct);
Microsoft.Extensions.Caching.Hybrid (5)
Internal\DefaultHybridCache.cs (2)
138public override ValueTask<T> GetOrCreateAsync<TState, T>(string key, TState state, Func<TState, CancellationToken, ValueTask<T>> underlyingDataCallback, 232Func<TState, CancellationToken, ValueTask<T>> underlyingDataCallback,
Internal\DefaultHybridCache.StampedeStateT.cs (3)
25private Func<TState, CancellationToken, ValueTask<T>>? _underlying; // main data factory 47public void QueueUserWorkItem(in TState state, Func<TState, CancellationToken, ValueTask<T>> underlying, HybridCacheEntryOptions? options) 65public Task ExecuteDirectAsync(in TState state, Func<TState, CancellationToken, ValueTask<T>> underlying, HybridCacheEntryOptions? options)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
LogCollector.cs (1)
116void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.DataIngestion.Tests (2)
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestEmbeddingGenerator.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
Microsoft.Extensions.DependencyInjection (5)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (1)
47private readonly Func<ServiceCacheKey, ServiceCallSite, Func<ServiceProviderEngineScope, object>> _buildTypeDelegate;
ServiceLookup\FactoryCallSite.cs (1)
18public FactoryCallSite(ResultCache cache, Type serviceType, object serviceKey, Func<IServiceProvider, object, object> factory) : base(cache, serviceKey)
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
57private readonly Func<ServiceCacheKey, ServiceCallSite, GeneratedMethod> _buildTypeDelegate;
ServiceLookup\StackGuard.cs (2)
32public TR RunOnEmptyStack<T1, T2, TR>(Func<T1, T2, TR> action, T1 arg1, T2 arg2) 44var t = ((Func<T1, T2, TR>, T1, T2))s;
Microsoft.Extensions.DependencyInjection.Abstractions (35)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (12)
65/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedTransient(IServiceCollection, Type, object, Func{IServiceProvider, object, object})"/> 70Func<IServiceProvider, object?, object> implementationFactory) 124/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedTransient{TService}(IServiceCollection, object, Func{IServiceProvider, object, TService})"/> 128Func<IServiceProvider, object?, TService> implementationFactory) 187/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedScoped(IServiceCollection, Type, object, Func{IServiceProvider, object, object})"/> 192Func<IServiceProvider, object?, object> implementationFactory) 246/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedScoped{TService}(IServiceCollection, object, Func{IServiceProvider, object, TService})"/> 250Func<IServiceProvider, object?, TService> implementationFactory) 309/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedSingleton(IServiceCollection, Type, object, Func{IServiceProvider, object, object})"/> 314Func<IServiceProvider, object?, object> implementationFactory) 388/// <seealso cref="ServiceCollectionServiceExtensions.AddKeyedSingleton{TService}(IServiceCollection, object, Func{IServiceProvider, object, TService})"/> 392Func<IServiceProvider, object?, TService> implementationFactory)
ServiceCollectionServiceExtensions.Keyed.cs (10)
63Func<IServiceProvider, object?, object> implementationFactory) 167Func<IServiceProvider, object?, TService> implementationFactory) 197Func<IServiceProvider, object?, TImplementation> implementationFactory) 256Func<IServiceProvider, object?, object> implementationFactory) 360Func<IServiceProvider, object?, TService> implementationFactory) 390Func<IServiceProvider, object?, TImplementation> implementationFactory) 449Func<IServiceProvider, object?, object> implementationFactory) 553Func<IServiceProvider, object?, TService> implementationFactory) 583Func<IServiceProvider, object?, TImplementation> implementationFactory) 667Func<IServiceProvider, object?, object> implementationFactory,
ServiceDescriptor.cs (13)
111Func<IServiceProvider, object?, object> factory, 233public Func<IServiceProvider, object?, object>? KeyedImplementationFactory 241return (Func<IServiceProvider, object?, object>?)_implementationFactory; 455Func<IServiceProvider, object?, TImplementation> implementationFactory) 489public static ServiceDescriptor KeyedTransient<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) 522public static ServiceDescriptor KeyedTransient(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory) 626Func<IServiceProvider, object?, TImplementation> implementationFactory) 660public static ServiceDescriptor KeyedScoped<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) 693public static ServiceDescriptor KeyedScoped(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory) 804Func<IServiceProvider, object?, TImplementation> implementationFactory) 840Func<IServiceProvider, object?, TService> implementationFactory) 878Func<IServiceProvider, object?, object> implementationFactory) 1032public static ServiceDescriptor DescribeKeyed(Type serviceType, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory, ServiceLifetime lifetime)
Microsoft.Extensions.DependencyInjection.AutoActivation (5)
AutoActivationExtensions.Keyed.cs (5)
105Func<IServiceProvider, object?, TImplementation> implementationFactory) 147Func<IServiceProvider, object?, TService> implementationFactory) 204Func<IServiceProvider, object?, object> implementationFactory) 286Func<IServiceProvider, object?, object> implementationFactory) 339Func<IServiceProvider, object?, TService> implementationFactory)
Microsoft.Extensions.DependencyModel (1)
LinqHelpers.cs (1)
15Func<TSource, TParam1, IEnumerable<TResult>> func, TParam1 param1)
Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore (4)
DbContextHealthCheck.cs (2)
11private static readonly Func<TContext, CancellationToken, Task<bool>> DefaultTestQuery = (dbContext, cancellationToken) => 33var testQuery = options.CustomTestQuery ?? DefaultTestQuery;
DbContextHealthCheckOptions.cs (1)
10public Func<TContext, CancellationToken, Task<bool>>? CustomTestQuery { get; set; }
DependencyInjection\EntityFrameworkCoreHealthChecksBuilderExtensions.cs (1)
57Func<TContext, CancellationToken, Task<bool>>? customTestQuery = default)
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogger.cs (1)
74public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.DotNetDeltaApplier (4)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (4)
38private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _assemblyResolvingHandlerToInstall; 39private Func<AssemblyLoadContext, AssemblyName, Assembly?>? _installedAssemblyResolvingHandler; 45Func<AssemblyLoadContext, AssemblyName, Assembly?>? assemblyResolvingHandler, 125var handler = Interlocked.Exchange(ref _assemblyResolvingHandlerToInstall, null);
Microsoft.Extensions.FileSystemGlobbing (3)
Internal\PatternContexts\CompositePatternContext.cs (1)
17Func<IPatternContext, TFileInfoBase, PatternTestResult> test);
Internal\PatternContexts\IncludesFirstCompositePatternContext.cs (1)
28protected internal override PatternTestResult MatchPatternContexts<TFileInfoBase>(TFileInfoBase fileInfo, Func<IPatternContext, TFileInfoBase, PatternTestResult> test)
Internal\PatternContexts\PreserveOrderCompositePatternContext.cs (1)
27protected internal override PatternTestResult MatchPatternContexts<TFileInfoBase>(TFileInfoBase fileInfo, Func<IPatternContext, TFileInfoBase, PatternTestResult> test)
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
442Func<T, CancellationToken, Task> operation)
Microsoft.Extensions.Http (5)
DependencyInjection\HttpClientBuilderExtensions.cs (3)
518/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder,Func{HttpClient,IServiceProvider,TClient})"/> 522public static IHttpClientBuilder AddTypedClient<TClient>(this IHttpClientBuilder builder, Func<HttpClient, IServiceProvider, TClient> factory) 531internal static IHttpClientBuilder AddTypedClientCore<TClient>(this IHttpClientBuilder builder, Func<HttpClient, IServiceProvider, TClient> factory, bool validateSingleType)
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (2)
786public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, IServiceProvider, TImplementation> factory) 823public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, IServiceProvider, TImplementation> factory)
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\Log.cs (1)
40private static readonly Func<LoggerMessageState, Exception?, string> _originalFormatValueFmtFunc = OriginalFormatValueFmt;
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
DropMessageLogger.cs (1)
23public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\Internal\TestingHandlerStub.cs (2)
13private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 15public TestingHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc)
Microsoft.Extensions.Http.Polly (2)
DependencyInjection\PollyHttpClientBuilderExtensions.cs (2)
95Func<IServiceProvider, HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 167Func<IReadOnlyPolicyRegistry<string>, HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector)
Microsoft.Extensions.Http.Resilience (2)
Hedging\Internals\RequestMessageSnapshotStrategy.cs (1)
19Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback,
Routing\Internal\RoutingResilienceStrategy.cs (1)
26Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback,
Microsoft.Extensions.Http.Resilience.Tests (3)
Hedging\HedgingTests.cs (1)
41private protected HedgingTests(Func<IHttpClientBuilder, Func<RequestRoutingStrategy>, TBuilder> createDefaultBuilder)
Helpers\TestHandlerStub.cs (2)
14private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 21public TestHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc)
Microsoft.Extensions.Logging (6)
FilterLoggingBuilderExtensions.cs (4)
46public static ILoggingBuilder AddFilter(this ILoggingBuilder builder, Func<string?, LogLevel, bool> categoryLevelFilter) => 64public static ILoggingBuilder AddFilter<T>(this ILoggingBuilder builder, Func<string?, LogLevel, bool> categoryLevelFilter) where T : ILoggerProvider => 188public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) => 206public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) where T : ILoggerProvider =>
Logger.cs (2)
27public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 52static void LoggerLog(LogLevel logLevel, EventId eventId, ILogger logger, Exception? exception, Func<TState, Exception?, string> formatter, ref List<Exception>? exceptions, in TState state)
Microsoft.Extensions.Logging.Abstractions (15)
ILogger.cs (1)
23void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter);
LogEntry.cs (2)
22public LogEntry(LogLevel logLevel, string category, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 60public Func<TState, Exception?, string> Formatter { get; }
LoggerExtensions.cs (1)
13private static readonly Func<FormattedLogValues, Exception?, string> _messageFormatter = MessageFormatter;
LoggerMessage.cs (8)
36public static Func<ILogger, T1, IDisposable?> DefineScope<T1>(string formatString) 468public static readonly Func<LogValues, Exception?, string> Callback = (state, exception) => state.ToString(); 506public static readonly Func<LogValues<T0>, Exception?, string> Callback = (state, exception) => state.ToString(); 554public static readonly Func<LogValues<T0, T1>, Exception?, string> Callback = (state, exception) => state.ToString(); 605public static readonly Func<LogValues<T0, T1, T2>, Exception?, string> Callback = (state, exception) => state.ToString(); 660public static readonly Func<LogValues<T0, T1, T2, T3>, Exception?, string> Callback = (state, exception) => state.ToString(); 721public static readonly Func<LogValues<T0, T1, T2, T3, T4>, Exception?, string> Callback = (state, exception) => state.ToString(); 786public static readonly Func<LogValues<T0, T1, T2, T3, T4, T5>, Exception?, string> Callback = (state, exception) => state.ToString();
LoggerT.cs (1)
45void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
NullLogger.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
NullLoggerT.cs (1)
34Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Logging.AzureAppServices (2)
BatchingLogger.cs (2)
31public void Log<TState>(DateTimeOffset timestamp, LogLevel logLevel, EventId _, TState state, Exception exception, Func<TState, Exception, string> formatter) 70public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.Extensions.Logging.Console (3)
ConsoleLogger.cs (1)
46public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
ConsoleLoggerExtensions.Obsolete.cs (2)
96public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, System.Func<string, Logging.LogLevel, bool> filter, bool includeScopes) 110public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, System.Func<string, Logging.LogLevel, bool> filter)
Microsoft.Extensions.Logging.Debug (2)
DebugLogger.cs (1)
39public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
DebugLoggerFactoryExtensions.cs (1)
33public static ILoggerFactory AddDebug(this ILoggerFactory factory, Func<string, LogLevel, bool> filter) => AddDebug(factory);
Microsoft.Extensions.Logging.EventLog (2)
EventLogLogger.cs (1)
75Func<TState, Exception?, string> formatter)
EventLogSettings.cs (1)
31public Func<string, LogLevel, bool>? Filter { get; set; }
Microsoft.Extensions.Logging.EventSource (1)
EventSourceLogger.cs (1)
74public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Logging.MSBuild (2)
MSBuildLogger.cs (2)
61public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 89private static MSBuildMessageParameters FormatMessage<TState>(string category, TState state, Exception? exception, Func<TState, Exception?, string> formatter, IExternalScopeProvider? scopeProvider)
Microsoft.Extensions.Logging.TraceSource (1)
TraceSourceLogger.cs (1)
27public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.ML.Tests (1)
UriLoaderTests.cs (1)
83public Func<Uri, string, bool> ETagMatches { get; set; } = delegate { return false; };
Microsoft.Extensions.Options (10)
AsyncValidateOptions.cs (2)
25public AsyncValidateOptions(string? name, Func<TOptions, CancellationToken, Task<bool>> validation, string failureMessage) 42public Func<TOptions, CancellationToken, Task<bool>> Validation { get; }
OptionsBuilder.cs (4)
399public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation) where TDep : notnull 409public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation, string failureMessage) where TDep : notnull 593public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, CancellationToken, Task<bool>> validation) 602public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, CancellationToken, Task<bool>> validation, string failureMessage)
OptionsCache.cs (2)
50internal TOptions GetOrAdd<TArg>(string? name, Func<string, TArg, TOptions> createOptions, TArg factoryArgument) 60Func<string, TArg, TOptions> localCreateOptions = createOptions;
ValidateOptions.cs (2)
81public ValidateOptions(string? name, TDep dependency, Func<TOptions, TDep, bool> validation, string failureMessage) 99public Func<TOptions, TDep, bool> Validation { get; }
Microsoft.Extensions.Options.Contextual (5)
ContextualOptionsServiceCollectionExtensions.cs (3)
45Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<TOptions>>> loadOptions) 60Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<TOptions>>> loadOptions) 112Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<TOptions>>> loadOptions)
Internal\LoadContextualOptions.cs (2)
24public LoadContextualOptions(string? name, Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<TOptions>>> load) 38public Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<TOptions>>> LoadAction { get; }
Microsoft.Extensions.Options.Contextual.Tests (2)
ContextualOptionsServiceCollectionExtensionsTests.cs (2)
32Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<string>>> loadOptions = 54Func<IOptionsContext, CancellationToken, ValueTask<IConfigureContextualOptions<string>>> loadOptions =
Microsoft.Extensions.Resilience.PerformanceTests (1)
ResilienceEnrichmentBenchmark.cs (1)
60Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback,
Microsoft.Extensions.ServiceDiscovery (1)
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (1)
20public TValue GetOrAdd<TState>(TKey key, Func<TKey, TState, TValue> valueFactory, TState state)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (1)
20public TValue GetOrAdd<TState>(TKey key, Func<TKey, TState, TValue> valueFactory, TState state)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsResolverOptions.cs (1)
32internal Func<Memory<byte>, int, int>? _transportOverride;
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (1)
132public static readonly global::System.Func<__ErrorResponseCodeStruct, global::System.Exception?, string> Format = (state, ex) => state.ToString();
Resolver\DnsResolver.cs (1)
702internal static (DnsDataReader reader, DnsMessageHeader header, SendQueryError sendError) SendDnsQueryCustomTransport(Func<Memory<byte>, int, int> callback, EncodedDomainName dnsSafeName, QueryType queryType)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (6)
DnsSrvServiceEndpointResolverTests.cs (2)
27public Func<string, CancellationToken, ValueTask<AddressResult[]>>? ResolveIPAddressesAsyncFunc2 { get; set; } 31public Func<string, CancellationToken, ValueTask<ServiceResult[]>>? ResolveServiceAsyncFunc { get; set; }
Resolver\LoopbackDnsServer.cs (3)
32private static async Task<int> ProcessRequestCore(IPEndPoint remoteEndPoint, ArraySegment<byte> message, Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action, Memory<byte> responseBuffer) 52public async Task ProcessUdpRequest(Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action) 75public async Task ProcessTcpRequest(Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action)
XunitLoggerFactoryExtensions.cs (1)
78LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
79private sealed class FakeEndpointResolver(Func<IServiceEndpointBuilder, CancellationToken, ValueTask> resolveAsync, Func<ValueTask> disposeAsync) : IServiceEndpointProvider
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (2)
YarpServiceDiscoveryTests.cs (2)
315public Func<string, CancellationToken, ValueTask<AddressResult[]>>? ResolveIPAddressesAsyncFunc2 { get; set; } 319public Func<string, CancellationToken, ValueTask<ServiceResult[]>>? ResolveServiceAsyncFunc { get; set; }
Microsoft.Extensions.Telemetry (17)
Logging\ExtendedLogger.cs (10)
52public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 59ModernPath(logLevel, eventId, msgState, exception, (Func<LoggerMessageState, Exception?, string>)(object)formatter); 216private void ModernPath(LogLevel logLevel, EventId eventId, LoggerMessageState msgState, Exception? exception, Func<LoggerMessageState, Exception?, string> formatter) 291Func<LoggerMessageState, Exception?, string> fmt = s.Formatter!; 337Func<LoggerMessageState, Exception?, string>? fmt = s.Formatter!; 362private void LegacyPath<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 431var fmt = (Func<TState, Exception?, string>)s.Formatter!; 477var fmt = (Func<TState, Exception?, string>)s.Formatter!;
Logging\ExtendedLogger.ModernTagJoiner.cs (1)
19public Func<LoggerMessageState, Exception?, string>? Formatter;
Logging\Import\LoggerInformation.cs (1)
32public Action<LogLevel, EventId, ExtendedLogger.ModernTagJoiner, Exception?, Func<ExtendedLogger.ModernTagJoiner, Exception?, string>> LoggerLog { get; }
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\GetOrAdd\GetOrAddExtensions.cs (1)
26public static TValue GetOrAdd<TKey, TValue, TArg>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Memoization\Memoize.cs (2)
57public static Func<TParameter1, TParameter2, TResult> Function<TParameter1, TParameter2, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TResult>( 58Func<TParameter1, TParameter2, TResult> f)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Memoization\MemoizedFunction.cs (2)
133private readonly Func<TParameter1, TParameter2, TResult> _function; 139public MemoizedFunction(Func<TParameter1, TParameter2, TResult> function)
Microsoft.Extensions.Telemetry.PerformanceTests (1)
BenchLogger.cs (1)
35public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Telemetry.Tests (6)
Logging\ExtendedLoggerFactoryTests.cs (2)
569public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 607public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Logging\ExtendedLoggerTests.cs (2)
1098Func<TState, Exception?, string> formatter) 1161public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) => _provider.State = state?.ToString();
Sampling\RandomProbabilisticSamplerTests.cs (1)
18private readonly Func<IReadOnlyList<KeyValuePair<string, object?>>, Exception?, string> _dummyFormatter = (_, _) => string.Empty;
Sampling\TraceBasedSamplerTests.cs (1)
18private readonly Func<IReadOnlyList<KeyValuePair<string, object?>>, Exception?, string> _dummyFormatter = (_, _) => string.Empty;
Microsoft.Extensions.Validation (1)
ValidationOptions.cs (1)
45public Func<Type, IStringLocalizerFactory, IStringLocalizer> LocalizerProvider { get; set; }
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.Logging.Generated.Tests (3)
LogMethodTests.cs (2)
28public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 41public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Utils.cs (1)
63public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Gen.Logging.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.Metrics.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.MetricsReports.Unit.Tests (1)
RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Interop.ComInterfaceGenerator (5)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (2)
192private readonly Func<TypePositionInfo, StubCodeContext, ResolvedGenerator> _func; 194public CallbackGeneratorResolver(Func<TypePositionInfo, StubCodeContext, ResolvedGenerator> func)
VirtualMethodPointerStubGenerator.cs (3)
25Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator) 198Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator) 329Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
230private sealed class CallbackGeneratorResolver(Func<TypePositionInfo, StubCodeContext, ResolvedGenerator> func) : IMarshallingGeneratorResolver
Microsoft.Maui (1)
Hosting\MauiAppBuilder.cs (1)
200 public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Maui.Controls (5)
AnimationExtensions.cs (2)
191 public static void AnimateKinetic(this IAnimatable self, string name, Func<double, double, bool> callback, double velocity, double drag, Action finished = null, IAnimationManager animationManager = null) 286 static void AnimateKineticInternal(IAnimatable self, IAnimationManager animationManager, string name, Func<double, double, bool> callback, double velocity, double drag, Action finished = null)
DependencyResolver.cs (2)
13 static Func<Type, object[], object> Resolver { get; set; } 16 public static void ResolveUsing(Func<Type, object[], object> resolver)
LegacyLayouts\Constraint.cs (1)
47 public static Constraint RelativeToView(View view, Func<RelativeLayout, View, double> measure)
Microsoft.Maui.Controls.Build.Tasks (1)
TypeReferenceExtensions.cs (1)
275 Func<MethodDefinition, TypeReference, bool> predicate, ModuleDefinition module)
Microsoft.ML.AutoML (3)
API\AutoCatalog.cs (1)
301public SweepableEstimator CreateSweepableEstimator<T>(Func<MLContext, T, IEstimator<ITransformer>> factory, SearchSpace<T> ss = null)
SweepableEstimator\SweepableEstimator.cs (2)
19private readonly Func<MLContext, Parameter, IEstimator<ITransformer>> _factory; 21public SweepableEstimator(Func<MLContext, Parameter, IEstimator<ITransformer>> factory, SearchSpace.SearchSpace ss)
Microsoft.ML.Core (37)
ComponentModel\ComponentFactory.cs (3)
67public static IComponentFactory<TArg1, TComponent> CreateFromFunction<TArg1, TComponent>(Func<IHostEnvironment, TArg1, TComponent> factory) 116private readonly Func<IHostEnvironment, TArg1, TComponent> _factory; 118public SimpleComponentFactory(Func<IHostEnvironment, TArg1, TComponent> factory)
Data\AnnotationUtils.cs (1)
220public static uint GetMaxAnnotationKind(this DataViewSchema schema, out int colMax, string annotationKind, Func<DataViewSchema, int, bool> filterFunc = null)
Data\ServerChannel.cs (2)
102public void Register<T1, T2, TRet>(string name, Func<T1, T2, TRet> func) 224/// <see cref="Func{T1, T2, TResult}"/>, etc.
Utilities\FuncInstanceMethodInfo1`4.cs (4)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 33public FuncInstanceMethodInfo1(Func<T1, T2, TResult> function) 58public static FuncInstanceMethodInfo1<TTarget, T1, T2, TResult> Create(Expression<Func<TTarget, Func<T1, T2, TResult>>> expression) 76Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).Value == typeof(Func<T1, T2, TResult>), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo2`4.cs (4)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 33public FuncInstanceMethodInfo2(Func<T1, T2, TResult> function) 58public static FuncInstanceMethodInfo2<TTarget, T1, T2, TResult> Create(Expression<Func<TTarget, Func<T1, T2, TResult>>> expression) 76Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).Value == typeof(Func<T1, T2, TResult>), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`4.cs (4)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 33public FuncInstanceMethodInfo3(Func<T1, T2, TResult> function) 58public static FuncInstanceMethodInfo3<TTarget, T1, T2, TResult> Create(Expression<Func<TTarget, Func<T1, T2, TResult>>> expression) 76Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).Value == typeof(Func<T1, T2, TResult>), nameof(expression), "Unexpected expression form");
Utilities\FuncMethodInfo1`3.cs (1)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>,
Utilities\FuncMethodInfo2`3.cs (1)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>,
Utilities\FuncMethodInfo3`3.cs (1)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>,
Utilities\FuncStaticMethodInfo1`3.cs (2)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 28public FuncStaticMethodInfo1(Func<T1, T2, TResult> function)
Utilities\FuncStaticMethodInfo2`3.cs (2)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 28public FuncStaticMethodInfo2(Func<T1, T2, TResult> function)
Utilities\FuncStaticMethodInfo3`3.cs (2)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T1, T2, TResult}"/>, 28public FuncStaticMethodInfo3(Func<T1, T2, TResult> function)
Utilities\Heap.cs (8)
20private readonly Func<T, T, bool> _fnReverse; 27public Heap(Func<T, T, bool> fnReverse) 44public Heap(Func<T, T, bool> fnReverse, int capacity) 66public Func<T, T, bool> FnReverse 220private readonly Func<T, T, bool> _fnReverse; 227public Heap(Func<T, T, bool> fnReverse) 244public Heap(Func<T, T, bool> fnReverse, int capacity) 266public Func<T, T, bool> FnReverse
Utilities\Utils.cs (1)
423public static int FindIndexSorted<T, TValue>(this T[] input, int min, int lim, Func<T, TValue, bool> func, TValue value)
Utilities\VBufferUtils.cs (1)
1125public static void ApplyIntoEitherDefined<TSrc, TDst>(in VBuffer<TSrc> src, ref VBuffer<TDst> dst, Func<int, TSrc, TDst> func)
Microsoft.ML.Core.Tests (7)
UnitTests\CoreBaseTestClass.cs (2)
45protected Func<bool> GetComparerOne<T>(DataViewRow r1, DataViewRow r2, int col, Func<T, T, bool> fn) 68protected Func<bool> GetComparerVec<T>(DataViewRow r1, DataViewRow r2, int col, int size, Func<T, T, bool> fn)
UnitTests\TestVBuffer.cs (5)
469private static void NaiveApplyInto<T, TDst>(ref VBuffer<T> a, ref VBuffer<TDst> dst, Func<int, T, TDst> func) 489Func<int, float, float> func = (int ind, float av) => av - ind; 1027private static void TestSame<T>(ref VBuffer<T> expected, ref VBuffer<T> actual, Func<T, T, bool> equalityFunc) 1044private static Func<float, float, bool> FloatEquality(float tol) 1170private static void TestEquivalent<T>(ref VBuffer<T> expected, ref VBuffer<T> actual, Func<T, T, bool> equalityFunc)
Microsoft.ML.Data (22)
Commands\DataCommand.cs (3)
215protected ILegacyDataLoader CreateAndSaveLoader(Func<IHostEnvironment, IMultiStreamSource, ILegacyDataLoader> defaultLoaderFactory = null) 319protected ILegacyDataLoader CreateLoader(Func<IHostEnvironment, IMultiStreamSource, ILegacyDataLoader> defaultLoaderFactory = null) 332Func<IHostEnvironment, IMultiStreamSource, ILegacyDataLoader> defaultLoaderFactory = null,
DataLoadSave\LegacyCompositeDataLoader.cs (1)
276string tag, string creationArgs, Func<IHostEnvironment, IDataView, IDataView> createTransform)
Evaluators\EvaluatorUtils.cs (2)
758Func<RoleMappedData, int, IDataView> getPerInstance = 903Func<IDataView, int, IDataView> keyToValue =
Scorers\MulticlassClassificationScorer.cs (6)
85private readonly Func<ISchemaBoundMapper, DataViewType, bool> _canWrap; 108string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 114string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 239string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap) 262private readonly Func<ISchemaBoundMapper, DataViewType, bool> _canWrap; 283string metadataKind, Func<ISchemaBoundMapper, DataViewType, bool> canWrap)
Scorers\PredictedLabelScorerBase.cs (3)
127Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType) 284Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType, string predictedLabelColumnName = DefaultColumnNames.PredictedLabel) 318Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType)
Transforms\MetadataDispatcher.cs (5)
31public readonly Func<string, int, bool> FilterSrc; 47public ColInfo(DataViewSchema schemaSrc, int indexSrc, Func<string, int, bool> filterSrc, 159Func<string, int, bool> filterSrc = null) 339public Builder BuildMetadata(int index, DataViewSchema schemaSrc, int indexSrc, Func<string, int, bool> filterSrc) 390DataViewSchema schemaSrc = null, int indexSrc = -1, Func<string, int, bool> filterSrc = null)
Transforms\ValueMapping.cs (1)
809Func<DataViewSchema.Column, DataViewSchema.Column, ValueMap> del = CreateValueMapInvoke<int, int>;
Utilities\ColumnCursor.cs (1)
79Func<IDataView, int, IEnumerable<int[]>> del = GetColumnArrayDirect<int>;
Microsoft.ML.DataView (1)
Utils.cs (1)
25public static TRet MarshalInvoke<TArg1, TArg2, TRet>(Func<TArg1, TArg2, TRet> func, Type genArg, TArg1 arg1, TArg2 arg2)
Microsoft.ML.FastTree (1)
SumupPerformanceCommand.cs (1)
160Func<IChannel, Random, IEnumerable<int>> createIntArray;
Microsoft.ML.StandardTrainers (4)
Standard\SdcaBinary.cs (3)
569Func<DataViewRowId, long, long> getIndexFromIdAndRow = GetIndexFromIdAndRowGetter(idToIdx, biasReg.Length); 974Func<DataViewRowId, long, long> getIndexFromIdAndRow = GetIndexFromIdAndRowGetter(idToIdx, biasReg.Length); 1141private protected Func<DataViewRowId, long, long> GetIndexFromIdAndRowGetter(IdToIdxLookup idToIdx, int biasLength)
Standard\SdcaMulticlass.cs (1)
375Func<DataViewRowId, long, long> getIndexFromIdAndRow = GetIndexFromIdAndRowGetter(idToIdx, biasReg.Length);
Microsoft.ML.TestFramework (4)
BaseTestBaseline.cs (1)
438private bool FirstIsSuffix<T>(IEnumerator<T> suffix, IEnumerator<T> seq, Func<T, T, bool> equalFunc = null)
DataPipe\TestDataPipe.cs (1)
228Func<float, float, bool> fn = (x, y) => FloatUtils.GetBits(x) == FloatUtils.GetBits(y);
DataPipe\TestDataPipeBase.cs (2)
1000protected Func<bool> GetComparerOne<T>(DataViewRow r1, DataViewRow r2, int col, Func<T, T, bool> fn) 1017protected Func<bool> GetComparerVec<T>(DataViewRow r1, DataViewRow r2, int col, int size, Func<T, T, bool> fn)
Microsoft.ML.TestFrameworkCommon (1)
TestCommon.cs (1)
131public static bool CompareVec<T>(in VBuffer<T> v1, in VBuffer<T> v2, int size, Func<T, T, bool> fn)
Microsoft.ML.TimeSeries (2)
SsaAnomalyDetectionBase.cs (2)
57public static Func<Double, Double, Double> GetErrorFunction(ErrorFunction errorFunction) 188internal readonly Func<Double, Double, Double> ErrorFunc;
Microsoft.ML.Transforms (15)
CustomMappingCatalog.cs (1)
95public static IDataView FilterByStatefulCustomPredicate<TSrc, TState>(this DataOperationsCatalog catalog, IDataView input, Func<TSrc, TState, bool> filterPredicate,
CustomMappingFilter.cs (3)
133private readonly Func<TSrc, TState, bool> _predicate; 138public StatefulCustomMappingFilter(IHostEnvironment env, IDataView input, Func<TSrc, TState, bool> predicate, Action<TState> stateInitAction) 182var predicate = parent._predicate;
Expression\BuiltinFunctions.cs (1)
92public static MethodInfo Fn<T1, T2, T3>(Func<T1, T2, T3> fn)
Expression\CodeGen.cs (3)
52{ typeFn = typeof(Func<,,>); break; } 682private void CallFnc<T1, T2, TDst>(Func<T1, T2, TDst> fn) 687private void CallBin<T>(Func<T, T, T> fn)
ExpressionTransformer.cs (4)
478var fn = (Func<T0, T1, TDst>)del; 672var fn = (Func<T0, T1, TDst>)del;
LambdaTransform.cs (1)
140Func<TSrc, TState, bool> filterFunc, Action<TState> initStateAction, SchemaDefinition inputSchemaDefinition = null)
PermutationFeatureImportance.cs (1)
27Func<TMetric, TMetric, TMetric> deltaFunc,
PermutationFeatureImportanceExtensions.cs (1)
658Func<TMetric, TMetric, TMetric> deltaFunc,
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
DefineStaticWebAssets.cs (1)
82public Func<string, string, (FileInfo file, long fileLength, DateTimeOffset lastWriteTimeUtc)> TestResolveFileDetails { get; set; }
UpdateStaticWebAssetEndpoints.cs (1)
261Func<string, string, T> createNew,
Microsoft.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
792public static bool TryWrite<T>(Func<Stream, T, bool> func, Stream stream, T value)
Microsoft.TemplateEngine.Cli (1)
Commands\BaseCommand.cs (1)
29protected static readonly Dictionary<string, Func<Func<ParseResult, ITemplateEngineHost>, Command, Command>> SubcommandFactories = new()
Microsoft.TemplateEngine.Core (24)
Expressions\BinaryScope.cs (2)
8private readonly Func<object?, object?, object> _evaluate; 10public BinaryScope(IEvaluable? parent, TOperator @operator, Func<object?, object?, object> evaluate)
Expressions\Cpp\Scope.cs (2)
43public static TResult EvaluateSides<TLeft, TRight, TResult>(object left, object right, Func<object, TLeft> convertLeft, Func<object, TRight> convertRight, Func<TLeft, TRight, TResult> combine) 50public static TResult EvaluateSides<T, TResult>(object left, object right, Func<object, T> convert, Func<T, T, TResult> combine)
Expressions\OperatorSetBuilder.cs (20)
49public OperatorSetBuilder<TToken> Add(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 54public OperatorSetBuilder<TToken> And(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 65public OperatorSetBuilder<TToken> BitwiseAnd(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 70public OperatorSetBuilder<TToken> BitwiseOr(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 86public OperatorSetBuilder<TToken> Divide(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 96public OperatorSetBuilder<TToken> EqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 101public OperatorSetBuilder<TToken> Exponentiate(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 106public OperatorSetBuilder<TToken> GreaterThan(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 111public OperatorSetBuilder<TToken> GreaterThanOrEqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 122public OperatorSetBuilder<TToken> LeftShift(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 127public OperatorSetBuilder<TToken> LessThan(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 132public OperatorSetBuilder<TToken> LessThanOrEqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 149public OperatorSetBuilder<TToken> Multiply(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 162public OperatorSetBuilder<TToken> NotEqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 173public OperatorSetBuilder<TToken> Or(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 185public OperatorSetBuilder<TToken> RightShift(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 190public OperatorSetBuilder<TToken> Subtract(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 213public OperatorSetBuilder<TToken> Xor(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 218private static IEvaluable CreateBinaryChild(IEvaluable active, Operators op, Func<Operators, bool> precedesOperator, Func<object?, object?, object> evaluate) 528private OperatorSetBuilder<TToken> SetupBinary(Operators op, TToken token, Func<object?, object?, object> evaluate, Func<Operators, bool>? precedesOperator = null)
Microsoft.TemplateEngine.Edge (4)
Constraints\SdkVersionConstraintFactory.cs (4)
28private readonly Func<IReadOnlyList<string>, IReadOnlyList<string>, string> _remedySuggestionFactory; 35Func<IReadOnlyList<string>, IReadOnlyList<string>, string> remedySuggestionFactory) 47(NuGetVersionSpecification currentSdkVersion, IEnumerable<NuGetVersionSpecification> installedVersions, Func<IReadOnlyList<string>, IReadOnlyList<string>, string> remedySuggestionFactory) = 91Task<(NuGetVersionSpecification CurrentSdkVersion, IEnumerable<NuGetVersionSpecification> InstalledVersions, Func<IReadOnlyList<string>, IReadOnlyList<string>, string> RemedySuggestionFactory)>
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (2)
Validation\MultiValidationCheck.cs (2)
11internal MultiValidationCheck(string code, IValidationEntry.SeverityLevel severityLevel, Func<ITemplateValidationInfo, T, string> getDescription, Func<ITemplateValidationInfo, IEnumerable<T>> invalidElements) 18internal Func<ITemplateValidationInfo, T, string> GetDescription { get; }
Microsoft.TemplateEngine.Utils (1)
EqualityExtensions.cs (1)
22public static bool AllAreTheSame<T, TValue>(this IEnumerable<T> items, Func<T, TValue?> selector, Func<TValue?, TValue?, bool> comparer)
Microsoft.TestPlatform.CrossPlatEngine (10)
Client\Parallel\ParallelOperationManager.cs (4)
57private readonly Func<TestRuntimeProviderInfo, TWorkload, TManager> _createNewManager; 67private Func<TEventHandler, TManager, TEventHandler>? _getEventHandler; 85public ParallelOperationManager(Func<TestRuntimeProviderInfo, TWorkload, TManager> createNewManager, int parallelLevel) 94Func<TEventHandler, TManager, TEventHandler> getEventHandler,
Client\Parallel\ParallelProxyDiscoveryManager.cs (2)
46Func<TestRuntimeProviderInfo, DiscoveryCriteria, IProxyDiscoveryManager> actualProxyManagerCreator, 56Func<TestRuntimeProviderInfo, DiscoveryCriteria, IProxyDiscoveryManager> actualProxyManagerCreator,
Client\Parallel\ParallelProxyExecutionManager.cs (2)
67Func<TestRuntimeProviderInfo, TestRunCriteria, IProxyExecutionManager> actualProxyManagerCreator, 76Func<TestRuntimeProviderInfo, TestRunCriteria, IProxyExecutionManager> actualProxyManagerCreator,
TestEngine.cs (2)
121Func<TestRuntimeProviderInfo, DiscoveryCriteria, IProxyDiscoveryManager> proxyDiscoveryManagerCreator = (runtimeProviderInfo, discoveryCriteria) => 216Func<TestRuntimeProviderInfo, TestRunCriteria, IProxyExecutionManager> proxyExecutionManagerCreator = (runtimeProviderInfo, runCriteria) =>
Microsoft.TestPlatform.Filter.Source (1)
FilterExpression.cs (1)
334private T IterateFilterExpression<T>(Func<FilterExpression, Stack<T>, T> getNodeValue)
Microsoft.VisualBasic.Core (6)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (2)
1418Dim c As CallSite(Of Func(Of CallSite, Object, Object)) = 1419CallSite(Of Func(Of CallSite, Object, Object)).Create(action)
Microsoft\VisualBasic\CompilerServices\Utils.vb (4)
346Private s_MemberEquivalence As Func(Of MethodBase, MethodBase, Boolean) = 357Dim memberEquivalence As Func(Of MethodBase, MethodBase, Boolean) = Expression.Lambda(Of Func(Of MethodBase, MethodBase, Boolean))( 375Dim fallbackMemberEquivalence As Func(Of MethodBase, MethodBase, Boolean) = Function(m1param, m2param) m1param.IsEquivalentTo(m2param)
Microsoft.VisualStudio.TestPlatform.Common (1)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterExpression.cs (1)
334private T IterateFilterExpression<T>(Func<FilterExpression, Stack<T>, T> getNodeValue)
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Nuget.Frameworks\FrameworkReducer.cs (1)
301private IEnumerable<NuGetFramework> ReduceCore(IEnumerable<NuGetFramework> frameworks, Func<NuGetFramework, NuGetFramework, bool> isCompat)
Mono.Cecil (3)
Mono.Cecil.PE\Image.cs (1)
141 public TRet GetReaderAt<TItem, TRet> (RVA rva, TItem item, Func<TItem, BinaryStreamReader, TRet> read) where TRet : class
Mono.Cecil\ModuleDefinition.cs (2)
1005 internal TRet Read<TItem, TRet> (TItem item, Func<TItem, MetadataReader, TRet> read) 1020 internal TRet Read<TItem, TRet> (ref TRet variable, TItem item, Func<TItem, MetadataReader, TRet> read) where TRet : class
MSBuild (1)
src\msbuild\src\Shared\TaskEngineAssemblyResolver.cs (1)
165private Func<AssemblyLoadContext, AssemblyName, Assembly> _eventHandler = null;
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
236[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,,>))]
netstandard (1)
netstandard.cs (1)
804[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,,>))]
NuGet.Build.Tasks.Console (2)
MSBuildStaticGraphRestore.cs (2)
958Func<string, (ProjectInstance, string), TProject> createProjectFactory, 1261Func<string, (ProjectInstance, string), TProject> createProjectFactory,
NuGet.CommandLine.XPlat (4)
Commands\Package\Download\PackageDownloadCommand.cs (1)
21public static void Register(Command packageCommand, Option<bool> interactiveOption, Func<PackageDownloadArgs, CancellationToken, Task<int>> action)
Commands\Package\Update\PackageUpdateCommand.cs (1)
23internal static void Register(Command packageCommand, Option<bool> interactiveOption, Func<PackageUpdateArgs, CancellationToken, Task<int>> action)
Commands\Package\Update\PackageUpdateCommandRunner.cs (1)
423Func<string, CancellationToken, Task<(List<PackageUpdateResult>? packagesToUpdate, HashSet<string> scannedPackages, int? errorExitCode)>> processProject,
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (1)
472Func<TItem, CancellationToken, Task<TResult>> taskFactory,
NuGet.Commands (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
NuGet.Common (2)
PathUtil\FileUtility.cs (2)
235public static T SafeRead<T>(string filePath, Func<FileStream, string, T> read) 257public static async Task<T> SafeReadAsync<T>(string filePath, Func<FileStream, string, Task<T>> read)
NuGet.Configuration (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
NuGet.DependencyResolver.Core (1)
GraphModel\GraphOperations.cs (1)
529private static TState ForEachGlobalState<TItem, TState>(this GraphNode<TItem> root, TState state, Func<GraphNode<TItem>, TState, TState> visitor, Func<GraphNode<TItem>, bool> skipNode = null)
NuGet.Frameworks (1)
FrameworkReducer.cs (1)
301private IEnumerable<NuGetFramework> ReduceCore(IEnumerable<NuGetFramework> frameworks, Func<NuGetFramework, NuGetFramework, bool> isCompat)
NuGet.LibraryModel (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
NuGet.PackageManagement (3)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
Utility\XElementExtensions.cs (1)
224private static int CountMatches(XElement left, XElement right, Func<XAttribute, XAttribute, bool> matcher)
NuGet.Packaging (11)
ContentModel\ContentPropertyDefinition.cs (5)
16private static readonly Func<object?, object?, bool> EqualsTest = (left, right) => Equals(left, right); 28Func<object?, object?, bool>? compatibilityTest) 35Func<object?, object?, bool>? compatibilityTest, 52Func<object?, object?, bool>? compatibilityTest, 149public Func<object?, object?, bool> CompatibilityTest { get; }
PackageCreation\Extensions\XElementExtensions.cs (1)
112private static int CountMatches(XElement left, XElement right, Func<XAttribute, XAttribute, bool> matcher)
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (1)
145Func<XNamespace, TItem, XElement> getXElementFromItem,
Rules\DependenciesGroupsForEachTFMRule.cs (1)
63Func<object, object, bool> isCompatible = managedCodeConventions.Properties["tfm"].CompatibilityTest;
Signing\TrustStore\X509TrustStore.cs (1)
43Func<X509StorePurpose, ILogger, IX509ChainFactory> creator)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
NuGet.ProjectModel (3)
JsonUtility.cs (1)
108internal static IList<TItem> ReadObject<TItem>(JObject jObject, Func<string, JToken, TItem> readItem)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
NuGet.Protocol (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
NuGet.Resolver (6)
CombinationSolver.cs (3)
66private readonly Func<T, T, bool> _shouldRejectPair; 70Func<T, T, bool> shouldRejectPairFunc) 120Func<T, T, bool> shouldRejectPairFunc,
CompareWrapper.cs (2)
17private readonly Func<T, T, int> compareImpl; 19public CompareWrapper(Func<T, T, int> compareImpl)
ResolverUtility.cs (1)
330var dependsOn = new Func<ResolverPackage, ResolverPackage, bool>((x, y) =>
NuGet.Versioning (2)
src\nuget-client\build\Shared\EqualityUtility.cs (2)
256Func<TValue, TValue, bool>? compareValues = null) 260Func<TValue, TValue, bool> comparerFunc = (s, o) => comparer.Equals(s, o);
PresentationFramework (1)
MS\Internal\Data\RBTree.cs (1)
452internal int IndexOf(T item, Func<T, T, bool> AreEqual)
PresentationFramework-SystemCore (2)
DynamicAccessorImpl.cs (2)
29_getter = CallSite<Func<CallSite, object, object>>.Create(binder); 46private CallSite<Func<CallSite, object, object>> _getter;
Roslyn.Diagnostics.Analyzers (184)
src\b310f676f7308b7f\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
src\roslyn\src\Compilers\Core\Portable\Collections\OrderPreservingMultiDictionary.cs (2)
112public bool TryGetValue<TArg>(K key, Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value) 232public bool TryGetValue<TArg>(Func<V, TArg, bool> predicate, TArg arg, [MaybeNullWhen(false)] out V value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (3)
28public static TValue GetOrAdd<TKey, TArg, TValue>(this ConcurrentDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 47Func<TKey, TArg, TValue> addValueFactory, 56using var _b = PooledDelegates.GetPooledFunction(updateValueFactory, factoryArgument, out var pooledUpdateValueFactory);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (15)
170public static T? FirstOrNull<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 390public static ImmutableArray<T> WhereAsArray<T, TArg>(this IEnumerable<T> values, Func<T, TArg, bool> predicate, TArg arg) 431public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, int, TResult> selector) 446public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IEnumerable<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 473public static ImmutableArray<TResult> SelectAsArray<TSource, TResult, TArg>(this IReadOnlyCollection<TSource>? source, Func<TSource, TArg, TResult> selector, TArg arg) 496public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IEnumerable<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 520public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, TArg, IEnumerable<TResult>> selector, TArg arg) 561public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector, 848public static int Count<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 863public static T? FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 877public static bool Any<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg) 947public static bool SequenceEqual<T>(this IEnumerable<T>? first, IEnumerable<T>? second, Func<T, T, bool> comparer) 980/// Variant of <see cref="System.Linq.Enumerable.Aggregate{TSource}(IEnumerable{TSource}, Func{TSource, TSource, TSource})"/> 983public static T? AggregateOrDefault<T>(this IEnumerable<T> source, Func<T, T, T> func)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (17)
153public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, TArg, TResult> map, TArg arg) 224public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, TResult> selector, TArg arg) 381public static ImmutableArray<TResult> SelectManyAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, Func<TItem, TArg, OneOrMany<TResult>> selector, TArg arg) 399public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, CancellationToken, ValueTask<TResult>> selector, CancellationToken cancellationToken) 453public static ImmutableArray<TResult> ZipAsArray<T1, T2, TResult>(this ImmutableArray<T1> self, ImmutableArray<T2> other, Func<T1, T2, TResult> map) 501public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 992public static TValue? FirstOrDefault<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1006public static TValue Single<TValue, TArg>(this ImmutableArray<TValue> array, Func<TValue, TArg, bool> predicate, TArg arg) 1033/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.SequenceEqual{TDerived, TBase}(ImmutableArray{TBase}, ImmutableArray{TDerived}, Func{TBase, TBase, bool})"/>. 1098public static int Sum<T>(this ImmutableArray<T> items, Func<T, int, int> selector) 1215public static bool Any<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1229public static bool All<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 1264public static int BinarySearch<TElement, TValue>(this ImmutableArray<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
131public OneOrMany<TResult> Select<TResult, TArg>(Func<T, TArg, TResult> selector, TArg arg) 153public T? FirstOrDefault<TArg>(Func<T, TArg, bool> predicate, TArg arg) 173public bool All<TArg>(Func<T, TArg, bool> predicate, TArg arg) 182public bool Any<TArg>(Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (9)
74public static bool Update<T, TArg>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, TArg, ImmutableSegmentedList<T>> transformer, TArg transformerArgument) 195public static bool Update<T, TArg>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, TArg, ImmutableSegmentedHashSet<T>> transformer, TArg transformerArgument) 319public static bool Update<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, TArg, ImmutableSegmentedDictionary<TKey, TValue>> transformer, TArg transformerArgument) 390/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue, TArg}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TArg, TValue}, TArg)"/> 391public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 496/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, TValue, Func{TKey, TValue, TValue})"/> 497public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
91public static T? SingleOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 115public static T? FirstOrDefault<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg) 126public static int IndexOf<T, TArg>(this in TemporaryArray<T> array, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 46private readonly Func<T?, T?, bool> _equals = equals;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (7)
239public int FindIndex<TArg>(Func<T, TArg, bool> match, TArg arg) 242public int FindIndex<TArg>(int startIndex, Func<T, TArg, bool> match, TArg arg) 245public int FindIndex<TArg>(int startIndex, int count, Func<T, TArg, bool> match, TArg arg) 298public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 836public bool Any<A>(Func<T, A, bool> predicate, A arg) 860public bool All<A>(Func<T, A, bool> predicate, A arg) 914public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (11)
209Func<TKey, TArg, TValue> unboundFunction, TArg argument, 213return GetPooledDelegate<CreateValueCallbackWithBoundArgument<TKey, TArg, TValue>, TArg, Func<TKey, TArg, TValue>, ConditionalWeakTable<TKey, TValue>.CreateValueCallback>(unboundFunction, argument, out boundFunction); 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 250/// Gets a <see cref="Func{T1, T2, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 281public static Releaser GetPooledFunction<T1, T2, TArg, TResult>(Func<T1, T2, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, TResult> boundFunction) 282=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>(unboundFunction, argument, out boundFunction); 422Func<TKey, TArg, TValue>, 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>> 441protected override Func<T1, T2, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`1.cs (4)
19Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 26Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync, 37private static Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<VoidResult>> Convert(Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 113Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
src\roslyn\src\Dependencies\Threading\ParallelExtensions.cs (4)
30public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 33public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 36public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 39public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (13)
37public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 55public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 72public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 109private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 215public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 233public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 250public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 274private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 413public readonly Func<TSource, CancellationToken, ValueTask> LoopBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 586Func<TSource, CancellationToken, ValueTask> body) : 612Func<TSource, CancellationToken, ValueTask> body) : 639Func<T, CancellationToken, ValueTask> body) :
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (5)
24public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 43public static void RemoveOrTransformAll<T, TArg>(this List<T> list, Func<T, TArg, T?> transform, TArg arg) 62public static void RemoveOrTransformAll<T, TArg>(this ArrayBuilder<T> list, Func<T, TArg, T?> transform, TArg arg) 87public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem) 116public static int IndexOf<T, TArg>(this IList<T> list, Func<T, TArg, bool> predicate, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
26public static ImmutableArray<T> ReadArray<T, TArg>(this ObjectReader reader, Func<ObjectReader, TArg, T> read, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
32this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden, CancellationToken cancellationToken) 44this SourceText text, TextSpan span, Func<int, CancellationToken, bool> isPositionHidden,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (4)
540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 621var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 660var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
72Func<SemanticModel?, SyntaxToken, bool> predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (2)
192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 203Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter =
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (6)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 45private readonly Func<FormattingContext, SyntaxToken, int> _baseIndentationGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (4)
46private readonly Func<TokenData, TokenData, TriviaData> _getTriviaData; 47private readonly Func<TokenData, TokenData, TriviaData> _getOriginalTriviaData; 200private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 282private int GetColumn(TokenData tokenData, Func<TokenData, TokenData, TriviaData> triviaDataGetter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
100public static void Log<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel = LogLevel.Debug) 192public static IDisposable LogBlock<TArg0, TArg1>(FunctionId functionId, Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
26public static LogMessage Create<TArg0, TArg1>(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel) 158private Func<TArg0, TArg1, string>? _messageGetter; 162internal static LogMessage Construct(Func<TArg0, TArg1, string> messageGetter, TArg0 arg0, TArg1 arg1, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (7)
180private static readonly Func<string, TextSpan, bool> s_firstCharIsLowerCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsLower(val[span.Start]); 181private static readonly Func<string, TextSpan, bool> s_firstCharIsUpperCase = (val, span) => !DoesCharacterHaveCasing(val[span.Start]) || char.IsUpper(val[span.Start]); 183private static readonly Func<string, TextSpan, bool> s_wordIsAllUpperCase = (val, span) => 196private static readonly Func<string, TextSpan, bool> s_wordIsAllLowerCase = (val, span) => 210string name, TextSpan nameSpan, Func<string, TextSpan, bool> wordCheck, 249Func<string, TextSpan, bool> firstWordCheck, 250Func<string, TextSpan, bool> restWordCheck,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
383Func<TOwningSymbol, int, ITypeSymbol?> getContextualType, 539Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol, 591Func<TContextualSymbol, int, ISymbol?>? getContextualSymbol,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 22public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, T> synchronousComputeFunction, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (10)
22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 23Func<TData, CancellationToken, T>? synchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 57private Func<TData, CancellationToken, T>? _synchronousComputeFunction; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 113Func<TData, CancellationToken, T>? synchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 127Func<TData, CancellationToken, T>? synchronousComputeFunction, 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (2)
31private readonly Func<Enumerator, CancellationToken, ValueTask> _processBatchAsync; 74Func<Enumerator, CancellationToken, ValueTask> processBatchAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
12public static int CompareTo<T, S>(T first, T second, S state, ImmutableArray<Func<T, S, IComparable>> comparableMethods) 14foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
28public static V GetOrAdd<K, V, TArg>(this IDictionary<K, V> dictionary, K key, Func<K, TArg, V> function, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PooledBuilderExtensions.cs (1)
47public static ImmutableDictionary<K, ImmutableArray<V>> ToImmutableMultiDictionaryAndFree<K, V, TArg>(this PooledDictionary<K, ArrayBuilder<V>> builders, Func<K, TArg, bool>? where, TArg whereArg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
31public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
98Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 167Func<INamedTypeSymbol, ISymbol, bool> isValid, 281Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 341Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 342Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 343Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 416Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 417Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 418Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (3)
23private readonly Func<int, IParameterSymbol, int> _parameterAggregator; 24private readonly Func<int, ISymbol, int> _symbolAggregator; 109private static int CombineHashCodes<T>(ImmutableArray<T> array, int currentHash, Func<int, T, int> func)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (3)
75Func<SemanticModel, TNode, bool> canReplace, 119Func<SemanticModel, TNode, bool> canReplace, 154Func<ISyntaxFactsService, SyntaxNode, SyntaxNode> getSemanticBoundary,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Options\OptionsProvider.cs (2)
21private sealed class OptionsReaderProvider<TOptions>(IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader) : OptionsProvider<TOptions> 27public static OptionsProvider<TOptions> GetProvider<TOptions>(this IOptionsReader optionsReader, Func<IOptionsReader, string, TOptions> reader)
Roslyn.Diagnostics.CSharp.Analyzers (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
928Func<TConditionalOrSwitchExpression, ExpressionSyntax, ExpressionSyntax?> getAlternativeArm,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
176Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
241Func<string, T, SyntaxToken> tokenFactory) 252Func<string, T, SyntaxToken> tokenFactory,
rzc (4)
Application.cs (2)
18Func<string, MetadataReferenceProperties, PortableExecutableReference> assemblyReferenceProvider, 48public Func<string, MetadataReferenceProperties, PortableExecutableReference> AssemblyReferenceProvider { get; }
CompilerHost.cs (1)
36public Func<string, MetadataReferenceProperties, PortableExecutableReference> AssemblyReferenceProvider { get; }
RazorSourceGeneratorHost.cs (1)
95Func<string, MetadataReferenceProperties, PortableExecutableReference> referenceProvider,
Shared (4)
Memoization\Memoize.cs (2)
57public static Func<TParameter1, TParameter2, TResult> Function<TParameter1, TParameter2, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TResult>( 58Func<TParameter1, TParameter2, TResult> f)
Memoization\MemoizedFunction.cs (2)
133private readonly Func<TParameter1, TParameter2, TResult> _function; 139public MemoizedFunction(Func<TParameter1, TParameter2, TResult> function)
Shared.Tests (3)
Memoization\MemoizeTests.cs (3)
33Func<int, int, int> adder = (x, y) => x + y; 82Func<int, int, int> adder = (x, y) => 102Func<object?, object?, string> toString = (_, _) =>
Stress.AppHost (1)
InteractionCommands.cs (1)
1093private static void RunInteractionWithDismissValues(string title, Func<bool?, string, Task> action)
System.Collections.Immutable (13)
System\Collections\Immutable\ImmutableArray.cs (2)
338public static ImmutableArray<TResult> CreateRange<TSource, TArg, TResult>(ImmutableArray<TSource> items, Func<TSource, TArg, TResult> selector, TArg arg) 374public static ImmutableArray<TResult> CreateRange<TSource, TArg, TResult>(ImmutableArray<TSource> items, int start, int length, Func<TSource, TArg, TResult> selector, TArg arg)
System\Collections\Immutable\ImmutableInterlocked.cs (5)
78public static bool Update<T, TArg>(ref T location, Func<T, TArg, T> transformer, TArg transformerArgument) where T : class? 167public static bool Update<T, TArg>(ref ImmutableArray<T> location, Func<ImmutableArray<T>, TArg, ImmutableArray<T>> transformer, TArg transformerArgument) 250public static TValue GetOrAdd<TKey, TValue, TArg>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 344public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) where TKey : notnull 392public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory) where TKey : notnull
System\Linq\ImmutableArrayExtensions.cs (6)
55Func<TSource, TCollection, TResult> resultSelector) 231public static bool SequenceEqual<TDerived, TBase>(this ImmutableArray<TBase> immutableArray, ImmutableArray<TDerived> items, Func<TBase, TBase, bool> predicate) where TDerived : TBase 262public static T? Aggregate<T>(this ImmutableArray<T> immutableArray, Func<T, T, T> func) 285public static TAccumulate Aggregate<TAccumulate, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func) 308public static TResult Aggregate<TAccumulate, TResult, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func, Func<TAccumulate, TResult> resultSelector) 713Func<TSource, TCollection, TResult> resultSelector)
System.CommandLine (6)
Command.cs (4)
141public void SetAction(Func<ParseResult, CancellationToken, Task> action) 159/// When possible, prefer using the <see cref="SetAction(Func{ParseResult, CancellationToken, Task})"/> overload 183/// When possible, prefer using the <see cref="SetAction(Func{ParseResult, CancellationToken, Task{int}})"/> overload 206public void SetAction(Func<ParseResult, CancellationToken, Task<int>> action)
Invocation\AnonymousAsynchronousCommandLineAction.cs (2)
11private readonly Func<ParseResult, CancellationToken, Task<int>> _asyncAction; 13internal AnonymousAsynchronousCommandLineAction(Func<ParseResult, CancellationToken, Task<int>> action)
System.ComponentModel.TypeConverter (4)
MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs (4)
499private readonly Func<XElement, XName?, IEnumerable<T>> _func; 503public XDeferredAxis(Func<XElement, XName?, IEnumerable<T>> func, XElement element, XName? name) 543private readonly Func<XElement, XName, T?> _func; 547public XDeferredSingleton(Func<XElement, XName, T?> func, XElement element, XName? name)
System.Composition.Hosting (8)
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryExportDescriptorProvider.cs (2)
22var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>();
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (2)
25var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>();
System\Composition\Hosting\Providers\Lazy\LazyExportDescriptorProvider.cs (2)
23var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>();
System\Composition\Hosting\Providers\Lazy\LazyWithMetadataExportDescriptorProvider.cs (2)
24var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>();
System.Core (1)
System.Core.cs (1)
94[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,,>))]
System.Data.Common (2)
System\Data\LinqDataView.cs (2)
23internal Func<object, DataRow, int>? comparerKeyRow; // comparer for DataView.Find(.. 59Func<object, DataRow, int>? comparerKeyRow,
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DiagLinkedList.cs (2)
74public bool AddIfNotExist(T value, Func<T, T, bool> compare) 96public T? Remove(T value, Func<T, T, bool> compare)
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.cs (1)
274public TReturn Encode<TState, TReturn>(TState state, Func<TState, ReadOnlySpan<byte>, TReturn> encodeCallback)
System.Linq (82)
System\Linq\Aggregate.cs (3)
10public static TSource Aggregate<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, TSource> func) 55public static TAccumulate Aggregate<TSource, TAccumulate>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func) 86public static TResult Aggregate<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)
System\Linq\AggregateBy.cs (6)
31Func<TAccumulate, TSource, TAccumulate> func, 75Func<TAccumulate, TSource, TAccumulate> func, 103private static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateByIterator<TSource, TKey, TAccumulate>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 117static Dictionary<TKey, TAccumulate> PopulateDictionary(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) 135private static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateByIterator<TSource, TKey, TAccumulate>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 149static Dictionary<TKey, TAccumulate> PopulateDictionary(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer)
System\Linq\FullJoin.cs (6)
29/// The following code example demonstrates how to use <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 96/// In relational database terms, the <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements a full outer equijoin. 101public static IEnumerable<TResult> FullJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer = null) 133static IEnumerable<TResult> EmptyOuterIterator(IEnumerable<TInner> inner, Func<TOuter?, TInner?, TResult> resultSelector) 141static IEnumerable<TResult> EmptyInnerIterator(IEnumerable<TOuter> outer, Func<TOuter?, TInner?, TResult> resultSelector) 177private static IEnumerable<TResult> FullJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\Grouping.cs (8)
63public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector) => 66public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 91public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector) => 94public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 130private readonly Func<TKey, IEnumerable<TElement>, TResult> _resultSelector; 135public GroupByResultIterator(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 187private readonly Func<TKey, IEnumerable<TSource>, TResult> _resultSelector; 192public GroupByResultIterator(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\GroupJoin.cs (3)
58public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector) => 61public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 111private static IEnumerable<TResult> GroupJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\Join.cs (13)
26/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> to perform an inner join of two sequences based on a common key. 96/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> 100/// In relational database terms, the <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method implements an inner equijoin. 104/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method, 106/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method, 110public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector) => 130/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 200/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 204/// In relational database terms, the <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements an inner equijoin. 208/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method, 210/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method, 214public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 249private static IEnumerable<TResult> JoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\LeftJoin.cs (11)
26/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> to perform aa left outer join of two sequences based on a common key. 97/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> 101/// In relational database terms, the <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method implements an outer left equijoin. 105/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method. 109public static IEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner?, TResult> resultSelector) => 129/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> to perform aa left outer join of two sequences based on a common key. 200/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 204/// In relational database terms, the <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements an outer left equijoin. 208/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method. 212public static IEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 247private static IEnumerable<TResult> LeftJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\Lookup.cs (2)
160internal List<TResult> ToList<TResult>(Func<TKey, IEnumerable<TElement>, TResult> resultSelector) 185public IEnumerable<TResult> ApplyResultSelector<TResult>(Func<TKey, IEnumerable<TElement>, TResult> resultSelector)
System\Linq\Lookup.SpeedOpt.cs (1)
11internal TResult[] ToArray<TResult>(Func<TKey, IEnumerable<TElement>, TResult> resultSelector)
System\Linq\RightJoin.cs (11)
26/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> to perform aa left outer join of two sequences based on a common key. 96/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> 100/// In relational database terms, the <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method implements an outer right equijoin. 104/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method. 108public static IEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner, TResult> resultSelector) => 128/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> to perform aa left outer join of two sequences based on a common key. 198/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 202/// In relational database terms, the <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements an outer right equijoin. 206/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method. 210public static IEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 245private static IEnumerable<TResult> RightJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\Select.cs (2)
73public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, int, TResult> selector) 93private static IEnumerable<TResult> SelectIterator<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, int, TResult> selector)
System\Linq\SelectMany.cs (8)
31public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TResult>> selector) 51private static IEnumerable<TResult> SelectManyIterator<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TResult>> selector) 68public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) 93private static IEnumerable<TResult> SelectManyIterator<TSource, TCollection, TResult>(IEnumerable<TSource> source, Func<TSource, int, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) 110public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) 135private static IEnumerable<TResult> SelectManyIterator<TSource, TCollection, TResult>(IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)
System\Linq\Skip.cs (2)
80public static IEnumerable<TSource> SkipWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate) 100private static IEnumerable<TSource> SkipWhileIterator<TSource>(IEnumerable<TSource> source, Func<TSource, int, bool> predicate)
System\Linq\Take.cs (2)
230public static IEnumerable<TSource> TakeWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate) 250private static IEnumerable<TSource> TakeWhileIterator<TSource>(IEnumerable<TSource> source, Func<TSource, int, bool> predicate)
System\Linq\Where.cs (2)
53public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, int, bool> predicate) 73private static IEnumerable<TSource> WhereIterator<TSource>(IEnumerable<TSource> source, Func<TSource, int, bool> predicate)
System\Linq\Zip.cs (2)
10public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) 85private static IEnumerable<TResult> ZipIterator<TFirst, TSecond, TResult>(IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
System.Linq.AsyncEnumerable (183)
System\Linq\AggregateAsync.cs (8)
24Func<TSource, TSource, TSource> func, 34Func<TSource, TSource, TSource> func, 108Func<TAccumulate, TSource, TAccumulate> func, 119Func<TAccumulate, TSource, TAccumulate> func) 188Func<TAccumulate, TSource, TAccumulate> func, 201Func<TAccumulate, TSource, TAccumulate> func, 236Func<TAccumulate, CancellationToken, ValueTask<TResult>> resultSelector, 249Func<TAccumulate, CancellationToken, ValueTask<TResult>> resultSelector,
System\Linq\AggregateBy.cs (10)
37Func<TAccumulate, TSource, TAccumulate> func, 53Func<TAccumulate, TSource, TAccumulate> func, 106Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 122Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 175Func<TAccumulate, TSource, TAccumulate> func, 191Func<TAccumulate, TSource, TAccumulate> func, 245Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 246Func<TKey, CancellationToken, ValueTask<TAccumulate>> seedSelector, 261Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 262Func<TKey, CancellationToken, ValueTask<TAccumulate>> seedSelector,
System\Linq\AllAsync.cs (2)
63Func<TSource, CancellationToken, 74Func<TSource, CancellationToken, ValueTask<bool>> predicate,
System\Linq\AnyAsync.cs (2)
87Func<TSource, CancellationToken, ValueTask<bool>> predicate, 97Func<TSource, CancellationToken, ValueTask<bool>> predicate,
System\Linq\CountAsync.cs (4)
89Func<TSource, CancellationToken, ValueTask<bool>> predicate, 99Func<TSource, CancellationToken, ValueTask<bool>> predicate, 188Func<TSource, CancellationToken, ValueTask<bool>> predicate, 198Func<TSource, CancellationToken, ValueTask<bool>> predicate,
System\Linq\CountBy.cs (2)
76Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 87IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, IEqualityComparer<TKey>? keyComparer, [EnumeratorCancellation] CancellationToken cancellationToken)
System\Linq\DistinctBy.cs (3)
73/// <para>The <see cref="DistinctBy{TSource, TKey}(IAsyncEnumerable{TSource}, Func{TSource, CancellationToken, ValueTask{TKey}}, IEqualityComparer{TKey}?)" /> method returns an unordered sequence that contains no duplicate values. If <paramref name="comparer" /> is <see langword="null" />, the default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para> 79Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 91Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\Empty.cs (1)
42public IOrderedAsyncEnumerable<TResult> CreateOrderedAsyncEnumerable<TKey>(Func<TResult, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey>? comparer, bool descending)
System\Linq\ExceptBy.cs (2)
89Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 103Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\FirstAsync.cs (5)
96Func<TSource, CancellationToken, ValueTask<bool>> predicate, 106Func<TSource, CancellationToken, ValueTask<bool>> predicate, 190Func<TSource, CancellationToken, ValueTask<bool>> predicate, 242Func<TSource, CancellationToken, ValueTask<bool>> predicate, 253Func<TSource, CancellationToken, ValueTask<bool>> predicate,
System\Linq\FullJoin.cs (11)
35Func<TOuter?, TInner?, TResult> resultSelector, 56Func<TOuter?, TInner?, TResult> resultSelector, 111Func<TOuter?, TInner?, TResult> resultSelector, 122Func<TOuter?, TInner?, TResult> resultSelector, 152Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 153Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 174Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 175Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 293Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 294Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 317Func<TElement, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\GroupBy.cs (16)
66Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 78Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 157Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 158Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, 171Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 172Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, 204Func<TKey, IEnumerable<TSource>, TResult> resultSelector, 218Func<TKey, IEnumerable<TSource>, TResult> resultSelector, 252Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 266Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 305Func<TKey, IEnumerable<TElement>, TResult> resultSelector, 321Func<TKey, IEnumerable<TElement>, TResult> resultSelector, 357Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 358Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, 373Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 374Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector,
System\Linq\GroupJoin.cs (10)
90Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 91Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 106Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 107Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 156Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, 174Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, 219Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 220Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 237Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 238Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector,
System\Linq\IntersectBy.cs (2)
99Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 113Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\Join.cs (10)
38Func<TOuter, TInner, TResult> resultSelector, 55Func<TOuter, TInner, TResult> resultSelector, 109Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 110Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 127Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 128Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 247Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 248Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 263Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 264Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector,
System\Linq\LastAsync.cs (5)
117Func<TSource, CancellationToken, ValueTask<bool>> predicate, 127Func<TSource, CancellationToken, ValueTask<bool>> predicate, 230Func<TSource, CancellationToken, ValueTask<bool>> predicate, 298Func<TSource, CancellationToken, ValueTask<bool>> predicate, 308IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask<bool>> predicate, TSource defaultValue, CancellationToken cancellationToken)
System\Linq\LeftJoin.cs (10)
35Func<TOuter, TInner?, TResult> resultSelector, 52Func<TOuter, TInner?, TResult> resultSelector, 104Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 105Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 122Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 123Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 238Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 239Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 254Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 255Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector,
System\Linq\MaxByAsync.cs (2)
137Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 148Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\MinByAsync.cs (2)
137Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 148Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\OrderBy.cs (9)
57Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 112Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 153Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 191Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 213public IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey>? comparer, bool descending) => 229Debug.Assert(keySelector is Func<TElement, TKey> or Func<TElement, CancellationToken, ValueTask<TKey>>); 342var asyncSelector = (Func<TElement, CancellationToken, ValueTask<TKey>>)keySelector; 451IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey>? comparer, bool descending);
System\Linq\RightJoin.cs (10)
35Func<TOuter?, TInner, TResult> resultSelector, 53Func<TOuter?, TInner, TResult> resultSelector, 105Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 106Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 123Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 124Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 240Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 241Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector, 256Func<TOuter, CancellationToken, ValueTask<TKey>> outerKeySelector, 257Func<TInner, CancellationToken, ValueTask<TKey>> innerKeySelector,
System\Linq\Select.cs (4)
60Func<TSource, CancellationToken, ValueTask<TResult>> selector) 71Func<TSource, CancellationToken, ValueTask<TResult>> selector, 97Func<TSource, int, TResult> selector) 108Func<TSource, int, TResult> selector,
System\Linq\SelectMany.cs (18)
69Func<TSource, CancellationToken, ValueTask<IEnumerable<TResult>>> selector) 80Func<TSource, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, 150Func<TSource, int, IEnumerable<TResult>> selector) 161Func<TSource, int, IEnumerable<TResult>> selector, 234Func<TSource, int, IAsyncEnumerable<TResult>> selector) 245Func<TSource, int, IAsyncEnumerable<TResult>> selector, 283Func<TSource, TCollection, TResult> resultSelector) 296Func<TSource, TCollection, TResult> resultSelector, 332Func<TSource, CancellationToken, ValueTask<IEnumerable<TCollection>>> collectionSelector, 345Func<TSource, CancellationToken, ValueTask<IEnumerable<TCollection>>> collectionSelector, 383Func<TSource, TCollection, TResult> resultSelector) 396Func<TSource, TCollection, TResult> resultSelector, 481Func<TSource, int, IEnumerable<TCollection>> collectionSelector, 482Func<TSource, TCollection, TResult> resultSelector) 494Func<TSource, int, IEnumerable<TCollection>> collectionSelector, 495Func<TSource, TCollection, TResult> resultSelector, 581Func<TSource, int, IAsyncEnumerable<TCollection>> collectionSelector, 594Func<TSource, int, IAsyncEnumerable<TCollection>> collectionSelector,
System\Linq\SingleAsync.cs (5)
120Func<TSource, CancellationToken, ValueTask<bool>> predicate, 130Func<TSource, CancellationToken, ValueTask<bool>> predicate, 254Func<TSource, CancellationToken, ValueTask<bool>> predicate, 320Func<TSource, CancellationToken, ValueTask<bool>> predicate, 331Func<TSource, CancellationToken, ValueTask<bool>> predicate,
System\Linq\SkipWhile.cs (4)
78Func<TSource, CancellationToken, ValueTask<bool>> predicate) 89Func<TSource, CancellationToken, ValueTask<bool>> predicate, 131Func<TSource, int, bool> predicate) 142Func<TSource, int, bool> predicate,
System\Linq\TakeWhile.cs (4)
62Func<TSource, CancellationToken, ValueTask<bool>> predicate) 73Func<TSource, CancellationToken, ValueTask<bool>> predicate, 103Func<TSource, int, bool> predicate) 114Func<TSource, int, bool> predicate,
System\Linq\ToDictionaryAsync.cs (6)
117Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 128Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 206Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 207Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, 219Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 220Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector,
System\Linq\ToLookupAsync.cs (8)
78Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 89Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 182Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 183Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, 195Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 196Func<TSource, CancellationToken, ValueTask<TElement>> elementSelector, 309Func<TElement, CancellationToken, ValueTask<TKey>> keySelector, 425Func<TKey, IEnumerable<TElement>, TResult> resultSelector)
System\Linq\UnionBy.cs (2)
77Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 91Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\Where.cs (4)
55Func<TSource, CancellationToken, ValueTask<bool>> predicate) 66Func<TSource, CancellationToken, ValueTask<bool>> predicate, 94Func<TSource, int, bool> predicate) 105Func<TSource, int, bool> predicate,
System\Linq\Zip.cs (2)
30Func<TFirst, TSecond, TResult> resultSelector) 43Func<TFirst, TSecond, TResult> resultSelector,
System.Linq.Expressions (9)
System\Dynamic\UpdateDelegates.Generated.cs (3)
19var @this = (CallSite<Func<CallSite, T0, TRet>>)site; 20Func<CallSite, T0, TRet>[] applicable; 21Func<CallSite, T0, TRet> rule, originalRule = @this.Target;
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (1)
197return typeof(Func<,,>).MakeGenericType(types);
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (3)
460private readonly Func<T0, T1, TRet> _target; 467_target = (Func<T0, T1, TRet>)target.CreateDelegate(typeof(Func<T0, T1, TRet>));
System\Linq\Expressions\StackGuard.cs (2)
47public R RunOnEmptyStack<T1, T2, R>(Func<T1, T2, R> action, T1 arg1, T2 arg2) => 50var t = ((Func<T1, T2, R>, T1, T2))s;
System.Linq.Parallel (70)
System\Linq\Parallel\Enumerables\AggregationMinMaxHelpers.cs (4)
28Func<Pair<bool, T>, T, Pair<bool, T>> intermediateReduce = MakeIntermediateReduceFunction(sign); 29Func<Pair<bool, T>, Pair<bool, T>, Pair<bool, T>> finalReduce = MakeFinalReduceFunction(sign); 61private static Func<Pair<bool, T>, T, Pair<bool, T>> MakeIntermediateReduceFunction(int sign) 85private static Func<Pair<bool, T>, Pair<bool, T>, Pair<bool, T>> MakeFinalReduceFunction(int sign)
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (4)
54private readonly Func<TIntermediate, TInput, TIntermediate> _intermediateReduce; 57private readonly Func<TIntermediate, TIntermediate, TIntermediate> _finalReduce; 73Func<TIntermediate, TInput, TIntermediate> intermediateReduce, 74Func<TIntermediate, TIntermediate, TIntermediate> finalReduce,
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (2)
30private readonly Func<TLeftInput, IEnumerable<TRightInput>, TOutput> _resultSelector; // The result selection routine. 40Func<TLeftInput, IEnumerable<TRightInput>, TOutput> resultSelector,
System\Linq\Parallel\QueryOperators\Binary\HashJoinQueryOperatorEnumerator.cs (2)
43private readonly Func<TLeftInput, TRightInput, TOutput> _resultSelector; // Result selector. 65Func<TLeftInput, TRightInput, TOutput> resultSelector,
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (2)
46private readonly Func<TLeftInput, TRightInput, TOutput> _resultSelector; // The result selection routine. 56Func<TLeftInput, TRightInput, TOutput> resultSelector,
System\Linq\Parallel\QueryOperators\Binary\ZipQueryOperator.cs (5)
30private readonly Func<TLeftInput, TRightInput, TOutput> _resultSelector; // To select result elements. 47Func<TLeftInput, TRightInput, TOutput> resultSelector) 57Func<TLeftInput, TRightInput, TOutput> resultSelector) 166private readonly Func<TLeftInput, TRightInput, TOutput> _resultSelector; // To select result elements. 173Func<TLeftInput, TRightInput, TOutput> resultSelector, int partitionCount, bool preferStriping)
System\Linq\Parallel\QueryOperators\Unary\IndexedSelectQueryOperator.cs (4)
28private readonly Func<TInput, int, TOutput> _selector; 44Func<TInput, int, TOutput> selector) 137private readonly Func<TInput, int, TOutput> _selector; // The actual select function. 143internal IndexedSelectQueryOperatorEnumerator(QueryOperatorEnumerator<TInput, int> source, Func<TInput, int, TOutput> selector)
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (4)
27private readonly Func<TInputOutput, int, bool> _predicate; 43Func<TInputOutput, int, bool> predicate) 142private readonly Func<TInputOutput, int, bool> _predicate; // The predicate used for filtering. 149internal IndexedWhereQueryOperatorEnumerator(QueryOperatorEnumerator<TInputOutput, int> source, Func<TInputOutput, int, bool> predicate,
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (4)
36private readonly Func<TLeftInput, int, IEnumerable<TRightInput>>? _indexedRightChildSelector; // To select a new child each iteration. 37private readonly Func<TLeftInput, TRightInput, TOutput>? _resultSelector; // An optional result selection function. 54Func<TLeftInput, int, IEnumerable<TRightInput>>? indexedRightChildSelector, 55Func<TLeftInput, TRightInput, TOutput>? resultSelector)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (6)
46private readonly Func<TResult, int, bool>? _indexedPredicate; 68Func<TResult, int, bool>? indexedPredicate, bool take) 138Func<TResult, TKey, bool>? convertedIndexedPredicate = (Func<TResult, TKey, bool>?)(object?)_indexedPredicate; 209private readonly Func<TResult, TKey, bool>? _indexedPredicate; // The actual index-based predicate function. 229QueryOperatorEnumerator<TResult, TKey> source, Func<TResult, bool>? predicate, Func<TResult, TKey, bool>? indexedPredicate, bool take,
System\Linq\ParallelEnumerable.cs (33)
545public static ParallelQuery<TSource> Where<TSource>(this ParallelQuery<TSource> source, Func<TSource, int, bool> predicate) 592this ParallelQuery<TSource> source, Func<TSource, int, TResult> selector) 622this ParallelQuery<TFirst> first, ParallelQuery<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) 651this ParallelQuery<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector) 685Func<TOuter, TInner, TResult> resultSelector) 715Func<TOuter, TInner, TResult> resultSelector) 745Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 782Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 817Func<TOuter, IEnumerable<TInner>, TResult> resultSelector) 848Func<TOuter, IEnumerable<TInner>, TResult> resultSelector) 879Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 917Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 965this ParallelQuery<TSource> source, Func<TSource, int, IEnumerable<TResult>> selector) 995Func<TSource, TCollection, TResult> resultSelector) 1030this ParallelQuery<TSource> source, Func<TSource, int, IEnumerable<TCollection>> collectionSelector, 1031Func<TSource, TCollection, TResult> resultSelector) 1408this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector) 1436this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 1466this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector) 1497this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 1522Func<T, T, T> reduce, T seed, bool seedIsSpecified, bool throwIfEmpty, QueryAggregationOptions options) 1545this ParallelQuery<TSource> source, TAccumulate seed, bool seedIsSpecified, Func<TAccumulate, TSource, TAccumulate> func) 1612this ParallelQuery<TSource> source, Func<TSource, TSource, TSource> func) 1618this ParallelQuery<TSource> source, Func<TSource, TSource, TSource> func, QueryAggregationOptions options) 1660this ParallelQuery<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func) 1666this ParallelQuery<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, QueryAggregationOptions options) 1700this ParallelQuery<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, 1756this ParallelQuery<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> updateAccumulatorFunc, 1757Func<TAccumulate, TAccumulate, TAccumulate> combineAccumulatorsFunc, Func<TAccumulate, TResult> resultSelector) 1811Func<TAccumulate, TSource, TAccumulate> updateAccumulatorFunc, 1812Func<TAccumulate, TAccumulate, TAccumulate> combineAccumulatorsFunc, 4158public static ParallelQuery<TSource> TakeWhile<TSource>(this ParallelQuery<TSource> source, Func<TSource, int, bool> predicate) 4242public static ParallelQuery<TSource> SkipWhile<TSource>(this ParallelQuery<TSource> source, Func<TSource, int, bool> predicate)
System.Linq.Queryable (81)
System\Linq\Queryable.cs (81)
61public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate) 69new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(Where).Method, 111public static IQueryable<TResult> Select<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, int, TResult>> selector) 119new Func<IQueryable<TSource>, Expression<Func<TSource, int, TResult>>, IQueryable<TResult>>(Select).Method, 137public static IQueryable<TResult> SelectMany<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, int, IEnumerable<TResult>>> selector) 145new Func<IQueryable<TSource>, Expression<Func<TSource, int, IEnumerable<TResult>>>, IQueryable<TResult>>(SelectMany).Method, 150public static IQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, int, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector) 159new Func<IQueryable<TSource>, Expression<Func<TSource, int, IEnumerable<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>, IQueryable<TResult>>(SelectMany).Method, 164public static IQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector) 173new Func<IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>, IQueryable<TResult>>(SelectMany).Method, 199/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> to perform an inner join of two sequences based on a common key. 263/// The <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> method 265/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 271/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 281public static IQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector) 292new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IQueryable<TResult>>(Join).Method, 313/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 378/// The <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 380/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 386/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 396public static IQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 407new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(Join).Method, 472public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector) 483new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IQueryable<TResult>>(GroupJoin).Method, 488public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 499new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupJoin).Method, 519/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 584/// The <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> method 586/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 592/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 602public static IQueryable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner?, TResult>> resultSelector) 613new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner?, TResult>>, IQueryable<TResult>>(LeftJoin).Method, 634/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 699/// The <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 701/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 707/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 717public static IQueryable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner?, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 728new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner?, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(LeftJoin).Method, 974/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 1038/// The <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> method 1040/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 1046/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 1056public static IQueryable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter?, TInner, TResult>> resultSelector) 1067new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner, TResult>>, IQueryable<TResult>>(RightJoin).Method, 1088/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 1152/// The <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 1154/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1160/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1170public static IQueryable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter?, TInner, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 1181new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(RightJoin).Method, 1237/// The <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 1239/// <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1245/// <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1251public static IQueryable<TResult> FullJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter?, TInner?, TResult>> resultSelector, IEqualityComparer<TKey>? comparer = null) 1262new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner?, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(FullJoin).Method, 1392public static IQueryable<TSource> TakeWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate) 1400new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(TakeWhile).Method, 1430public static IQueryable<TSource> SkipWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate) 1438new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(SkipWhile).Method, 1497public static IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector) 1507new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IQueryable<TResult>>(GroupBy).Method, 1512public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector) 1521new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IQueryable<TResult>>(GroupBy).Method, 1526public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 1535new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method, 1540public static IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 1550new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method, 1669public static IQueryable<TResult> Zip<TFirst, TSecond, TResult>(this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, TSecond, TResult>> resultSelector) 1678new Func<IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst, TSecond, TResult>>, IQueryable<TResult>>(Zip).Method, 3242public static TSource Aggregate<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> func) 3250new Func<IQueryable<TSource>, Expression<Func<TSource, TSource, TSource>>, TSource>(Aggregate).Method, 3255public static TAccumulate Aggregate<TSource, TAccumulate>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func) 3263new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, TAccumulate>(Aggregate).Method, 3268public static TResult Aggregate<TSource, TAccumulate, TResult>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, Expression<Func<TAccumulate, TResult>> selector) 3277new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, Expression<Func<TAccumulate, TResult>>, TResult>(Aggregate).Method, 3298public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 3307new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method, 3328public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, TAccumulate>> seedSelector, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 3338new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, TAccumulate>>, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method,
System.Net.Http (10)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (3)
1191private readonly Func<T, Memory<byte>, bool> _writeAction; 1193public WriteQueueEntry(int writeBytes, T state, Func<T, Memory<byte>, bool> writeAction, CancellationToken cancellationToken) 1206private Task PerformWriteAsync<T>(int writeBytes, T state, Func<T, Memory<byte>, bool> writeAction, CancellationToken cancellationToken = default)
System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs (3)
66internal Func<SocketsHttpConnectionContext, CancellationToken, ValueTask<Stream>>? _connectCallback; 67internal Func<SocketsHttpPlaintextStreamFilterContext, CancellationToken, ValueTask<Stream>>? _plaintextStreamFilter; 69internal Func<SocketsHttpConnectionEvictionContext, CancellationToken, Task<bool>>? _shouldEvictConnection;
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (4)
25private Func<HttpConnectionSettings, HttpMessageHandlerStage, HttpMessageHandlerStage>? _decompressionHandlerFactory; 442public Func<SocketsHttpConnectionContext, CancellationToken, ValueTask<Stream>>? ConnectCallback 455public Func<SocketsHttpPlaintextStreamFilterContext, CancellationToken, ValueTask<Stream>>? PlaintextStreamFilter 490public Func<SocketsHttpConnectionEvictionContext, CancellationToken, Task<bool>>? ShouldEvictConnection
System.Net.HttpListener (4)
src\runtime\src\libraries\Common\src\System\Net\CookieParser.cs (4)
527private static Func<Cookie, string?, bool>? s_internalSetNameMethod; 528private static Func<Cookie, string?, bool> InternalSetNameMethod 540s_internalSetNameMethod = (Func<Cookie, string?, bool>)Delegate.CreateDelegate(typeof(Func<Cookie, string?, bool>), method);
System.Net.NameResolution (7)
System\Net\Dns.cs (1)
934private static Task<TResult> RunAsync<TResult>(Func<object, NameResolutionActivity, TResult> func, object key, CancellationToken cancellationToken)
System\Net\DnsSocket.cs (6)
53private readonly Func<EndPoint, CancellationToken, ValueTask> _connectAsync; 54private readonly Func<ReadOnlyMemory<byte>, CancellationToken, ValueTask<int>> _sendAsync; 55private readonly Func<Memory<byte>, CancellationToken, ValueTask<int>> _receiveAsync; 113_connectAsync = reflection.ConnectAsyncMethod.CreateDelegate<Func<EndPoint, CancellationToken, ValueTask>>(socket); 114_sendAsync = reflection.SendAsyncMethod.CreateDelegate<Func<ReadOnlyMemory<byte>, CancellationToken, ValueTask<int>>>(socket); 115_receiveAsync = reflection.ReceiveAsyncMethod.CreateDelegate<Func<Memory<byte>, CancellationToken, ValueTask<int>>>(socket);
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
706Func<TArg, CancellationToken, ValueTask<IPAddress>> getAddress,
System.Net.Quic (1)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
68Func<TExteriorHandle, TArg1, TInteriorHandle> accessor,
System.Net.Security (1)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
68Func<TExteriorHandle, TArg1, TInteriorHandle> accessor,
System.Private.CoreLib (45)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (4)
1223public TValue GetOrAdd<TArg>(TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument) 1302TKey key, Func<TKey, TArg, TValue> addValueFactory, Func<TKey, TValue, TArg, TValue> updateValueFactory, TArg factoryArgument) 1376public TValue AddOrUpdate(TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) 1447public TValue AddOrUpdate(TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (3)
28public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 111private readonly Func<T?, T?, bool> _equals; 114public DelegateEqualityComparer(Func<T?, T?, bool> equals, Func<T, int> getHashCode)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (2)
263/// returned by all the racing <see cref="GetOrAdd{TArg}(TKey, Func{TKey, TArg, TValue}, TArg)"/> calls. This rule permits the 266public TValue GetOrAdd<TArg>(TKey key, Func<TKey, TArg, TValue> valueFactory, TArg factoryArgument)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (8)
55private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll; 57private event Func<AssemblyLoadContext, AssemblyName, Assembly>? _resolving; 190public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll 211public event Func<AssemblyLoadContext, AssemblyName, Assembly?>? Resolving 313private static Func<Assembly, string, string>? s_assemblyLocationOverride; 328public static void SetAssemblyLocationOverride(Func<Assembly, string, string> locationOverride) 342Func<Assembly, string, string>? locationOverride = s_assemblyLocationOverride; 951foreach (Func<Assembly, string, IntPtr> handler in Delegate.EnumerateInvocationList(_resolvingUnmanagedDll))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.cs (6)
1210public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state) 1240public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1272public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1316public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1371public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1378internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (6)
4388public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state) 4418public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken) 4449public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler) 4486public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskContinuationOptions continuationOptions) 4533public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken, 4540private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (4)
64Debug.Assert(function is Func<Task, TResult> || function is Func<Task, object?, TResult>, 92if (m_action is Func<Task, object?, TResult> funcWithState) 156Debug.Assert(function is Func<Task<TAntecedentResult>, TResult> || function is Func<Task<TAntecedentResult>, object?, TResult>, 184if (m_action is Func<Task<TAntecedentResult>, object?, TResult> funcWithState)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (8)
717Func<AsyncCallback, object?, IAsyncResult> beginMethod, 746Func<AsyncCallback, object?, IAsyncResult> beginMethod, 754internal static Task<TResult> FromAsyncImpl(Func<AsyncCallback, object?, IAsyncResult> beginMethod, 1196Func<TInstance, IAsyncResult, TResult> endMethod) 1236private Func<TInstance, IAsyncResult, TResult>? m_endMethod; 1241internal FromAsyncTrimPromise(TInstance thisRef, Func<TInstance, IAsyncResult, TResult> endMethod) 1264Func<TInstance, IAsyncResult, TResult>? endMethod = promise.m_endMethod; 1287TInstance thisRef, Func<TInstance, IAsyncResult, TResult> endMethod, IAsyncResult asyncResult,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (4)
876Func<AsyncCallback, object?, IAsyncResult> beginMethod, 906Func<AsyncCallback, object?, IAsyncResult> beginMethod, 1240Func<AsyncCallback, object?, IAsyncResult> beginMethod, 1272Func<AsyncCallback, object?, IAsyncResult> beginMethod,
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
792public static bool TryWrite<T>(Func<Stream, T, bool> func, Stream stream, T value)
System.Reflection.MetadataLoadContext (5)
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (4)
36private static readonly Func<EntityHandle, EcmaModule, EcmaDefinitionType> s_resolveTypeDef = 47private static readonly Func<EntityHandle, EcmaModule, RoDefinitionType> s_resolveTypeRef = 134private static readonly Func<EntityHandle, EcmaModule, EcmaGenericParameterType> s_resolveGenericParam = 173private static readonly Func<EntityHandle, EcmaModule, RoAssembly> s_resolveAssembly =
System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs (1)
29public T GetOrAdd(EntityHandle handle, C context, Func<EntityHandle, C, T> factory)
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
204[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,,>))]
System.Runtime.InteropServices.JavaScript (6)
System\Runtime\InteropServices\JavaScript\JSMarshalerType.cs (3)
398/// <param name="arg1">Metadata about the type of the first argument of the <see cref="System.Func{TRes,T1,T2}"/>.</param> 399/// <param name="arg2">Metadata about the type of the second argument of the <see cref="System.Func{TRes,T1,T2}"/>.</param> 400/// <param name="result">Metadata about the type of the result of the <see cref="System.Func{TRes,T1,T2}"/>.</param>
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Func.cs (3)
468public void ToManaged<T1, T2, TResult>(out Func<T1, T2, TResult>? value, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler, ArgumentToManagedCallback<TResult> resMarshaler) 662public unsafe void ToJS<T1, T2, TResult>(Func<T1, T2, TResult> value, ArgumentToManagedCallback<T1> arg1Marshaler, ArgumentToManagedCallback<T2> arg2Marshaler, ArgumentToJSCallback<TResult> resMarshaler) 664Func<T1, T2, TResult> cpy = value;
System.Security.Cryptography (6)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (1)
454Func<Pkcs12LoaderLimits, string, bool> filter)
System\Security\Cryptography\FixedMemoryKeyBox.cs (1)
33Func<TState, ReadOnlySpan<byte>, TRet> func)
System\Security\Cryptography\IncrementalHash.cs (1)
474Func<IncrementalHash, Span<byte>, int> getHashCallback)
System\Security\Cryptography\X509Certificates\FindPal.Windows.cs (2)
386private unsafe void FindCore<TState>(TState state, Func<TState, SafeCertContextHandle, bool> filter) 391private unsafe void FindCore<TState>(Interop.Crypt32.CertFindType dwFindType, void* pvFindPara, TState state = default!, Func<TState, SafeCertContextHandle, bool>? filter = null)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1933Func<ReadOnlySpan<char>, ReadOnlySpan<char>, TAlg> factory,
System.ServiceModel.Primitives.Tests (7)
Channels\CustomChannelTest.cs (5)
33Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 123Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 217Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 268Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 325Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) =>
ServiceModel\MessageContractTest.4.4.0.cs (2)
151Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) => 251Func<Type, BindingContext, IChannelFactory> buildFactoryAction = (Type type, BindingContext context) =>
System.ServiceModel.Syndication (2)
System\ServiceModel\Syndication\ExtensibleSyndicationObject.cs (1)
99internal void WriteElementExtensions(XmlWriter writer, Func<string, string, bool> shouldSkipElement = null)
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (1)
131internal void WriteTo(XmlWriter writer, Func<string, string, bool> shouldSkipElement)
System.Text.Json (26)
System\Text\Json\Schema\JsonSchemaExporterOptions.cs (1)
31public Func<JsonSchemaExporterContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
System\Text\Json\Serialization\Converters\Union\JsonUnionConverter.cs (1)
35Func<Type, object?, TUnion>? constructor = typeInfo.UnionConstructor;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
118public Func<object, object?, bool>? ShouldSerialize 131private protected Func<object, object?, bool>? _shouldSerialize;
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (8)
82internal new Func<object, T?, bool>? ShouldSerialize 88private Func<object, T?, bool>? _shouldSerializeTyped; 92Debug.Assert(predicate is null or Func<object, object?, bool> or Func<object, T?, bool>); 100else if (predicate is Func<object, T?, bool> typedPredicate) 103_shouldSerialize = typedPredicate is Func<object, object?, bool> untypedPredicate ? untypedPredicate : (obj, value) => typedPredicate(obj, (T?)value); 107Func<object, object?, bool> untypedPredicate = (Func<object, object?, bool>)predicate;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (4)
524public Func<Type, object?, object>? UnionConstructor 536Debug.Assert(constructor is null or Func<Type, object?, object>); 537_unionConstructor = (Func<Type, object?, object>?)constructor; 540private protected Func<Type, object?, object>? _unionConstructor;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (9)
192public new Func<Type, object?, T>? UnionConstructor 204Debug.Assert(constructor is null or Func<Type, object?, object> or Func<Type, object?, T>); 211else if (constructor is Func<Type, object?, T> typedDelegate) 214_unionConstructor = constructor is Func<Type, object?, object> untypedDelegate 220Debug.Assert(constructor is Func<Type, object?, object>); 221var untypedDelegate = (Func<Type, object?, object>)constructor; 227private Func<Type, object?, T>? _typedUnionConstructor;
System\Text\Json\Serialization\Metadata\JsonUnionInfoValuesOfT.cs (1)
27public Func<Type, object?, T>? UnionConstructor { get; init; }
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (1)
274internal SymbolicRegexNode<TNewSet> Transform<TNewSet>(SymbolicRegexNode<TSet> node, SymbolicRegexBuilder<TNewSet> builder, Func<SymbolicRegexBuilder<TNewSet>, TSet, TNewSet> setTransformer)
System\Threading\StackHelper.cs (1)
143public static TResult CallOnEmptyStack<TArg1, TArg2, TResult>(Func<TArg1, TArg2, TResult> func, TArg1 arg1, TArg2 arg2) =>
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Threading\StackHelper.cs (1)
143public static TResult CallOnEmptyStack<TArg1, TArg2, TResult>(Func<TArg1, TArg2, TResult> func, TArg1 arg1, TArg2 arg2) =>
System.Threading.Tasks.Parallel (17)
System\Threading\Tasks\Parallel.ForEachAsync.cs (17)
20public static Task ForAsync<T>(T fromInclusive, T toExclusive, Func<T, CancellationToken, ValueTask> body) 38public static Task ForAsync<T>(T fromInclusive, T toExclusive, CancellationToken cancellationToken, Func<T, CancellationToken, ValueTask> body) 56public static Task ForAsync<T>(T fromInclusive, T toExclusive, ParallelOptions parallelOptions, Func<T, CancellationToken, ValueTask> body) 77private static Task ForAsync<T>(T fromInclusive, T toExclusive, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<T, CancellationToken, ValueTask> body) 198public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 214public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 229public static Task ForEachAsync<TSource>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 247private static Task ForEachAsync<TSource>(IEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 353public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> body) 369public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 384public static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TSource, CancellationToken, ValueTask> body) 402private static Task ForEachAsync<TSource>(IAsyncEnumerable<TSource> source, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 535public readonly Func<TSource, CancellationToken, ValueTask> LoopBody; 540protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 693Func<TSource, CancellationToken, ValueTask> body) : 715Func<TSource, CancellationToken, ValueTask> body) : 738Func<T, CancellationToken, ValueTask> body) :
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (1)
2054Func<T, int, bool> trySetFocusAtItemIndex) where T : Control
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Animation\HighPrecisionTimer.cs (3)
97internal static TimerRegistration Register(Func<HighPrecisionTimerTick, CancellationToken, ValueTask> callback) 741Func<HighPrecisionTimerTick, CancellationToken, ValueTask> callback, 745public Func<HighPrecisionTimerTick, CancellationToken, ValueTask> Callback { get; } = callback;
UnitTests.Common (3)
MockChannelFactory.cs (1)
46public Func<EndpointAddress, Uri, IChannel> OnCreateChannelOverride { get; set; }
MockRequestChannel.cs (1)
18public Func<Message, TimeSpan, Message> RequestOverride { get; set; }
MockTransportBindingElement.cs (1)
17public Func<Type,BindingContext,IChannelFactory> BuildChannelFactoryOverride { get; set; }
vbc (2)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
195Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 218Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
VBCSCompiler (12)
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilerRequestHandler.cs (2)
46public static Func<string, MetadataReferenceProperties, PortableExecutableReference> SharedAssemblyReferenceProvider { get; } = (path, properties) => new CachingMetadataReference(path, properties); 51private Func<string, MetadataReferenceProperties, PortableExecutableReference> AssemblyReferenceProvider { get; } = SharedAssemblyReferenceProvider;
src\roslyn\src\Compilers\Server\VBCSCompiler\CSharpCompilerServer.cs (4)
18private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _metadataProvider; 23internal CSharpCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache, ICompilerServerLogger? logger = null) 28internal CSharpCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string? responseFile, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache, ICompilerServerLogger? logger = null) 36internal override Func<string, MetadataReferenceProperties, PortableExecutableReference> GetMetadataProvider()
src\roslyn\src\Compilers\Server\VBCSCompiler\VisualBasicCompilerServer.cs (4)
18private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _metadataProvider; 23internal VisualBasicCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache, ICompilerServerLogger? logger = null) 28internal VisualBasicCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string? responseFile, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache, ICompilerServerLogger? logger = null) 36internal override Func<string, MetadataReferenceProperties, PortableExecutableReference> GetMetadataProvider()
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
195Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 218Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
vstest.console (2)
Processors\PortArgumentProcessor.cs (2)
94private readonly Func<int, IProcessHelper, IDesignModeClient> _designModeInitializer; 140internal PortArgumentExecutor(CommandLineOptions options, ITestRequestManager testRequestManager, Func<int, IProcessHelper, IDesignModeClient> designModeInitializer, IProcessHelper processHelper, IRunSettingsHelper runSettingsHelper)
vstest.console.arm64 (2)
src\vstest\src\vstest.console\Processors\PortArgumentProcessor.cs (2)
94private readonly Func<int, IProcessHelper, IDesignModeClient> _designModeInitializer; 140internal PortArgumentExecutor(CommandLineOptions options, ITestRequestManager testRequestManager, Func<int, IProcessHelper, IDesignModeClient> designModeInitializer, IProcessHelper processHelper, IRunSettingsHelper runSettingsHelper)