5286 references to Func
Analyzer.Utilities.UnitTests (3)
Lightup\LightupHelpersTests.cs (3)
34var withPropertyAccessor = LightupHelpers.CreateSyntaxWithPropertyAccessor<SyntaxNode, object>(type, "NonExistentProperty", fallbackResult); 53var withPropertyAccessor = LightupHelpers.CreateSymbolWithPropertyAccessor<ISymbol, object>(type, "NonExistentProperty", fallbackResult); 67var accessor = LightupHelpers.CreateAccessorWithArgument<SyntaxNode, int, object?>(type, "parameterName", typeof(int), "argumentName", "NonExistentMethod", fallbackResult);
aspire (5)
Commands\TemplateCommand.cs (2)
14private readonly Func<ParseResult, CancellationToken, Task<int>> _executeCallback; 16public TemplateCommand(ITemplate template, Func<ParseResult, CancellationToken, Task<int>> executeCallback, IFeatures features, ICliUpdateNotifier updateNotifier, CliExecutionContext executionContext, IInteractionService interactionService)
Interaction\ExtensionLoggerProvider.cs (1)
29public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Interaction\SpectreConsoleLoggerProvider.cs (1)
32public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Templating\DotNetTemplateFactory.cs (1)
217private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken)
Aspire.Cli.Tests (11)
TestServices\TestAppHostBackchannel.cs (1)
25public Func<string, CancellationToken, Task>? ConnectAsyncCallback { get; set; }
TestServices\TestConsoleInteractionService.cs (1)
15public Func<string, bool, bool>? ConfirmCallback { get; set; }
TestServices\TestDotNetCliRunner.cs (2)
16public Func<DotNetCliRunnerInvocationOptions, CancellationToken, int>? CheckHttpCertificateAsyncCallback { get; set; } 24public Func<DotNetCliRunnerInvocationOptions, CancellationToken, int>? TrustHttpCertificateAsyncCallback { get; set; }
TestServices\TestExtensionBackchannel.cs (5)
16public Func<string, string, Task>? DisplayMessageAsyncCallback { get; set; } 31public Func<string, string, Task>? DisplayIncompatibleVersionErrorAsyncCallback { get; set; } 48public Func<string, bool, Task<bool>>? ConfirmAsyncCallback { get; set; } 57public Func<LogLevel, string, Task>? LogMessageAsyncCallback { get; set; } 63public Func<string, CancellationToken, Task<bool>>? HasCapabilityAsyncCallback { get; set; }
TestServices\TestProjectLocator.cs (2)
10public Func<FileInfo?, CancellationToken, Task<FileInfo?>>? UseOrFindAppHostProjectFileAsyncCallback { get; set; } 12public Func<string, CancellationToken, Task<List<FileInfo>>>? FindAppHostProjectFilesAsyncCallback { get; set; }
Aspire.Dashboard (21)
Components\Controls\ResourceActions.razor.cs (1)
40public required Func<ResourceViewModel, CommandViewModel, bool> IsCommandExecuting { get; set; }
Components\Controls\SelectResourceOptions.razor.cs (1)
18public required Func<TValue, bool, Task> OnValueVisibilityChangedAsync { get; set; }
Model\Otlp\TelemetryFilter.cs (8)
69private static Func<string?, string, bool> ConditionToFuncString(FilterCondition c) => 83private static Func<DateTime, DateTime, bool> ConditionToFuncDate(FilterCondition c) => 97private static Func<double, double, bool> ConditionToFuncNumber(FilterCondition c) => 118var func = ConditionToFuncDate(Condition); 125var func = ConditionToFuncNumber(Condition); 132var func = ConditionToFuncString(Condition); 137var func = ConditionToFuncString(Condition); 176var func = ConditionToFuncString(condition);
Model\ResourceMenuItems.cs (2)
36Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting, 180private static void AddCommandMenuItems(List<MenuButtonItem> menuItems, ResourceViewModel resource, IStringLocalizer<Resources.Resources> loc, IStringLocalizer<Commands> commandsLoc, EventCallback<CommandViewModel> commandSelected, Func<ResourceViewModel, CommandViewModel, bool> isCommandExecuting)
Model\TraceHelpers.cs (2)
15public static void VisitSpans<TState>(OtlpTrace trace, Func<OtlpSpan, TState, TState> spanAction, TState state) 30static void Visit(OtlpSpanCollection allSpans, 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)
297private async Task WatchWithRecoveryAsync(Func<RetryContext, CancellationToken, Task<RetryResult>> action, CancellationToken cancellationToken)
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)
46public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.Dashboard.Components.Tests (8)
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;
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)
Aspire.Dashboard.Tests (7)
Telemetry\DashboardTelemetrySenderTests.cs (2)
151private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _value; 153public 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)
Aspire.Hosting (22)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
257public required Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> Callback { get; init; }
ApplicationModel\ResourceLoggerService.cs (2)
117public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 575public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Backchannel\BackchannelLoggerProvider.cs (1)
74public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Cli\CliOrphanDetector.cs (1)
25internal Func<int, long, bool> IsProcessRunningWithStartTime { get; set; } = (int pid, long expectedStartTimeUnix) =>
ContainerResourceBuilderExtensions.cs (1)
821public 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
Dcp\DcpExecutor.cs (2)
322async Task WatchKubernetesResourceAsync<T>(Func<WatchEventType, T, Task> handler) where T : CustomResource 360private async Task ProcessResourceChange<T>(WatchEventType watchEventType, T resource, ConcurrentDictionary<string, T> resourceByName, string resourceKind, Func<T, CustomResourceSnapshot, CustomResourceSnapshot> snapshotFactory) where T : CustomResource
Dcp\KubernetesService.cs (1)
265var innerWatchFactory = ((WatchEventType, T)? lastValue, CancellationToken restartCancellationToken) =>
Eventing\DistributedApplicationEventing.cs (5)
76/// <inheritdoc cref="IDistributedApplicationEventing.Subscribe{T}(Func{T, CancellationToken, Task})" /> 77public DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent 105/// <inheritdoc cref="IDistributedApplicationEventing.Subscribe{T}(Func{T, CancellationToken, Task})" /> 106public DistributedApplicationEventSubscription Subscribe<T>(IResource resource, Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationResourceEvent 108var resourceFilteredCallback = async (T @event, CancellationToken cancellationToken) =>
Eventing\DistributedApplicationEventSubscription.cs (3)
12public class DistributedApplicationEventSubscription(Func<IDistributedApplicationEvent, CancellationToken, Task> callback) 17public Func<IDistributedApplicationEvent, CancellationToken, Task> Callback { get; } = callback; 23public class DistributedApplicationResourceEventSubscription(IResource? resource, Func<IDistributedApplicationResourceEvent, CancellationToken, Task> callback)
Eventing\IDistributedApplicationEventing.cs (2)
19DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent; 28DistributedApplicationEventSubscription Subscribe<T>(IResource resource, Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationResourceEvent;
InteractionService.cs (1)
186internal async Task CompleteInteractionAsync(int interactionId, Func<Interaction, IServiceProvider, InteractionCompletionState> createResult, CancellationToken cancellationToken)
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 (4)
AzureProvisioningResource.cs (1)
121public static T CreateExistingOrNewProvisionableResource<T>(AzureResourceInfrastructure infrastructure, Func<string, BicepValue<string>, T> createExisting, Func<AzureResourceInfrastructure, T> createNew)
AzurePublishingContext.cs (2)
423private static Task VisitAsync(object? value, Func<object, CancellationToken, Task> visitor, CancellationToken cancellationToken = default) => 426private static async Task VisitAsync(object? value, Func<object, CancellationToken, Task> visitor, HashSet<object> visited, CancellationToken cancellationToken = default)
IAzureKeyVaultResource.cs (1)
26Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; }
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
41internal Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; } 43Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? IAzureKeyVaultResource.SecretResolver
Aspire.Hosting.Testing (3)
DistributedApplicationEntryPointInvoker.cs (1)
18public static Func<string[], CancellationToken, Task<DistributedApplication>>? ResolveEntryPoint(
DistributedApplicationFactory.cs (2)
401var factory = DistributedApplicationEntryPointInvoker.ResolveEntryPoint( 421private 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 (11)
Dashboard\DashboardResourceTests.cs (1)
590public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Dcp\TestKubernetesService.cs (2)
28private readonly Func<CustomResource, string, Stream> _startStream; 32public TestKubernetesService(Func<CustomResource, string, Stream>? startStream = null, bool ignoreDeletes = false)
Helpers\CallbackLifecycleHook.cs (2)
10private readonly Func<DistributedApplicationModel, CancellationToken, Task> _beforeStartCallback; 12public 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\PeriodicRestartAsyncEnumerableTests.cs (2)
20var innerFactory = (int? lastValue, CancellationToken cancellationToken) => Task.FromResult(CountingAsyncEnumerable(0, TimeSpan.FromMilliseconds(50), cancellationToken)); 43var innerFactory = (int? lastValue, CancellationToken cancellationToken) => Task.FromResult(RefCountingAsyncEnumerable(0, TimeSpan.FromMilliseconds(10), cancellationToken));
Aspire.NATS.Net (16)
AspireNatsClientExtensions.cs (16)
24/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 28/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 32/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 36/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 37public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 40/// <inheritdoc cref="AddNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 54public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 59/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 67/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 75/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 83/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 84public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 91/// <inheritdoc cref="AddKeyedNatsClient(IHostApplicationBuilder, string, Action{NatsClientSettings}?, Func{IServiceProvider,NatsOpts,NatsOpts}?)"/> 110public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 117private static void AddNatsClientInternal(this IHostApplicationBuilder builder, string connectionName, object? serviceKey, Action<NatsClientSettings>? configureSettings, Func<IServiceProvider, NatsOpts, NatsOpts>? configureOptions) 206private 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)
RabbitMQEventSourceLogForwarder.cs (1)
13private static readonly Func<ErrorEventSourceEvent, Exception?, string> s_formatErrorEvent = FormatErrorEvent;
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
249public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
249public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
BasicTestApp (1)
PrependMessageLoggerProvider.cs (1)
58public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
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; }
BuildActionTelemetryTable (1)
src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
BuildValidator (2)
DemoLogger.cs (2)
40public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 71public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
CodeGenerator (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
313static string Each<T>(IEnumerable<T> values, Func<T, int, string> formatter)
CodeStyleConfigFileGenerator (1)
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\Compilers\Shared\BuildServerConnection.cs (2)
178Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 201Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
Diagnostics.EFCore.FunctionalTests (1)
Helpers\TestLoggerProvider.cs (1)
43public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
GenerateDocumentationAndConfigFiles (177)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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)
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
166public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
166public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
166public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
166public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
166public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISTestSiteFixture.cs (1)
166public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
InMemory.FunctionalTests (6)
Http2\Http2EndToEndTests.cs (1)
126public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
HttpsTests.cs (2)
824public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) 852public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\test\MockLogger.cs (1)
21public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
64public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
126Func<ListenOptions, CancellationToken, Task> createBinding)
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
210public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Metrics (187)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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)
Metrics.Legacy (187)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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.Analyzers.Extra (5)
CallAnalysis\Fixers\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.Arcade.Test.Common (10)
AssertEx.cs (7)
152public static void Equal<T>(ImmutableArray<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null, string message = null) 164public static void Equal<T>(IEnumerable<T> expected, ImmutableArray<T> actual, Func<T, T, bool> comparer = null, string message = null, string itemSeparator = null) 176public static void Equal<T>(ImmutableArray<T> expected, ImmutableArray<T> actual, Func<T, T, bool> comparer = null, string message = null, string itemSeparator = null) 181public static void Equal<T>(IEnumerable<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null, string message = null, 210private static bool SequenceEqual<T>(IEnumerable<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null) 432Func<T, T, bool> comparer = null, 478public static void AssertLinesEqual(string expected, string actual, string message = null, Func<string, string, bool> comparer = null)
DiffUtil.cs (3)
40private readonly Func<T, T, bool> _comparer; 42public LCS(Func<T, T, bool> comparer) 74public static string DiffReport<T>(IEnumerable<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null, Func<T, string> toString = null, string separator = ",\r\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)
111private static TNode? FindNode<TNode>(RoutePatternNode node, VirtualChar ch, Func<TNode, VirtualChar, bool> predicate)
Microsoft.AspNetCore.Authentication.Test (2)
JwtBearerTests.cs (1)
1157private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null)
JwtBearerTests_Handler.cs (1)
1225private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null)
Microsoft.AspNetCore.Authorization.Test (5)
DefaultAuthorizationServiceTests.cs (5)
1160private readonly Action<LogLevel, EventId, object, Exception, Func<object, Exception, string>> _assertion; 1162public DefaultAuthorizationServiceTestLogger(Action<LogLevel, EventId, object, Exception, Func<object, Exception, string>> assertion) 1177public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) 1188static void Assertion(LogLevel level, EventId eventId, object state, Exception exception, Func<object, Exception, string> formatter) 1221static void Assertion(LogLevel level, EventId eventId, object state, Exception exception, Func<object, Exception, string> formatter)
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 (2)
Builder\ServerComponentsEndpointOptions.cs (1)
55public Func<HttpContext, WebSocketAcceptContext, Task>? ConfigureWebSocketAcceptContext { get; set; }
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (1)
164Func<HttpContext, WebSocketAcceptContext, Task>? configureConnection,
Microsoft.AspNetCore.Components.Tests (1)
ComponentBaseTest.cs (1)
610public Func<TestComponent, bool, Task> OnAfterRenderAsyncLogic { get; set; }
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.DataProtection.Tests (3)
StringLoggerFactory.cs (1)
61public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
XmlAssert.cs (2)
130private readonly Func<T, T, bool> _equalityCheck; 132public CallbackBasedEqualityComparer(Func<T, T, bool> equalityCheck)
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.FunctionalTests (1)
WebHostFunctionalTests.cs (1)
207Func<DeploymentResult, ILogger, Task> assertAction,
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
UnaryServerCallHandlerTests.cs (1)
1633Func<HelloRequest, ServerCallContext, Task<HelloReply>>? handler = null)
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.Hosting.Tests (3)
HostingApplicationDiagnosticsTests.cs (2)
1305public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) 1328public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
WebHostTests.cs (1)
1362public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
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.Abstractions.Tests (1)
UseWhenExtensionsTests.cs (1)
123private static Func<HttpContext, Func<Task>, Task> Increment(string key, bool terminate = false)
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 (13)
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) 1437private static Func<object?, HttpContext, Task> HandleRequestBodyAndCompileRequestDelegateForForm( 1694var tryParseMethodCall = ParameterBindingMethodCache.Instance.FindTryParseMethod(nonNullableParameterType);
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.Extensions.Tests (20)
ParameterBindingMethodCacheTests.cs (9)
29var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(@type); 47var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(typeof(Uri)); 69var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(@type); 101var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(@type); 126var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(@type); 171var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(type); 179var methodFound = new ParameterBindingMethodCache().FindTryParseMethod(type); 200var methodFound = cache.FindTryParseMethod(type); 589var method = new ParameterBindingMethodCache().FindTryParseMethod(type);
RequestDelegateFactoryTests.cs (11)
108EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 2196EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 2239EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 2311EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 2406EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 2440EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 2525EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 3082EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 3125EndpointBuilder = CreateEndpointBuilderFromFilterFactories(new List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>() 3362private EndpointBuilder CreateEndpointBuilderFromFilterFactories(IEnumerable<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>> filterFactories) 3365((List<Func<EndpointFilterFactoryContext, EndpointFilterDelegate, EndpointFilterDelegate>>)builder.FilterFactories).AddRange(filterFactories);
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.Specification.Tests (1)
TestLogger.cs (1)
60public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
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\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 (28)
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)
55protected 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\Shared\PropertyActivator\PropertyActivator.cs (1)
65Func<PropertyInfo, TAttribute, PropertyActivator<TContext>> createActivateInfo,
Microsoft.AspNetCore.Mvc.Core.Test (19)
Controllers\ControllerFactoryProviderTest.cs (1)
81var releaser = provider.CreateAsyncControllerReleaser(descriptor);
Formatters\JsonOutputFormatterTestBase.cs (1)
179Func<Stream, Encoding, TextWriter> writerFactory = null)
Infrastructure\AsyncEnumerableReaderTest.cs (15)
23var result = readerFactory.TryGetReader(type, out var reader); 38var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 56var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 75Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 76Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 92Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 93Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 110Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 127Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 144Assert.True(readerFactory.TryGetReader(enumerable1.GetType(), out var reader1)); 145Assert.True(readerFactory.TryGetReader(enumerable2.GetType(), out var reader2)); 161var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 182Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 198Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 213Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
ModelBinding\Binders\BodyModelBinderTests.cs (2)
725private readonly Func<InputFormatterContext, Encoding, Task<InputFormatterResult>> _readRequestBodyAsync; 727public XyzFormatter(Func<InputFormatterContext, Encoding, Task<InputFormatterResult>> readRequestBodyAsync)
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.IntegrationTests (1)
BindPropertyIntegrationTest.cs (1)
222var pageBinder = PageBinderFactory.CreatePropertyBinder(
Microsoft.AspNetCore.Mvc.Localization.Test (2)
MvcLocalizationMvcBuilderExtensionsTest.cs (1)
109var dataAnnotationLocalizerProvider = new Func<Type, IStringLocalizerFactory, IStringLocalizer>((type, factory) =>
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (1)
109var dataAnnotationLocalizerProvider = new Func<Type, IStringLocalizerFactory, IStringLocalizer>((type, factory) =>
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\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.NewtonsoftJson.Test (16)
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (1)
179Func<Stream, Encoding, TextWriter> writerFactory = null)
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (15)
23var result = readerFactory.TryGetReader(type, out var reader); 38var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 56var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 75Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 76Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 92Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 93Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 110Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 127Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 144Assert.True(readerFactory.TryGetReader(enumerable1.GetType(), out var reader1)); 145Assert.True(readerFactory.TryGetReader(enumerable2.GetType(), out var reader2)); 161var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 182Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 198Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 213Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
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.RazorPages.Test (34)
Infrastructure\DefaultPageActivatorProviderTest.cs (1)
43var factory = activator.CreateActivator(descriptor);
Infrastructure\DefaultPageFactoryProviderTest.cs (10)
57var factory = factoryProvider.CreatePageFactory(descriptor); 93var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 123var factory = CreatePageFactory().CreatePageFactory(descriptor); 150var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 177var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 202var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 236var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 274var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 317var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor); 355var factory = factoryProvider.CreatePageFactory(pageContext.ActionDescriptor);
Infrastructure\DefaultPageModelActivatorProviderTest.cs (4)
124var releaser = activator.CreateAsyncReleaser(actionDescriptor); 162var disposer = activator.CreateAsyncReleaser(new CompiledPageActionDescriptor 183var disposer = activator.CreateAsyncReleaser(new CompiledPageActionDescriptor 204var disposer = activator.CreateAsyncReleaser(new CompiledPageActionDescriptor
Infrastructure\DefaultPageModelFactoryProviderTest.cs (2)
114Func<PageContext, object, ValueTask> disposer = (_, __) => default; 120var actual = factoryProvider.CreateAsyncModelDisposer(descriptor);
Infrastructure\PageActionInvokerProviderTest.cs (3)
36Func<PageContext, ViewContext, object> factory = (a, b) => null; 88Func<PageContext, ViewContext, object> factory = (a, b) => null; 91Func<PageContext, object, ValueTask> modelDisposer = (_, __) => default;
Infrastructure\PageActionInvokerTest.cs (1)
1513var viewDataFactory = ViewDataDictionaryFactory.CreateFactory(actionDescriptor.ModelTypeInfo);
Infrastructure\PageBinderFactoryTest.cs (13)
42var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 68var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 93var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 119var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 144var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 170var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 218var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 278var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 328var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 391var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 450var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 500var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor); 552var factory = PageBinderFactory.CreatePropertyBinder(binder, modelMetadataProvider, modelBinderFactory, actionDescriptor);
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.TagHelpers.Test (3)
AttributeMatcherTest.cs (1)
10private static readonly Func<Mode, Mode, int> Compare = (a, b) => a - b;
CacheTagHelperTest.cs (1)
906Func<bool, HtmlEncoder, Task<TagHelperContent>> getChildContentAsync = (useCachedResult, _) =>
TagHelperLogger.cs (1)
22public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
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 (3)
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.RateLimiting.Tests (2)
TestRateLimiterPolicy.cs (2)
12private readonly Func<OnRejectedContext, CancellationToken, ValueTask> _onRejected; 26public Func<OnRejectedContext, CancellationToken, ValueTask> OnRejected { get => _onRejected; }
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.Test (1)
TagHelpers\TagHelperOutputTest.cs (1)
22Func<bool, HtmlEncoder, Task<TagHelperContent>> initialGetChildContentAsync =
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.Routing.Tests (2)
Logging\WriteContext.cs (1)
18public Func<object, Exception, string> Formatter { get; set; }
Matching\ILEmitTrieJumpTableTest.cs (1)
31var original = table._getDestination;
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
IISDeploymentParameterExtensions.cs (2)
206public static void TransformPath(this IISDeploymentParameters parameters, Func<string, string, string> transformation) 216public static void TransformArguments(this IISDeploymentParameters parameters, Func<string, string, string> transformation)
Microsoft.AspNetCore.Server.Kestrel.Core (6)
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)
42private readonly Func<ConnectionContext, string?, X509Certificate2?>? _serverCertificateSelector;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
LoggingStreamTests.cs (1)
66public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
313static string Each<T>(IEnumerable<T> values, Func<T, int, string> formatter)
src\Servers\Kestrel\shared\test\MockLogger.cs (1)
21public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
64public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
126Func<ListenOptions, CancellationToken, Task> createBinding)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
64public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
126Func<ListenOptions, CancellationToken, Task> createBinding)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
64public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\PropertyActivator\PropertyActivator.cs (1)
65Func<PropertyInfo, TAttribute, PropertyActivator<TContext>> createActivateInfo,
Microsoft.AspNetCore.SignalR.Client.Core (7)
HubConnection.cs (4)
355public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task<object?>> handler, object state) 388public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task> handler, object state) 2106private readonly Func<object?[], object, Task> _callback; 2109public 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.Client.Tests (38)
HttpConnectionFactoryTests.cs (1)
81Func<WebSocketConnectionContext, CancellationToken, ValueTask<WebSocket>> webSocketFactory = (context, token) => ValueTask.FromResult<WebSocket>(null);
HubClientProxyGeneratorTests.cs (20)
78It.IsAny<Func<object[], object, Task>>(), 86It.IsAny<Func<object[], object, Task>>(), 94It.IsAny<Func<object[], object, Task>>(), 102It.IsAny<Func<object[], object, Task>>(), 129It.IsAny<Func<object[], object, Task>>(), 137It.IsAny<Func<object[], object, Task>>(), 145It.IsAny<Func<object[], object, Task>>(), 153It.IsAny<Func<object[], object, Task>>(), 176Func<object[], object, Task> noArgFunc = null; 182It.IsAny<Func<object[], object, Task>>(), 185(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) => 191Func<object[], object, Task> singleArgFunc = null; 198It.IsAny<Func<object[], object, Task>>(), 201(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) => 207Func<object[], object, Task> manyArgsFunc = null; 214It.IsAny<Func<object[], object, Task>>(), 217(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) => 224Func<object[], object, Task> returnTaskFunc = null; 230It.IsAny<Func<object[], object, Task>>(), 233(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state) =>
HubConnectionTests.cs (3)
850mockConnection.Setup(c => c.On(It.IsAny<string>(), It.IsAny<Type[]>(), It.IsAny<Func<object[], object, Task>>(), It.IsAny<object>())); 871mockConnection.Verify(c => c.On("someMethod", It.IsAny<Type[]>(), It.IsAny<Func<object[], object, Task>>(), It.IsAny<object>()), Times.Once); 872mockConnection.Verify(c => c.On("someMethod2", It.IsAny<Type[]>(), It.IsAny<Func<object[], object, Task>>(), 2), Times.Once);
TestHttpMessageHandler.cs (14)
151public void OnGet(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Get, pathAndQuery, handler); 152public void OnPost(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Post, pathAndQuery, handler); 153public void OnPut(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Put, pathAndQuery, handler); 154public void OnDelete(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Delete, pathAndQuery, handler); 155public void OnHead(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Head, pathAndQuery, handler); 156public void OnOptions(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Options, pathAndQuery, handler); 157public void OnTrace(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Trace, pathAndQuery, handler); 159public void OnRequest(HttpMethod method, string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 175public void OnNegotiate(Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> handler) => OnNegotiate((req, cancellationToken) => Task.FromResult(handler(req, cancellationToken))); 177public void OnNegotiate(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 216public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, HttpResponseMessage> handler) 221public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 236public void OnSocketSend(Func<byte[], CancellationToken, HttpResponseMessage> handler) => OnSocketSend((data, cancellationToken) => Task.FromResult(handler(data, cancellationToken))); 238public void OnSocketSend(Func<byte[], CancellationToken, Task<HttpResponseMessage>> handler)
Microsoft.AspNetCore.SignalR.Core (10)
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)
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; 225private static Func<object, CancellationToken, IAsyncEnumerator<object?>> CompileConvertToEnumerator(MethodInfo adapterMethodInfo, Type streamReturnType) 246var lambda = Expression.Lambda<Func<object, CancellationToken, IAsyncEnumerator<object?>>>(methodCall, parameters); 254private 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.AspNetCore.SignalR.Tests (6)
NativeAotTests.cs (1)
417public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
TestFilters.cs (5)
35public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next) 66public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next) 97public Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next) 121public async Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next) 165public Task OnDisconnectedAsync(HubLifetimeContext context, Exception exception, Func<HubLifetimeContext, Exception, Task> next)
Microsoft.AspNetCore.SignalR.Tests.Utils (3)
src\Shared\SignalR\LogSinkProvider.cs (2)
32public void Log<TState>(string categoryName, LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) 71public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
src\Shared\SignalR\WrappingLoggerFactory.cs (1)
73public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
ListLoggerFactory.cs (1)
80LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Microsoft.AspNetCore.TestHost.Tests (3)
ClientHandlerTests.cs (1)
732public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) => formatter(state, exception);
HttpContextBuilderTests.cs (1)
491public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) => formatter(state, exception);
TestClientTests.cs (1)
909public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) => formatter(state, exception);
Microsoft.Build.Framework (11)
BuildCheck\EnumerableExtensions.cs (2)
87Func<TValue, TValue, TValue> mergeValues) 115Func<TValue, TValue, TValue> mergeValues)
BuildEventArgs.cs (1)
287internal 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; 76internal static Func<string, Exception?, BuildExceptionBase> CreateExceptionFactory(string serializationType) 78Func<string, Exception?, BuildExceptionBase>? factory = null;
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Shared\BuildServerConnection.cs (2)
178Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 201Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
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.CodeAnalysis.Sdk (5)
src\Compilers\Shared\BuildServerConnection.cs (2)
178Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 201Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
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;
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TestUtilities\EnumerableExtensions.cs (1)
12public static IEnumerable<S> SelectWithIndex<T, S>(this IEnumerable<T> items, Func<T, int, S> selector)
Microsoft.Cci.Extensions (4)
Extensions\CSharp\CSharpCciExtensions.cs (4)
856public static object GetInterfaceImplementationAttributeConstructorArgument(this ITypeReference interfaceImplementation, uint typeDefinitionToken, string assemblyPath, SRMetadataPEReaderCache metadataReaderCache, Func<SRMetadataReader, CustomAttribute, (bool, object)> argumentResolver) 880public static object GetGenericParameterConstraintConstructorArgument(this IGenericParameter parameter, int constraintIndex, string assemblyPath, SRMetadataPEReaderCache metadataReaderCache, Func<SRMetadataReader, CustomAttribute, (bool, object)> argumentResolver) 895private static object GetCustomAttributeArgument(SRMetadataReader metadataReader, CustomAttributeHandleCollection customAttributeHandles, Func<SRMetadataReader, CustomAttribute, (bool, object)> argumentResolver) 956internal static readonly Func<SRMetadataReader, CustomAttribute, (bool, object)> NullableConstructorArgumentParser = (reader, attribute) =>
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)
209internal 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); 467out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 578out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 629out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 683out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 729out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 756Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 781Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1010Action<AnalyzerDiagnosticReporter, Func<Diagnostic, CancellationToken, bool>, ExecutionData, TArgs, CancellationToken> executeActions, 1011Action<HashSet<TBlockAction>, AnalyzerDiagnosticReporter, Func<Diagnostic, CancellationToken, bool>, ExecutionData, TArgs, CancellationToken> executeBlockActions, 1051out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 1113out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 1129Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1214out Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic); 1229Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic,
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (19)
563private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 592Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 686private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 731Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 770private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 807internal Func<Diagnostic, CancellationToken, bool> IsSupportedDiagnostic => _isSupportedDiagnostic; 825Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1133private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1190Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1381private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1450Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1513private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1555Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1592private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1625Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1665private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1733Func<Diagnostic, CancellationToken, bool> isSupportedDiagnostic, 1775private readonly Func<Diagnostic, CancellationToken, bool> _isSupportedDiagnostic; 1840Func<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, 118static ImmutableArray<SyntaxNode> getFilteredNodes(SyntaxNode root, Func<SyntaxNode, CancellationToken, bool> func, CancellationToken token)
SourceGeneration\Nodes\SyntaxValueProvider.cs (2)
42public IncrementalValuesProvider<T> CreateSyntaxProvider<T>(Func<SyntaxNode, CancellationToken, bool> predicate, Func<GeneratorSyntaxContext, CancellationToken, T> transform)
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\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)
16public 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); 18public 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); 21public 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); 23public 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); 25public 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); 27public 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); 38internal 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)
62internal static Func<TInput, CancellationToken, TOutput> WrapUserFunction<TInput, TOutput>(this Func<TInput, CancellationToken, TOutput> userFunction, bool catchAnalyzerExceptions) 77internal static Func<TInput, CancellationToken, ImmutableArray<TOutput>> WrapUserFunctionAsImmutableArray<TInput, TOutput>(this Func<TInput, CancellationToken, IEnumerable<TOutput>> userFunction, bool catchAnalyzerExceptions)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (3)
341Func<int, TArg, byte[]?> getMethodCustomDebugInfo, 342Func<int, TArg, ImmutableArray<string>> getMethodImportStrings, 489Func<int, TArg, ImmutableArray<string>> getMethodImportStrings)
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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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)
855public TNode? FirstAncestorOrSelf<TNode, TArg>(Func<TNode, TArg, bool> predicate, TArg argument, bool ascendOutOfTrivia = true) 1581Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, 1583Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 1585Func<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) 207public static TRoot ReplaceTokens<TRoot>(this TRoot root, IEnumerable<SyntaxToken> tokens, Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken) 236public static TRoot ReplaceTrivia<TRoot>(this TRoot root, IEnumerable<SyntaxTrivia> trivia, Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia> computeReplacementTrivia)
Microsoft.CodeAnalysis.Analyzers (194)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
117ImmutableArray<IArgumentOperation> arguments, bool isUsedAsExtensionMethod, Func<SyntaxGenerator, IEnumerable<SyntaxNode>, SyntaxNode> getReplacementNode,
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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 (194)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (1)
184public override void Reset(Func<AnalysisEntity, CopyAbstractValue, CopyAbstractValue> getResetValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
798Func<TOperation, object?, PointsToAbstractValue?> baseVisit)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (1)
88public override void Reset(Func<AnalysisEntity, PointsToAbstractValue, PointsToAbstractValue> getResetValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityBasedPredicateAnalysisData.cs (1)
131public virtual void Reset(Func<AnalysisEntity, TValue, TValue> getResetValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysisResultBuilder.cs (1)
45Func<BasicBlock, TAnalysisData, TBlockAnalysisResult> getBlockResult,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\MapAbstractDomain.cs (1)
128Func<TValue, TValue, TValue> intersect)
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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.BannedApiAnalyzers (193)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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.CodeStyle (180)
src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
28public AccessedFields Where<TArg>(Func<IFieldSymbol, TArg, bool> predicate, TArg arg)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
243Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
325Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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.CodeStyle.UnitTestUtilities (1)
src\Features\DiagnosticsTestUtilities\CodeActions\SharedVerifierState.cs (1)
31private Func<Solution, ProjectId, Solution>? _remainingOptionsSolutionTransform;
Microsoft.CodeAnalysis.Collections.Package (71)
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)
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)
Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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)
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)
Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
Segmented\ImmutableSegmentedListExtensions.cs (1)
120public static int BinarySearch<TElement, TValue>(this ImmutableSegmentedList<TElement> array, TValue value, Func<TElement, TValue, int> comparer)
src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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()
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)
Microsoft.CodeAnalysis.Contracts.Package (1)
EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Microsoft.CodeAnalysis.CSharp (58)
Binder\Binder_Conversions.cs (2)
595Func<TArg, MethodSymbol, bool> predicate) 686private static MethodSymbol? TryFindSingleMethod<TArg>(TypeSymbol type, string name, TArg arg, Func<TArg, MethodSymbol, bool> predicate)
Binder\PatternExplainer.cs (1)
111Func<ImmutableArray<BoundDecisionDagNode>, bool, bool> handler)
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (1)
804private 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)
1856private MethodSymbol EnsurePrivateImplClassMethodExists<TArg>(SyntaxNode syntaxNode, string methodName, Func<SynthesizedPrivateImplementationDetailsType, TArg, MethodSymbol> createMethodSymbol, TArg arg, DiagnosticBag diagnostics)
FlowAnalysis\NullableWalker.cs (9)
3877var elementConversionCompletions = ArrayBuilder<Func<TypeWithAnnotations /*targetElementType*/, TypeSymbol /*targetCollectionType*/, TypeWithState>>.GetInstance(); 3905void visitElement(BoundNode element, BoundCollectionExpression node, TypeWithAnnotations targetElementType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> elementConversionCompletions) 3997TypeWithState convertCollection(BoundCollectionExpression node, TypeWithAnnotations targetCollectionType, ArrayBuilder<Func<TypeWithAnnotations, TypeSymbol, TypeWithState>> completions) 4011foreach (var completion in completions) 4105(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion) = 4123Func<TypeSymbol, MethodSymbol?, int>? initialStateInferenceCompletion, 4152Func<TypeSymbol, MethodSymbol?, int> initialStateInferenceCompletion, 4188(int slot, NullableFlowState resultState, Func<TypeSymbol, MethodSymbol?, int>? completion) inferInitialObjectState( 4259Func<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)
664private 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)
4329Func<LanguageParser, SyntaxKind, bool> abortFunction, 4371Func<LanguageParser, SyntaxKind, bool> abortFunction, 4419Func<LanguageParser, SyntaxKind, bool> abortFunction,
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)
454static 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)
305Func<AttributeSyntax, Binder?, bool>? attributeMatchesOpt = null, 589Func<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\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
231private static SyntaxKind Aggregate<T>(SyntaxKind seed, SyntaxList<T> nodes, Func<SyntaxKind, T, SyntaxKind> func)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
896Func<TConditionalOrSwitchExpression, ExpressionSyntax, ExpressionSyntax?> getAlternativeArm,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
39Func<TParentExpression, InitializerExpressionSyntax, TParentExpression> withInitializer,
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
39Func<TMatch?, ExpressionSyntax, TElementSyntax> createElement)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
176Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
233Func<string, T, SyntaxToken> tokenFactory) 244Func<string, T, SyntaxToken> tokenFactory,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (1)
141Func<string, string, Task> verifyFunc = shouldSuggestConversion
TextStructureNavigation\TextStructureNavigatorTests.cs (2)
449Func<ITextStructureNavigator, SnapshotSpan, SnapshotSpan> func, 461Func<ITextStructureNavigator, SnapshotSpan, SnapshotSpan> func,
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
31internal Func<int, CSharpSyntaxContext, Task<ImmutableArray<RecommendedKeyword>>>? RecommendKeywordsAsync;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
1598static void verifyOperators<T>(ImmutableArray<T> operators, Func<T, bool, bool> predicate, int expectedSigned, int expectedUnsigned)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
FlowAnalysis\FlowTestBase.cs (6)
137protected T CompileAndGetModelAndConstructorInitializer<T>(string program, Func<SemanticModel, ConstructorInitializerSyntax, T> analysisDelegate, params MetadataReference[] references) 158protected T CompileAndGetModelAndPrimaryConstructorInitializer<T>(string program, Func<SemanticModel, PrimaryConstructorBaseTypeSyntax, T> analysisDelegate, params MetadataReference[] references) 179protected T CompileAndGetModelAndExpression<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, params MetadataReference[] references) 184protected T CompileAndGetModelAndExpression<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, TargetFramework targetFramework, bool assertNoDiagnostics, params MetadataReference[] references) 284protected IEnumerable<T> CompileAndGetModelAndMultipleExpressions<T>(string program, Func<SemanticModel, ExpressionSyntax, T> analysisDelegate, int treeindex = 0, int which = -1) 295protected IEnumerable<T> CompileAndGetModelAndMultipleStatements<T>(string program, Func<SemanticModel, StatementSyntax, T> analysisDelegate, int treeindex = 0, int which = -1)
Microsoft.CodeAnalysis.CSharp.Features (11)
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,
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1459internal override Func<SyntaxToken, SyntaxToken, bool> AreTokensEquivalent
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (1)
231private static SyntaxKind Aggregate<T>(SyntaxKind seed, SyntaxList<T> nodes, Func<SyntaxKind, T, SyntaxKind> func)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
39Func<TParentExpression, InitializerExpressionSyntax, TParentExpression> withInitializer,
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
39Func<TMatch?, ExpressionSyntax, TElementSyntax> createElement)
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
57Func<SyntaxNode, int?, bool> shouldSkip,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EnableNullable\EnableNullableTests.cs (3)
26private static readonly Func<Solution, ProjectId, Solution> s_enableNullableInFixedSolution = 42private static readonly Func<Solution, ProjectId, Solution> s_enableNullableInFixedSolutionFromRestoreKeyword = 58private static readonly Func<Solution, ProjectId, Solution> s_enableNullableInFixedSolutionFromDisableKeyword =
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (19)
Semantics\DelegateTypeTests.cs (1)
681private static IEnumerable<object?[]> GetMethodGroupData(Func<string, string, DiagnosticDescription[]> getExpectedDiagnostics)
Semantics\NativeIntegerTests.cs (1)
4838static void verifyOperators<T>(ImmutableArray<T> operators, Func<T, bool, bool> predicate, int expectedSigned, int expectedUnsigned)
Semantics\NullableReferenceTypesTests.cs (7)
126906Func<int, int, NullableAnnotation> getResult = (i, j) => NullableAnnotationExtensions.Join(inputs[i], inputs[j]); 126923Func<int, int, NullableFlowState> getResult = (i, j) => inputs[i].Join(inputs[j]); 126938Func<int, int, NullableAnnotation> getResult = (i, j) => NullableAnnotationExtensions.Meet(inputs[i], inputs[j]); 126954Func<int, int, NullableFlowState> getResult = (i, j) => inputs[i].Meet(inputs[j]); 126969Func<int, int, NullableAnnotation> getResult = (i, j) => NullableAnnotationExtensions.EnsureCompatible(inputs[i], inputs[j]); 126981private static void AssertEqual(NullableAnnotation[,] expected, Func<int, int, NullableAnnotation> getResult, int size) 126986private static void AssertEqual(NullableFlowState[,] expected, Func<int, int, NullableFlowState> getResult, int size)
SourceGeneration\GeneratorDriverTests.cs (8)
1683Func<int, CancellationToken, int> func = (input, _) => input; 1684Func<int, CancellationToken, int> throwsFunc = (input, _) => throw new InvalidOperationException("user code exception"); 1685Func<int, CancellationToken, int> timeoutFunc = (input, ct) => { ct.ThrowIfCancellationRequested(); return input; }; 1686Func<int, CancellationToken, int> otherTimeoutFunc = (input, _) => throw new OperationCanceledException(); 1688var userFunc = func.WrapUserFunction(catchAnalyzerExceptions: true); 1689var userThrowsFunc = throwsFunc.WrapUserFunction(catchAnalyzerExceptions: true); 1690var userTimeoutFunc = timeoutFunc.WrapUserFunction(catchAnalyzerExceptions: true); 1691var userOtherTimeoutFunc = otherTimeoutFunc.WrapUserFunction(catchAnalyzerExceptions: true);
SourceGeneration\StateTableTests.cs (2)
1364private readonly Func<DriverStateTable.Builder, NodeStateTable<T>, NodeStateTable<T>> _callback; 1366public CallbackNode(Func<DriverStateTable.Builder, NodeStateTable<T>, NodeStateTable<T>> callback)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\CSharpCompilationOptionsTests.cs (3)
34Func<CompilationOptions, T, CompilationOptions> factory, 41private static void TestPropertyGeneric<TOptions, T>(TOptions oldOptions, Func<TOptions, T, TOptions> factory, 99Func<CSharpCompilationOptions, T, CSharpCompilationOptions> factory,
Symbols\EnumTests.cs (1)
294private static string GenerateEnum(int n, Func<int, int, string> getMemberValue)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\CSharpParseOptionsTests.cs (1)
20private void TestProperty<T>(Func<CSharpParseOptions, T, CSharpParseOptions> factory, Func<CSharpParseOptions, T> getter, T validValue)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestBase.cs (1)
1580internal CompilationVerifier CompileAndVerifyFieldMarshal(CSharpTestSource source, Func<string, PEAssembly, byte[]> getExpectedBlob, bool isField = true) =>
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
896Func<TConditionalOrSwitchExpression, ExpressionSyntax, ExpressionSyntax?> getAlternativeArm,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
176Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
233Func<string, T, SyntaxToken> tokenFactory) 244Func<string, T, SyntaxToken> tokenFactory,
Microsoft.CodeAnalysis.Debugging.Package (24)
CustomDebugInfoReader.cs (3)
341Func<int, TArg, byte[]?> getMethodCustomDebugInfo, 342Func<int, TArg, ImmutableArray<string>> getMethodImportStrings, 489Func<int, TArg, ImmutableArray<string>> getMethodImportStrings)
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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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()
Microsoft.CodeAnalysis.EditorFeatures (17)
Classification\CopyPasteAndPrintingClassificationBufferTaggerProvider.Tagger.cs (2)
180bool requireSingleSpan, Func<TextSpan, SegmentedList<ClassifiedSpan>, Task> addTagsAsync) 189Func<TextSpan, SegmentedList<ClassifiedSpan>, Task> addAsync)
IntelliSense\ModelComputation.cs (1)
100Func<TModel, CancellationToken, Task<TModel>> transformModelAsync,
Lightup\ISmartRenameSessionFactoryWrapper.cs (1)
19private static readonly Func<object, SnapshotSpan, object?> s_createSmartRenameSession;
Lightup\ISmartRenameSessionWrapper.cs (1)
37private static readonly Func<object, CancellationToken, Task<IReadOnlyList<string>>> s_getSuggestionsAsync;
Lightup\LightupHelpers.cs (3)
353public static Func<T, TArg, TResult> CreateFunctionAccessor<T, TArg, TResult>(Type? type, string methodName, Type? argType, TResult defaultValue) 399Expression.Lambda<Func<T, TArg, TResult>>( 570private static Func<T, TArg, TResult> CreateFallbackFunction<T, TArg, TResult>(TResult defaultValue)
Organizing\OrganizeDocumentCommandHandler.cs (4)
96Func<ITextSnapshot, IUIThreadOperationContext, Task<Document?>> getCurrentDocumentAsync, 97Func<Document, CancellationToken, Task<Document>> getChangedDocumentAsync) 112Func<ITextSnapshot, IUIThreadOperationContext, Task<Document?>> getCurrentDocumentAsync, 113Func<Document, CancellationToken, Task<Document>> getChangedDocumentAsync)
Preview\AbstractPreviewFactoryService.cs (2)
275Func<TDocument, CancellationToken, ValueTask<ITextDocument>> createEditorDocumentAsync, 342Func<TDocument, CancellationToken, ValueTask<ITextDocument>> createEditorDocumentAsync,
Shared\Extensions\ITextViewExtensions.cs (2)
198Func<TTextView, ITextBuffer, TProperty> valueCreator) where TTextView : class, ITextView 212Func<TTextView, ITextBuffer, TProperty> valueCreator,
Shared\Extensions\ITextViewExtensions.PerSubjectBufferProperty.cs (1)
32Func<TTextView, ITextBuffer, TProperty> valueCreator,
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
AbstractCommandHandlerTestState.cs (6)
268public bool SendEscape(Func<EscapeKeyCommandArgs, CommandExecutionContext, bool> commandHandler) 280public bool SendTab(Func<TabKeyCommandArgs, CommandExecutionContext, bool> commandHandler) 286public bool SendBackTab(Func<BackTabKeyCommandArgs, CommandExecutionContext, bool> commandHandler) 292public bool SendReturn(Func<ReturnKeyCommandArgs, CommandExecutionContext, bool> commandHandler) 319public bool SendInsertSnippetCommand(Func<InsertSnippetCommandArgs, CommandExecutionContext, bool> commandHandler) 325public bool SendSurroundWithCommand(Func<SurroundWithCommandArgs, CommandExecutionContext, bool> commandHandler)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
ITextImageHelpers.cs (1)
16private static readonly Func<int, int, string> s_textLog = (v1, v2) => string.Format("FullRange : from {0} to {1}", v1, v2);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Tagging\AsynchronousTaggerTests.cs (1)
248Func<TaggerContext<TextMarkerTag>, DocumentSnapshotSpan, IEnumerable<TagSpan<TextMarkerTag>>> callback,
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
ImmutableArrayExtensions.cs (1)
12internal static int IndexOf<TItem, TArg>(this ImmutableArray<TItem> array, Func<TItem, TArg, bool> predicate, TArg arg)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (3)
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;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
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;
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
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;
Microsoft.CodeAnalysis.Extensions.Package (85)
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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<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.Copilot (3)
Completion\IContextProvider.cs (1)
19Func<ImmutableArray<IContextItem>, CancellationToken, ValueTask> callback,
Internal\RelatedDocuments\CSharpCopilotRelatedDocumentsService.cs (1)
26public ValueTask GetRelatedDocumentIdsAsync(Document document, int position, Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> callbackAsync, CancellationToken cancellationToken)
RelatedDocuments\ICopilotRelatedDocumentsService.cs (1)
16Document document, int position, Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> callbackAsync, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.Extensions (1)
Internal\ExtensionMessageHandlerFactory.cs (1)
39Func<object, Type, IExtensionMessageHandlerWrapper<TArgument>> wrapperCreator,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
InlineHints\FSharpInlineHint.cs (2)
20private readonly Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? _getDescriptionAsync; 25Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null)
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.ExternalAccess.Razor.Features (6)
Remote\RazorRemoteCallbackWrapper.cs (2)
20public ValueTask InvokeAsync(Func<T, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 23public ValueTask<TResult> InvokeAsync<TResult>(Func<T, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
Remote\RazorRemoteHostClient.cs (2)
40public async ValueTask<bool> TryInvokeAsync<TService>(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) where TService : class 46public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) where TService : class
Remote\RazorRemoteServiceConnectionWrapper.cs (2)
25public ValueTask<bool> TryInvokeAsync(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 28public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (52)
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, 25private readonly Func<ImmutableSegmentedList<Project>, CancellationToken, ValueTask> _processBatchAsync = processBatchAsync;
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (5)
431internal abstract Func<SyntaxToken, SyntaxToken, bool> AreTokensEquivalent { get; } 2009Func<TSyntaxNode, TSyntaxNode, bool> areEquivalent, 2010Func<TSyntaxNode, TSyntaxNode, bool>? areSimilar, 2077Func<TSyntaxNode, TSyntaxNode, bool> comparer, 2167private static int IndexOfEquivalent<TSyntaxNode>(SyntaxNode newNode, List<SyntaxNode?> oldNodes, int startIndex, Func<TSyntaxNode, TSyntaxNode, bool> comparer)
EditAndContinue\ActiveStatementsMap.cs (1)
298Func<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;
RelatedDocuments\AbstractRelatedDocumentsService.cs (2)
37Document document, int position, Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> callbackAsync, CancellationToken cancellationToken) 67Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> callbackAsync,
RelatedDocuments\IRelatedDocumentsService.cs (1)
22Document document, int position, Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> callbackAsync, CancellationToken cancellationToken);
RelatedDocuments\IRemoteRelatedDocumentsService.cs (1)
39Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> onRelatedDocumentFoundAsync,
Shared\Extensions\DocumentExtensions.cs (2)
44Func<SyntaxNode, SyntaxNode, SyntaxNode> computeReplacementNode, 73Func<Document, CancellationToken, Task<bool>> contextChecker,
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
109Func<TSyntax, SyntaxToken, bool> isArgumentListToken,
src\Analyzers\Core\Analyzers\UseAutoProperty\AccessedFields.cs (1)
28public AccessedFields Where<TArg>(Func<IFieldSymbol, TArg, bool> predicate, TArg arg)
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (1)
243Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
325Func<SyntaxNode, SyntaxNode, SyntaxNode> createAddOrRemoveHandler)
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (2)
127private ProjectOptionsChangeAction(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 132public static ProjectOptionsChangeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (3)
341Func<int, TArg, byte[]?> getMethodCustomDebugInfo, 342Func<int, TArg, ImmutableArray<string>> getMethodImportStrings, 489Func<int, TArg, ImmutableArray<string>> getMethodImportStrings)
SymbolSearch\Windows\SymbolSearchUpdateEngine.cs (2)
60Func<Exception, CancellationToken, bool> reportAndSwallowExceptionUnlessCanceled) 119Func<AddReferenceDatabase, Symbol, TResult> createResult,
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (1)
58private readonly Func<Exception, CancellationToken, bool> _reportAndSwallowExceptionUnlessCanceled;
Wrapping\WrapItemsAction.cs (1)
20internal sealed class WrapItemsAction(string title, string parentTitle, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument)
Microsoft.CodeAnalysis.Features.Test.Utilities (6)
EditAndContinue\ActiveStatementsDescription.cs (1)
132Func<string, string, SyntaxTree> syntaxTreeFactory,
EditAndContinue\MockActiveStatementSpanProvider.cs (2)
14public Func<Solution, ImmutableArray<DocumentId>, ImmutableArray<ImmutableArray<ActiveStatementSpan>>>? GetBaseActiveStatementSpansImpl; 15public Func<TextDocument, ActiveStatementSpanProvider, ImmutableArray<ActiveStatementSpan>>? GetAdjustedActiveStatementSpansImpl;
EditAndContinue\MockEditAndContinueService.cs (3)
20public Func<Solution, ImmutableArray<DocumentId>, ImmutableArray<ImmutableArray<ActiveStatementSpan>>>? GetBaseActiveStatementSpansImpl; 22public Func<TextDocument, ActiveStatementSpanProvider, ImmutableArray<ActiveStatementSpan>>? GetAdjustedActiveStatementSpansImpl; 31public Func<Document, ActiveStatementSpanProvider, ImmutableArray<Diagnostic>>? GetDocumentDiagnosticsImpl;
Microsoft.CodeAnalysis.InteractiveHost (111)
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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\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\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;
Microsoft.CodeAnalysis.LanguageServer (1)
Logging\LspLogMessageLogger.cs (1)
24public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\Extensions.cs (1)
170public static T FindDocumentInProjectContext<T>(this ImmutableArray<T> documents, TextDocumentIdentifier documentIdentifier, Func<Solution, DocumentId, T> documentGetter) where T : TextDocument
Workspaces\LspWorkspaceManager.cs (1)
92private static async ValueTask ApplyChangeToMutatingWorkspaceAsync(Workspace workspace, DocumentUri uri, Func<ILspWorkspace, DocumentId, ValueTask> change)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (193)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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.PooledObjects.Package (21)
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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\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;
Microsoft.CodeAnalysis.PublicApiAnalyzers (187)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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.Rebuild (1)
CompilationOptionsReader.cs (1)
289Func<string, SourceText, SyntaxTree> createSyntaxTreeFunc)
Microsoft.CodeAnalysis.Remote.ServiceHub (7)
Host\RemoteWorkspace.InFlightSolution.cs (1)
104public void TryKickOffPrimaryBranchWork_NoLock(Func<Solution, CancellationToken, Task<Solution>> updatePrimaryBranchAsync)
Host\RemoteWorkspace.SolutionCreator.cs (4)
429Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 430Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments, 474Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 475Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments,
Services\BrokeredServiceBase.cs (1)
152Func<Solution, Solution, ValueTask> implementation,
Services\RelatedDocuments\RemoteRelatedDocumentsService.cs (1)
28private Func<ImmutableArray<DocumentId>, CancellationToken, ValueTask> GetCallbackFunction(RemoteServiceCallbackId callbackId)
Microsoft.CodeAnalysis.Remote.Workspaces (18)
BrokeredServiceConnection.cs (2)
98public override async ValueTask<bool> TryInvokeAsync(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 113public override async ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaRemoteHostClient.cs (2)
40public async ValueTask<bool> TryInvokeAsync<TService>(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) where TService : class 46public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) where TService : class
ExternalAccess\Pythia\Api\PythiaRemoteServiceConnectionWrapper.cs (2)
25public ValueTask<bool> TryInvokeAsync(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 28public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\UnitTestingRemoteCallbackWrapper.cs (2)
20public ValueTask InvokeAsync(Func<T, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 23public ValueTask<TResult> InvokeAsync<TResult>(Func<T, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\UnitTestingRemoteHostClient.cs (2)
40public async ValueTask<bool> TryInvokeAsync<TService>(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) where TService : class 46public async ValueTask<Optional<TResult>> TryInvokeAsync<TService, TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) where TService : class
ExternalAccess\UnitTesting\Api\UnitTestingRemoteServiceConnectionWrapper.cs (2)
25public ValueTask<bool> TryInvokeAsync(Func<TService, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 28public ValueTask<Optional<TResult>> TryInvokeAsync<TResult>(Func<TService, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken)
RemoteCallback.cs (4)
37Func<RemoteCallback<T>, CancellationToken, ValueTask> invocation, 61public async ValueTask InvokeAsync(Func<T, CancellationToken, ValueTask> invocation, CancellationToken cancellationToken) 76public async ValueTask<TResult> InvokeAsync<TResult>(Func<T, CancellationToken, ValueTask<TResult>> invocation, CancellationToken cancellationToken) 100Func<PipeReader, CancellationToken, ValueTask> reader,
ServiceBrokerExtensions.cs (2)
14protected async ValueTask InvokeAsync(Func<TService, CancellationToken, ValueTask> operation, CancellationToken cancellationToken) 24protected async ValueTask<TResult> InvokeAsync<TResult>(Func<TService, CancellationToken, ValueTask<TResult>> operation, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ResxSourceGenerator (187)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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.Test.Utilities (16)
Assert\AssertEx.cs (3)
912public static void Equal(bool[,] expected, Func<int, int, bool> getResult, int size) 917public static void Equal<T>(T[,] expected, Func<int, int, T> getResult, Func<T, T, bool> valuesEqual, Func<T, string> printValue, string format, int size)
Assert\EqualityUtil.cs (2)
14Func<T, T, bool> compEqualsOperator, 15Func<T, T, bool> compNotEqualsOperator,
Assert\EqualityUtil`1.cs (4)
23private readonly Func<T, T, bool> _compareWithEqualityOperator; 24private readonly Func<T, T, bool> _compareWithInequalityOperator; 28Func<T, T, bool> compEquality = null, 29Func<T, T, bool> compInequality = null)
CommonTestBase.cs (1)
143internal CompilationVerifier CompileAndVerifyFieldMarshalCommon(Compilation compilation, Func<string, PEAssembly, byte[]> getExpectedBlob, bool isField = true)
Metadata\AggregatedMetadataReader.cs (1)
34private TEntity GetValue<TEntity>(Handle handle, Func<MetadataReader, Handle, TEntity> getter)
Metadata\MetadataValidation.cs (1)
65internal static void MarshalAsMetadataValidator(PEAssembly assembly, Func<string, PEAssembly, byte[]> getExpectedBlob, bool isField = true)
Mocks\TestEqualityComparer.cs (1)
13public class TestEqualityComparer<T>(Func<T?, T?, bool>? equals = null, Func<T, int>? getHashCode = null) : IEqualityComparer<T>
ObjectReference.cs (1)
186public ObjectReference<TResult> GetObjectReference<TResult, TArg>(Func<T, TArg, TResult> function, TArg argument) where TResult : class
SourceGeneration\LambdaComparer.cs (2)
13private readonly Func<T?, T?, bool> _equal; 16public LambdaComparer(Func<T?, T?, bool> equal, int? hashCode = null)
Microsoft.CodeAnalysis.Threading.Package (83)
AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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)
AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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)
ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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()
Microsoft.CodeAnalysis.UnitTests (15)
Collections\Extensions\EnumerableExtensionsTests.cs (2)
162public sealed class Comparer<T>(Func<T, T, bool> equals, Func<T, int> hashCode) : IEqualityComparer<T> 164private readonly Func<T, T, bool> _equals = equals;
Collections\Extensions\ImmutableArrayExtensionsTests.cs (2)
547public sealed class Comparer<T>(Func<T, T, bool> equals, Func<T, int> hashCode) : IEqualityComparer<T> 549private readonly Func<T, T, bool> _equals = equals;
Collections\Extensions\ListExtensionsTests.cs (2)
16public sealed class Comparer<T>(Func<T, T, bool> equals, Func<T, int> hashCode) : IEqualityComparer<T> 18private readonly Func<T, T, bool> _equals = equals;
Collections\ImmutableListTestBase.cs (5)
24protected static readonly Func<IList, object?, object> IndexOfFunc = (l, v) => l.IndexOf(v); 25protected static readonly Func<IList, object?, object> ContainsFunc = (l, v) => l.Contains(v); 26protected static readonly Func<IList, object?, object> RemoveFunc = (l, v) => { l.Remove(v); return l.Count; }; 539protected void AssertIListBaselineBothDirections<T1, T2>(Func<IList, object?, object> operation, T1 item, T2 other) 559protected void AssertIListBaseline<T>(Func<IList, object?, object> operation, T item, object? other)
Collections\ImmutablesTestBase.nonnetstandard.cs (1)
29protected static void StructuralEqualityHelper<TCollection, TElement>(TCollection objectUnderTest, TElement additionalItem, Func<TCollection, IEnumerable<TElement>?, bool> equalsStructurally)
Collections\IndexOfTests.cs (2)
24Func<TCollection, int, int> indexOfItem, 93Func<TCollection, int, int> lastIndexOfItem,
Emit\EmitOptionsTests.cs (1)
21Func<EmitOptions, T, EmitOptions> factory,
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 (262)
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)
332Func<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)
120public LightweightRenameLocations Filter(Func<DocumentId, TextSpan, bool> filter)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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)
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
361Func<SqlConnection, SafeSqliteBlobHandle, Optional<T>> readBlob)
Workspace\Host\Metadata\MetadataReferenceCache.cs (2)
18internal sealed class MetadataReferenceCache(Func<string, MetadataReferenceProperties, MetadataReference> createReference) 23private readonly Func<string, MetadataReferenceProperties, MetadataReference> _createReference = createReference ?? throw new ArgumentNullException(nameof(createReference));
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\FileWatchedPortableExecutableReferenceFactory.cs (2)
50private readonly Func<string, CancellationToken, Task> _callback; 55Func<string, CancellationToken, Task> callback,
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (6)
66private readonly Func<Solution, DocumentId, bool> _documentAlreadyInWorkspace; 85Func<Solution, DocumentId, bool> documentAlreadyInWorkspace, 565Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 567Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments, 580Func<Solution, ImmutableArray<DocumentInfo>, Solution> addDocuments, 582Func<Solution, ImmutableArray<DocumentId>, Solution> removeDocuments,
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
77private readonly List<Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState>> _projectPropertyModificationsInBatch = []; 629foreach (var propertyModification in _projectPropertyModificationsInBatch)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (12)
51private readonly Func<bool, ImmutableArray<string>, Task> _onDocumentsAddedMaybeAsync; 81Func<bool, ImmutableArray<string>, Task> onDocumentsAddedMaybeAsync, 254public void ApplyChangeToWorkspaceWithProjectUpdateState(Func<Workspace, ProjectUpdateState, ProjectUpdateState> action) 277/// <inheritdoc cref="ApplyBatchChangeToWorkspaceAsync(Func{SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState}, Action{ProjectUpdateState}?)"/> 278public void ApplyBatchChangeToWorkspace(Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 283/// <inheritdoc cref="ApplyBatchChangeToWorkspaceAsync(Func{SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState}, Action{ProjectUpdateState}?)"/> 284public Task ApplyBatchChangeToWorkspaceAsync(Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 289/// <inheritdoc cref="ApplyBatchChangeToWorkspaceAsync(Func{SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState}, Action{ProjectUpdateState}?)"/> 290public async Task ApplyBatchChangeToWorkspaceMaybeAsync(bool useAsync, Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 306public async Task ApplyBatchChangeToWorkspaceMaybe_NoLockAsync(bool useAsync, Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 353Func<SolutionChangeAccumulator, ProjectUpdateState, ProjectUpdateState> mutation, Action<ProjectUpdateState>? onAfterUpdateAlways) 871Func<SolutionServices, TReference, TReference> createNewReference,
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) 468Func<SyntaxTreeIndex, CancellationToken, bool> predicate, CancellationToken cancellationToken) 478Func<TopLevelSyntaxTreeIndex, CancellationToken, bool> predicate, CancellationToken cancellationToken) 496private static readonly Func<DocumentId, Project, Document?> s_tryCreateDocumentFunction = 499private static readonly Func<DocumentId, Project, AdditionalDocument?> s_tryCreateAdditionalDocumentFunction = 502private static readonly Func<DocumentId, Project, AnalyzerConfigDocument?> s_tryCreateAnalyzerConfigDocumentFunction = 505private 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 (6)
159Func<StateChange, TArg, TranslationAction?> translate, 171/// Same as <see cref="ForkProject{TArg}(StateChange, Func{StateChange, TArg, TranslationAction?}, bool, TArg)"/> 275Func<ProjectId, TArgCanReuse, bool> canReuse, 775Func<DocumentInfo.DocumentAttributes, TArg, DocumentInfo.DocumentAttributes> updateAttributes) 869Func<ProjectState, ImmutableArray<TDocumentState>, TranslationAction> getTranslationAction) 1154private static readonly Func<ProjectId, SolutionState, RegularCompilationTracker> s_createCompilationTrackerFunction = CreateCompilationTracker;
Workspace\Solution\SolutionState.cs (1)
974Func<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) 201public 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)
200/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, ValueTuple{WorkspaceChangeKind, ProjectId?, DocumentId?}}, Action{Solution, Solution}?, Action{Solution, Solution}?)"/> 232Func<Solution, Solution, (WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind, 252Func<Solution, Solution, (WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind, 478Func<Solution, TData, Solution> transformation, 497/// <inheritdoc cref="SetCurrentSolution{TData}(TData, Func{Solution, TData, Solution}, bool, Action{Solution, Solution, TData}?, Action{Solution, Solution, TData}?)"/> 501Func<Solution, TData, Solution> transformation, 1283Func<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.BuildHost (77)
src\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\Compilers\Core\Portable\InternalUtilities\SpanUtilities.cs (1)
11public static bool All<TElement, TParam>(this ReadOnlySpan<TElement> span, TParam param, Func<TElement, TParam, bool> predicate)
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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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()
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Logging\TestOutputLoggerProvider.cs (1)
38public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.CodeAnalysis.Workspaces.UnitTests (45)
SolutionTests\SolutionTestHelpers.cs (2)
24public static void TestProperty<T, TValue>(T instance, Func<T, TValue, T> factory, Func<T, TValue> getter, TValue validNonDefaultValue, bool defaultThrows = false) 46public static void TestListProperty<T, TValue>(T instance, Func<T, IEnumerable<TValue>, T> factory, Func<T, IEnumerable<TValue>> getter, TValue item, bool allowDuplicates)
SolutionTests\TryApplyChangesTests.cs (4)
22private readonly Func<ParseOptions, ParseOptions, bool>? _canApplyParseOptions; 23private readonly Func<CompilationOptions, CompilationOptions, bool>? _canApplyCompilationOptions; 31Func<ParseOptions, ParseOptions, bool>? canApplyParseOptions = null, 32Func<CompilationOptions, CompilationOptions, bool>? canApplyCompilationOptions = null)
UtilityTest\AsyncLazyTests.cs (1)
148Func<ManualResetEvent?, CancellationToken, object>? synchronousComputation = null;
UtilityTest\SpecializedTasksTests.cs (38)
76Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(new IntermediateType()); 77Func<IntermediateType, StateType, ResultType> transform = (_, _) => new(); 90Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(new IntermediateType()); 91Func<IntermediateType, StateType, ResultType> transform = (_, _) => new(); 109Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(new IntermediateType()); 110Func<IntermediateType, StateType, ResultType> transform = (_, _) => 128Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 134Func<IntermediateType, StateType, ResultType> transform = (_, _) => new(); 155Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 161Func<IntermediateType, StateType, ResultType> transform = (_, _) => 186Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(Task.FromCanceled<IntermediateType>(cancellationToken)); 187Func<IntermediateType, StateType, ResultType> transform = (_, _) => 211Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 218Func<IntermediateType, StateType, ResultType> transform = (_, _) => 243Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(Task.FromCanceled<IntermediateType>(unexpectedCts.Token)); 244Func<IntermediateType, StateType, ResultType> transform = (_, _) => 271Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 278Func<IntermediateType, StateType, ResultType> transform = (_, _) => 310Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(Task.FromCanceled<IntermediateType>(unexpectedCts.Token)); 311Func<IntermediateType, StateType, ResultType> transform = (_, _) => 338Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 345Func<IntermediateType, StateType, ResultType> transform = (_, _) => 369Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => throw fault; 370Func<IntermediateType, StateType, ResultType> transform = (_, _) => 391Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(Task.FromException<IntermediateType>(fault)); 392Func<IntermediateType, StateType, ResultType> transform = (_, _) => 414Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 420Func<IntermediateType, StateType, ResultType> transform = (_, _) => 446Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => throw fault; 447Func<IntermediateType, StateType, ResultType> transform = (_, _) => 471Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(Task.FromException<IntermediateType>(fault)); 472Func<IntermediateType, StateType, ResultType> transform = (_, _) => 497Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 503Func<IntermediateType, StateType, ResultType> transform = (_, _) => 524Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = (_, _) => new(new IntermediateType()); 525Func<IntermediateType, StateType, ResultType> transform = (_, _) => throw fault; 540Func<StateType, CancellationToken, ValueTask<IntermediateType>> func = async (_, _) => 546Func<IntermediateType, StateType, ResultType> transform = (_, _) => throw fault;
Microsoft.CommonLanguageServerProtocol.Framework.Example (1)
src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Microsoft.CommonLanguageServerProtocol.Framework.Package (3)
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;
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.DotNet.Build.Tasks.Feed (1)
src\PublishArtifactsInManifestBase.cs (1)
1398Func<string, string, Task<ProcessExecutionResult>> RunProcessAndGetOutputsCallBack = null
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
PublishArtifactsInManifestTests.cs (1)
119Func<string, string, Task<ProcessExecutionResult>> testRunAndLogProcess = (string fakeExePath, string fakeExeArgs) =>
Microsoft.DotNet.Helix.Client (3)
generated-code\PagedResponse.cs (3)
26public static AsyncPageable<T> Create<T>(Func<string, int?, IAsyncEnumerable<Page<T>>> pageFunc) 33private readonly Func<string, int?, IAsyncEnumerable<Page<T>>> _pageFunc; 35public FuncAsyncPageable(Func<string, int?, IAsyncEnumerable<Page<T>>> pageFunc)
Microsoft.DotNet.NuGetRepack.Tests (6)
TestHelpers\AssertEx.cs (6)
168public static void Equal<T>(ImmutableArray<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null, string message = null) 180public static void Equal<T>(IEnumerable<T> expected, ImmutableArray<T> actual, Func<T, T, bool> comparer = null, string message = null, string itemSeparator = null) 192public static void Equal<T>(ImmutableArray<T> expected, ImmutableArray<T> actual, Func<T, T, bool> comparer = null, string message = null, string itemSeparator = null) 197public static void Equal<T>(IEnumerable<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null, string message = null, 226private static bool SequenceEqual<T>(IEnumerable<T> expected, IEnumerable<T> actual, Func<T, T, bool> comparer = null) 431Func<T, T, bool> comparer = null,
Microsoft.DotNet.RemoteExecutor (3)
RemoteExecutor.cs (3)
204public static RemoteInvokeHandle Invoke(Func<string, string, Task<int>> method, string arg1, string arg2, 272public static RemoteInvokeHandle Invoke(Func<string, string, Task> method, string arg1, string arg2, 340public static RemoteInvokeHandle Invoke(Func<string, string, int> method, string arg1, string arg2,
Microsoft.Extensions.AI (9)
ChatCompletion\ChatClientBuilder.cs (2)
18private List<Func<IChatClient, IServiceProvider, IChatClient>>? _clientFactories; 82public ChatClientBuilder Use(Func<IChatClient, IServiceProvider, IChatClient> clientFactory)
ChatCompletion\FunctionInvokingChatClient.cs (1)
276public Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>>? FunctionInvoker { get; set; }
Embeddings\EmbeddingGeneratorBuilder.cs (2)
21private List<Func<IEmbeddingGenerator<TInput, TEmbedding>, IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>>>? _generatorFactories; 86Func<IEmbeddingGenerator<TInput, TEmbedding>, IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> generatorFactory)
Image\ImageGeneratorBuilder.cs (2)
18private List<Func<IImageGenerator, IServiceProvider, IImageGenerator>>? _generatorFactories; 78public ImageGeneratorBuilder Use(Func<IImageGenerator, IServiceProvider, IImageGenerator> generatorFactory)
SpeechToText\SpeechToTextClientBuilder.cs (2)
18private List<Func<ISpeechToTextClient, IServiceProvider, ISpeechToTextClient>>? _clientFactories; 74public SpeechToTextClientBuilder Use(Func<ISpeechToTextClient, IServiceProvider, ISpeechToTextClient> clientFactory)
Microsoft.Extensions.AI.Abstractions (9)
Functions\AIFunctionFactory.cs (5)
710ParameterMarshallers = parameters.Length > 0 ? new Func<AIFunctionArguments, CancellationToken, object?>[parameters.Length] : []; 746public Func<AIFunctionArguments, CancellationToken, object?>[] ParameterMarshallers { get; } 747public Func<object?, CancellationToken, ValueTask<object?>> ReturnParameterMarshaller { get; } 790private static Func<AIFunctionArguments, CancellationToken, object?> GetParameterMarshaller( 908private static Func<object?, CancellationToken, ValueTask<object?>> GetReturnParameterMarshaller(
Functions\AIFunctionFactoryOptions.cs (1)
137public Func<ParameterInfo, AIFunctionArguments, object?>? BindParameter { get; init; }
src\Shared\JsonSchemaExporter\JsonSchemaExporterOptions.cs (1)
36public Func<JsonSchemaExporterContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
Utilities\AIJsonSchemaCreateOptions.cs (1)
26public Func<AIJsonSchemaCreateContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
Utilities\AIJsonSchemaTransformOptions.cs (1)
19public Func<AIJsonSchemaTransformContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
Microsoft.Extensions.AI.Abstractions.Tests (7)
Functions\DelegatingAIFunctionTests.cs (1)
87private 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; }
TestImageGenerator.cs (1)
21public Func<Type, object?, object?> GetServiceCallback { get; set; }
TestSpeechToTextClient.cs (1)
36public 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)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestImageGenerator.cs (1)
21public Func<Type, object?, object?> GetServiceCallback { get; set; }
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (1)
36public Func<Type, object?, object?> GetServiceCallback { get; set; }
Microsoft.Extensions.AI.Tests (7)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
122private sealed class CustomCachingChatClient(IChatClient innerClient, IDistributedCache storage, Func<IEnumerable<ChatMessage>, ChatOptions?, bool> enableCaching) :
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
67Func<FunctionInvocationContext, CancellationToken, ValueTask<object?>> invoker = (ctx, ct) => new ValueTask<object?>("test");
Functions\AIFunctionFactoryTest.cs (1)
228Func<string, string, string> dotnetFunc3 = [Description("This is a test function")] ([Description("This is A")] a, [Description("This is B")] b) => b + " " + a;
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestEmbeddingGenerator.cs (1)
24public Func<Type, object?, object?> GetServiceCallback { get; set; }
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestImageGenerator.cs (1)
21public Func<Type, object?, object?> GetServiceCallback { get; set; }
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (1)
36public Func<Type, object?, object?> GetServiceCallback { get; set; }
Microsoft.Extensions.AmbientMetadata.Application.Tests (1)
AcceptanceTests.cs (1)
42private static async Task RunAsync(Func<ApplicationMetadata, IHostEnvironment, Task> func, string? sectionName)
Microsoft.Extensions.Caching.Abstractions (4)
Hybrid\HybridCache.cs (4)
32public abstract ValueTask<T> GetOrCreateAsync<TState, T>(string key, TState state, Func<TState, CancellationToken, ValueTask<T>> factory, 84Func<TState, CancellationToken, ValueTask<T>> factory, 130Func<TState, CancellationToken, ValueTask<T>> factory, 147public 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)
128public override ValueTask<T> GetOrCreateAsync<TState, T>(string key, TState state, Func<TState, CancellationToken, ValueTask<T>> underlyingDataCallback, 222Func<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)
76void ILogger.Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
CacheServiceExtensionsTests.cs (1)
187public override ValueTask<T> GetOrCreateAsync<TState, T>(string key, TState state, Func<TState, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions options = null, IEnumerable<string> tags = null, CancellationToken cancellationToken = default)
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)
43public TR RunOnEmptyStack<T1, T2, TR>(Func<T1, T2, TR> action, T1 arg1, T2 arg2) 55var t = ((Func<T1, T2, TR>, T1, T2))s;
Microsoft.Extensions.DependencyInjection.Abstractions (29)
Extensions\ServiceCollectionDescriptorExtensions.Keyed.cs (6)
67Func<IServiceProvider, object?, object> implementationFactory) 122Func<IServiceProvider, object?, TService> implementationFactory) 183Func<IServiceProvider, object?, object> implementationFactory) 238Func<IServiceProvider, object?, TService> implementationFactory) 299Func<IServiceProvider, object?, object> implementationFactory) 373Func<IServiceProvider, object?, TService> implementationFactory)
ServiceCollectionServiceExtensions.Keyed.cs (10)
53Func<IServiceProvider, object?, object> implementationFactory) 137Func<IServiceProvider, object?, TService> implementationFactory) 162Func<IServiceProvider, object?, TImplementation> implementationFactory) 211Func<IServiceProvider, object?, object> implementationFactory) 295Func<IServiceProvider, object?, TService> implementationFactory) 320Func<IServiceProvider, object?, TImplementation> implementationFactory) 369Func<IServiceProvider, object?, object> implementationFactory) 453Func<IServiceProvider, object?, TService> implementationFactory) 478Func<IServiceProvider, object?, TImplementation> implementationFactory) 552Func<IServiceProvider, object?, object> implementationFactory,
ServiceDescriptor.cs (13)
111Func<IServiceProvider, object?, object> factory, 233public Func<IServiceProvider, object?, object>? KeyedImplementationFactory 241return (Func<IServiceProvider, object?, object>?)_implementationFactory; 454Func<IServiceProvider, object?, TImplementation> implementationFactory) 488public static ServiceDescriptor KeyedTransient<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) 521public static ServiceDescriptor KeyedTransient(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory) 625Func<IServiceProvider, object?, TImplementation> implementationFactory) 659public static ServiceDescriptor KeyedScoped<TService>(object? serviceKey, Func<IServiceProvider, object?, TService> implementationFactory) 692public static ServiceDescriptor KeyedScoped(Type service, object? serviceKey, Func<IServiceProvider, object?, object> implementationFactory) 803Func<IServiceProvider, object?, TImplementation> implementationFactory) 839Func<IServiceProvider, object?, TService> implementationFactory) 877Func<IServiceProvider, object?, object> implementationFactory) 1031public 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.Testing (1)
Logging\FakeLogger.cs (1)
72public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
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)
313Func<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)
42private 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.Polly.Tests (1)
PolicyHttpMessageHandlerTest.cs (1)
440public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendAsync { get; set; }
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)
29public static ILoggingBuilder AddFilter(this ILoggingBuilder builder, Func<string?, LogLevel, bool> categoryLevelFilter) => 39public static ILoggingBuilder AddFilter<T>(this ILoggingBuilder builder, Func<string?, LogLevel, bool> categoryLevelFilter) where T : ILoggerProvider => 118public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) => 128public 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)
55public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter)
Microsoft.Extensions.Logging.Generators (4)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithMetadataName.cs (2)
92Func<SyntaxNode, CancellationToken, bool> predicate, 93Func<GeneratorAttributeSyntaxContext, CancellationToken, T> transform)
src\libraries\Common\src\Roslyn\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
91Func<SyntaxNode, CancellationToken, bool> predicate) 194Func<SyntaxNode, CancellationToken, bool> predicate,
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 (6)
OptionsBuilder.cs (2)
366public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation) where TDep : notnull 376public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, bool> validation, string failureMessage) where TDep : notnull
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.Dns (2)
Resolver\DnsResolver.cs (1)
688internal static (DnsDataReader reader, DnsMessageHeader header, SendQueryError sendError) SendDnsQueryCustomTransport(Func<Memory<byte>, int, int> callback, EncodedDomainName dnsSafeName, QueryType queryType)
Resolver\ResolverOptions.cs (1)
15internal Func<Memory<byte>, int, int>? _transportOverride;
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (9)
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)
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)
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 (16)
Logging\ExtendedLogger.cs (10)
54public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 61ModernPath(logLevel, eventId, msgState, exception, (Func<LoggerMessageState, Exception?, string>)(object)formatter); 222private void ModernPath(LogLevel logLevel, EventId eventId, LoggerMessageState msgState, Exception? exception, Func<LoggerMessageState, Exception?, string> formatter) 297Func<LoggerMessageState, Exception?, string> fmt = s.Formatter!; 343Func<LoggerMessageState, Exception?, string>? fmt = s.Formatter!; 368private void LegacyPath<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) 437var fmt = (Func<TState, Exception?, string>)s.Formatter!; 483var fmt = (Func<TState, Exception?, string>)s.Formatter!;
Logging\ExtendedLogger.ModernTagJoiner.cs (1)
19public Func<LoggerMessageState, Exception?, string>? Formatter;
Logging\Import\LoggerInformation.cs (1)
35public Action<LogLevel, EventId, ExtendedLogger.ModernTagJoiner, Exception?, Func<ExtendedLogger.ModernTagJoiner, Exception?, string>> LoggerLog { get; }
src\Shared\Memoization\Memoize.cs (2)
57public static Func<TParameter1, TParameter2, TResult> Function<TParameter1, TParameter2, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TResult>( 58Func<TParameter1, TParameter2, TResult> f)
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)
1093Func<TState, Exception?, string> formatter) 1156public 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.GeneratorTests (2)
ValidationsGeneratorTestBase.cs (2)
84internal static async Task VerifyValidatableType(Compilation compilation, string typeName, Func<ValidationOptions, Type, Task> verifyFunc) 104internal static async Task VerifyEndpoint(Compilation compilation, string routePattern, Func<Endpoint, IServiceProvider, Task> verifyFunc)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.Logging.Generated.Tests (1)
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)
test\Generators\Shared\RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
379Func<TReceiver, Compilation, TParserOutput> parser,
Microsoft.Interop.ComInterfaceGenerator (12)
Analyzers\AddGeneratedComClassFixer.cs (1)
43protected override Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (2)
192private readonly Func<TypePositionInfo, StubCodeContext, ResolvedGenerator> _func; 194public CallbackGeneratorResolver(Func<TypePositionInfo, StubCodeContext, ResolvedGenerator> func)
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
35protected override Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (4)
33protected abstract Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions); 106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<DocumentEditor, CancellationToken, Task> documentBasedFix, CancellationToken ct) 164protected record struct ConvertToSourceGeneratedInteropFix(Func<DocumentEditor, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions); 204var documentBasedFix = codeFixProvider.CreateFixForSelectedOptions(node, codeFixProvider.GetOptionsForIndividualFix(options, diagnostic));
VirtualMethodPointerStubGenerator.cs (4)
25Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator) 132Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator) 237Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator) 262Func<EnvironmentFlags, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator)
Microsoft.Interop.LibraryImportGenerator (6)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
230private sealed class CallbackGeneratorResolver(Func<TypePositionInfo, StubCodeContext, ResolvedGenerator> func) : IMarshallingGeneratorResolver
Analyzers\ConvertToLibraryImportFixer.cs (1)
129protected override Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (4)
33protected abstract Func<DocumentEditor, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions); 106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<DocumentEditor, CancellationToken, Task> documentBasedFix, CancellationToken ct) 164protected record struct ConvertToSourceGeneratedInteropFix(Func<DocumentEditor, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions); 204var documentBasedFix = codeFixProvider.CreateFixForSelectedOptions(node, codeFixProvider.GetOptionsForIndividualFix(options, diagnostic));
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.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.LanguageServices (10)
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
170Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> applyFixAsync,
LanguageService\PackageLoadTasks.cs (6)
14using WorkTask = Func<PackageLoadTasks, CancellationToken, Task>; 27private readonly ConcurrentQueue<WorkTask> _backgroundThreadWorkTasks = []; 28private readonly ConcurrentQueue<WorkTask> _mainThreadWorkTasks = []; 31public void AddTask(bool isMainThreadTask, WorkTask task) 51private ConcurrentQueue<WorkTask> GetWorkTasks(bool isMainThreadTask) 66while (workTasks.TryDequeue(out var work))
Packaging\PackageInstallerServiceFactory.cs (1)
496Func<INuGetProjectService, CancellationToken, ValueTask<T?>> doWorkAsync, CancellationToken cancellationToken)
Workspace\VisualStudioDocumentNavigationService.cs (2)
160Func<SourceText, TextSpan, VsTextSpan> getVsTextSpanForMapping, 184Func<SourceText, TextSpan, VsTextSpan> getVsTextSpanForMapping,
Microsoft.VisualStudio.LanguageServices.Implementation (5)
CodeModel\AbstractCodeModelService.cs (1)
939Func<SyntaxNode, Func<SyntaxNode, bool>, int> getIndexInContainer,
Options\GridOptionPreviewControl.xaml.cs (2)
28private readonly Func<OptionStore, IServiceProvider, AbstractOptionPreviewViewModel> _createViewModel; 43Func<OptionStore, IServiceProvider,
Options\OptionPreviewControl.xaml.cs (2)
22private readonly Func<OptionStore, IServiceProvider, AbstractOptionPreviewViewModel> _createViewModel; 24internal OptionPreviewControl(IServiceProvider serviceProvider, OptionStore optionStore, Func<OptionStore, IServiceProvider, AbstractOptionPreviewViewModel> createViewModel) : base(optionStore)
mscorlib (1)
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<,,>))]
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;
RateLimitingSample (2)
SampleRateLimiterPolicy.cs (2)
11private Func<OnRejectedContext, CancellationToken, ValueTask>? _onRejected; 23public Func<OnRejectedContext, CancellationToken, ValueTask>? OnRejected { get => _onRejected; }
Replay (3)
src\Compilers\Shared\BuildServerConnection.cs (2)
178Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 201Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Roslyn.Diagnostics.Analyzers (193)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
896Func<TConditionalOrSwitchExpression, ExpressionSyntax, ExpressionSyntax?> getAlternativeArm,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
176Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
233Func<string, T, SyntaxToken> tokenFactory) 244Func<string, T, SyntaxToken> tokenFactory,
Roslyn.Test.PdbUtilities (1)
EditAndContinue\EditAndContinueTestUtilities.cs (1)
104Func<MetadataReader, Handle, StringHandle> getName,
Roslyn.VisualStudio.Next.UnitTests (2)
Options\VisualStudioSettingsOptionPersisterTests.cs (1)
37public Func<string, Type, (GetValueResult, object?)>? GetValueImpl;
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (1)
764public Func<string, CancellationToken, (IExtensionAssemblyLoader? assemblyLoader, Exception? extensionException)>? CreateNewShadowCopyLoaderCallback { get; set; }
SemanticSearch.BuildTask (1)
src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
ServerComparison.FunctionalTests (2)
ResponseCompressionTests.cs (1)
84Func<HttpClient, ILogger, Task> scenario,
ResponseTests.cs (1)
79private async Task ResponseFormats(TestVariant variant, Func<HttpClient, ILogger, Task> scenario, [CallerMemberName] string testName = null)
Shared (5)
JsonSchemaExporter\JsonSchemaExporterOptions.cs (1)
36public Func<JsonSchemaExporterContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
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 = (_, _) =>
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
64public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
64public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Stress.AppHost (1)
InteractionCommands.cs (1)
253private static void RunInteractionWithDismissValues(string title, Func<bool?, string, Task> action)
System.Collections.Immutable (13)
System\Collections\Immutable\ImmutableArray.cs (2)
342public static ImmutableArray<TResult> CreateRange<TSource, TArg, TResult>(ImmutableArray<TSource> items, Func<TSource, TArg, TResult> selector, TArg arg) 378public 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)
54Func<TSource, TCollection, TResult> resultSelector) 219public static bool SequenceEqual<TDerived, TBase>(this ImmutableArray<TBase> immutableArray, ImmutableArray<TDerived> items, Func<TBase, TBase, bool> predicate) where TDerived : TBase 250public static T? Aggregate<T>(this ImmutableArray<T> immutableArray, Func<T, T, T> func) 273public static TAccumulate Aggregate<TAccumulate, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func) 296public static TResult Aggregate<TAccumulate, TResult, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func, Func<TAccumulate, TResult> resultSelector) 701Func<TSource, TCollection, TResult> resultSelector)
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 (76)
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\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)
10public 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) => 13public 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) 48private 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)
154internal List<TResult> ToList<TResult>(Func<TKey, IEnumerable<TElement>, TResult> resultSelector) 179public 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 (156)
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\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 (6)
41Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, 59Func<TOuter, IEnumerable<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,
System\Linq\IntersectBy.cs (2)
99Func<TSource, CancellationToken, ValueTask<TKey>> keySelector, 113Func<TSource, CancellationToken, ValueTask<TKey>> keySelector,
System\Linq\Join.cs (6)
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,
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 (6)
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,
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 (6)
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,
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, 304Func<TElement, CancellationToken, ValueTask<TKey>> keySelector, 408Func<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 (76)
System\Linq\Queryable.cs (76)
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, 412public 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) 423new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IQueryable<TResult>>(GroupJoin).Method, 428public 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) 439new 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, 459/// 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. 524/// 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 526/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 532/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 542public 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) 553new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner?, TResult>>, IQueryable<TResult>>(LeftJoin).Method, 574/// 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. 639/// 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 641/// <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})" /> 647/// <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})" /> 657public 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) 668new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner?, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(LeftJoin).Method, 886/// 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. 950/// 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 952/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 958/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 968public 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) 979new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner, TResult>>, IQueryable<TResult>>(RightJoin).Method, 1000/// 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. 1064/// 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 1066/// <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})" /> 1072/// <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})" /> 1082public 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) 1093new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(RightJoin).Method, 1193public static IQueryable<TSource> TakeWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate) 1201new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(TakeWhile).Method, 1231public static IQueryable<TSource> SkipWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int, bool>> predicate) 1239new Func<IQueryable<TSource>, Expression<Func<TSource, int, bool>>, IQueryable<TSource>>(SkipWhile).Method, 1298public 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) 1308new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IQueryable<TResult>>(GroupBy).Method, 1313public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector) 1322new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IQueryable<TResult>>(GroupBy).Method, 1327public 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) 1336new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method, 1341public 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) 1351new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method, 1470public static IQueryable<TResult> Zip<TFirst, TSecond, TResult>(this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, TSecond, TResult>> resultSelector) 1479new Func<IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst, TSecond, TResult>>, IQueryable<TResult>>(Zip).Method, 3037public static TSource Aggregate<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, TSource, TSource>> func) 3045new Func<IQueryable<TSource>, Expression<Func<TSource, TSource, TSource>>, TSource>(Aggregate).Method, 3050public static TAccumulate Aggregate<TSource, TAccumulate>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func) 3058new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, TAccumulate>(Aggregate).Method, 3063public static TResult Aggregate<TSource, TAccumulate, TResult>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, Expression<Func<TAccumulate, TResult>> selector) 3072new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, Expression<Func<TAccumulate, TResult>>, TResult>(Aggregate).Method, 3093public 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 3102new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method, 3123public 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 3133new 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 (8)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (3)
1171private readonly Func<T, Memory<byte>, bool> _writeAction; 1173public WriteQueueEntry(int writeBytes, T state, Func<T, Memory<byte>, bool> writeAction, CancellationToken cancellationToken) 1186private Task PerformWriteAsync<T>(int writeBytes, T state, Func<T, Memory<byte>, bool> writeAction, CancellationToken cancellationToken = default)
System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs (2)
66internal Func<SocketsHttpConnectionContext, CancellationToken, ValueTask<Stream>>? _connectCallback; 67internal Func<SocketsHttpPlaintextStreamFilterContext, CancellationToken, ValueTask<Stream>>? _plaintextStreamFilter;
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (3)
25private Func<HttpConnectionSettings, HttpMessageHandlerStage, HttpMessageHandlerStage>? _decompressionHandlerFactory; 406public Func<SocketsHttpConnectionContext, CancellationToken, ValueTask<Stream>>? ConnectCallback 419public Func<SocketsHttpPlaintextStreamFilterContext, CancellationToken, ValueTask<Stream>>? PlaintextStreamFilter
System.Net.HttpListener (4)
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 (1)
System\Net\Dns.cs (1)
725private static Task<TResult> RunAsync<TResult>(Func<object, NameResolutionActivity, TResult> func, object key, CancellationToken cancellationToken)
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
706Func<TArg, CancellationToken, ValueTask<IPAddress>> getAddress,
System.Net.Quic (1)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
68Func<TExteriorHandle, TArg1, TInteriorHandle> accessor,
System.Net.Security (1)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
68Func<TExteriorHandle, TArg1, TInteriorHandle> accessor,
System.Private.CoreLib (44)
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\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) 88private readonly Func<T?, T?, bool> _equals; 91public DelegateEqualityComparer(Func<T?, T?, bool> equals, Func<T, int> getHashCode)
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\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (6)
54private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll; 56private event Func<AssemblyLoadContext, AssemblyName, Assembly>? _resolving; 189public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll 210public event Func<AssemblyLoadContext, AssemblyName, Assembly?>? Resolving 619foreach (Func<AssemblyLoadContext, AssemblyName, Assembly> handler in Delegate.EnumerateInvocationList(_resolving)) 795foreach (Func<Assembly, string, IntPtr> handler in Delegate.EnumerateInvocationList(_resolvingUnmanagedDll))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.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\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (8)
714Func<AsyncCallback, object?, IAsyncResult> beginMethod, 743Func<AsyncCallback, object?, IAsyncResult> beginMethod, 751internal static Task<TResult> FromAsyncImpl(Func<AsyncCallback, object?, IAsyncResult> beginMethod, 1193Func<TInstance, IAsyncResult, TResult> endMethod) 1233private Func<TInstance, IAsyncResult, TResult>? m_endMethod; 1238internal FromAsyncTrimPromise(TInstance thisRef, Func<TInstance, IAsyncResult, TResult> endMethod) 1261Func<TInstance, IAsyncResult, TResult>? endMethod = promise.m_endMethod; 1284TInstance thisRef, Func<TInstance, IAsyncResult, TResult> endMethod, IAsyncResult asyncResult,
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (6)
4204public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state) 4234public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken) 4265public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler) 4302public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskContinuationOptions continuationOptions) 4349public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken, 4356private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler,
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\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,
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (1)
100private static unsafe T ReadValueSlow<T>(object ptr, int ofs, Func<IntPtr, int, T> readValueHelper)
System.Private.Windows.Core (1)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
791public static bool TryWrite<T>(Func<Stream, T, bool> func, Stream stream, T value)
System.Private.Windows.Core.Tests (2)
System\TypeExtensionsTests.cs (2)
133private readonly Func<string, string, Type?> _bindToType; 134public BindToTypeBinder(Func<string, string, Type?> bindToType) => _bindToType = bindToType;
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)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
203[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,,>))]
System.Runtime.InteropServices.JavaScript (2)
artifacts\obj\System.Runtime.InteropServices.JavaScript\Debug\net10.0\System.Runtime.InteropServices.JavaScript.notsupported.cs (2)
294public void ToManaged<T1, T2, TResult>(out Func<T1, T2, TResult>? value, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler, ArgumentToManagedCallback<TResult> resMarshaler) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 295public void ToJS<T1, T2, TResult>(Func<T1, T2, TResult>? value, ArgumentToManagedCallback<T1> arg1Marshaler, ArgumentToManagedCallback<T2> arg2Marshaler, ArgumentToJSCallback<TResult> resMarshaler) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); }
System.Security.Cryptography (5)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
68Func<TExteriorHandle, TArg1, TInteriorHandle> accessor,
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\X509Certificates\ManagedCertificateFinder.cs (1)
336private void FindCore<TState>(TState state, Func<TState, X509Certificate2, bool> predicate)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1953Func<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)
114internal void WriteTo(XmlWriter writer, Func<string, string, bool> shouldSkipElement)
System.Text.Json (11)
System\Text\Json\Schema\JsonSchemaExporterOptions.cs (1)
31public Func<JsonSchemaExporterContext, JsonNode, JsonNode>? TransformSchemaNode { get; init; }
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
120public Func<object, object?, bool>? ShouldSerialize 133private 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.RegularExpressions (2)
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (1)
266internal 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\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)
2060Func<T, int, bool> trySetFocusAtItemIndex) where T : Control
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\ImageListImageEditorTests.cs (2)
17var editor_LoadImageFromStream = editor.TestAccessor().CreateDelegate<Func<Stream, bool, ImageListImage>>("LoadImageFromStream");
System.Windows.Forms.Tests (17)
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (4)
282private readonly Func<UIA_PROPERTY_ID, VARIANT, bool> _checkRaisedEvent; 284public ButtonWithCustomAccessibleObject(Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) 294private readonly Func<UIA_PROPERTY_ID, VARIANT, bool> _checkRaisedEvent; 296public ControlAccessibleObjectWithNotificationCounter(Control ownerControl, Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) : base(ownerControl)
System\Windows\Forms\AccessibleObjects\LabelAccessibleObjectTests.cs (4)
187private readonly Func<UIA_PROPERTY_ID, VARIANT, bool> _checkRaisedEvent; 189public LabelWithCustomAccessibleObject(Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) 199private readonly Func<UIA_PROPERTY_ID, VARIANT, bool> _checkRaisedEvent; 201public ControlAccessibleObjectWithNotificationCounter(Control ownerControl, Func<UIA_PROPERTY_ID, VARIANT, bool> checkRaisedEvent) : base(ownerControl)
System\Windows\Forms\ControlTests.Methods.cs (1)
5478public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
2079public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
System\Windows\Forms\Design\PropertyTabTests.cs (1)
192public Func<object, Attribute[], PropertyDescriptorCollection> GetPropertiesAction { get; set; }
System\Windows\Forms\MenuStripTests.cs (1)
827public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
System\Windows\Forms\ToolStripControlHostTests.cs (1)
4374public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
System\Windows\Forms\ToolStripTests.cs (1)
7448public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
System\Windows\Forms\TrackBarRendererTests.cs (1)
89void TestGetThumbSize(Func<Graphics, TrackBarThumbState, Size> getThumbSize)
TextBoxBaseTests.cs (1)
5929public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
WebBrowserBaseTests.cs (1)
863public Func<Message, Keys, bool> ProcessCmdKeyAction { get; set; }
System.Windows.Forms.UI.IntegrationTests (12)
ButtonTests.cs (1)
394private async Task RunTestAsync(Func<Form, Button, Task> runTest)
DataGridViewTests.cs (1)
125private async Task RunTestAsync(Func<Form, DataGridView, Task> runTest)
Infra\ControlTestBase.cs (4)
215protected async Task RunSingleControlTestAsync<T>(Func<Form, T, Task> testDriverAsync) 234protected async Task RunSingleControlTestAsync<T>(Func<Form, T, Task> testDriverAsync, Func<T> createControl, Func<Form>? createForm = null) 262protected async Task RunControlPairTestAsync<T1, T2>(Func<Form, (T1 control1, T2 control2), Task> testDriverAsync) 291protected async Task RunFormAsync<T>(Func<(Form dialog, T control)> createDialog, Func<Form, T, Task> testDriverAsync)
ListViewTests.cs (1)
642private async Task RunTestAsync(Func<Form, ListView, Task> runTest)
MonthCalendarAccessibleObjectTests.cs (1)
37private async Task RunTestAsync(Func<Form, MonthCalendar, Task> runTest)
MonthCalendarTests.cs (2)
199private async Task RunClickTestAsync(Func<Form, MonthCalendar, Task> runTest) 223private async Task RunTestAsync(Func<Form, MonthCalendar, Task> runTest)
RichTextBoxTests.cs (1)
233private async Task RunTestAsync(Func<Form, RichTextBox, Task> runTest)
TabControlTests.cs (1)
76private async Task RunTestAsync(Func<Form, TabControl, Task> runTest)
System.Xaml.Tests (7)
Common\Optional.cs (1)
18public readonly T Or<TArg1, TArg2>(Func<TArg1, TArg2, T> valueFactory, TArg1 arg1, TArg2 arg2) => HasValue ? Value : valueFactory(arg1, arg2);
System\Windows\Markup\NameReferenceConverterTests.cs (1)
230public Func<IEnumerable<string>, bool, object>? GetFixupTokenAction { get; set; }
System\Windows\Markup\ReferenceTests.cs (1)
117public Func<IEnumerable<string>, bool, object>? GetFixupTokenAction { get; set; }
System\Xaml\XamlMemberTests.cs (2)
2337public Func<Type, bool, object[]>? GetCustomAttributesAction { get; set; } 2351public Func<Type, bool, bool>? IsDefinedAction { get; set; }
System\Xaml\XamlTypeTests.cs (2)
5261public Func<Type, bool, object[]>? GetCustomAttributesAction { get; set; } 5275public Func<Type, bool, bool>? IsDefinedAction { get; set; }
Test.Utilities (171)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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)
Text.Analyzers (193)
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\Compilers\Core\Portable\InternalUtilities\ArrayExtensions.cs (1)
156public static bool SequenceEqual<T>(this T[]? first, T[]? second, Func<T, T, bool> comparer)
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\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\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\Dependencies\Collections\Extensions\MemoryExtensions.cs (1)
17public static int BinarySearch<TElement, TValue>(this ReadOnlySpan<TElement> span, TValue value, Func<TElement, TValue, int> comparer)
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\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\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+KeyCollection.cs (1)
59public bool All<TArg>(Func<TKey, TArg, bool> predicate, TArg arg)
src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueCollection.cs (1)
59public bool All<TArg>(Func<TValue, TArg, bool> predicate, TArg arg)
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\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\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\Dependencies\PooledObjects\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) 293public void RemoveAll<TArg>(Func<T, TArg, bool> match, TArg arg) 775public bool Any<A>(Func<T, A, bool> predicate, A arg) 799public bool All<A>(Func<T, A, bool> predicate, A arg) 855public ImmutableArray<TResult> SelectAsArray<TArg, TResult>(Func<T, TArg, TResult> map, TArg arg)
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\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (1)
23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
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\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (2)
44private readonly Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> _processBatchAsync; 107Func<ImmutableSegmentedList<TItem>, CancellationToken, ValueTask<TResult>> processBatchAsync,
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\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\Dependencies\Threading\ProducerConsumer.cs (1)
376Func<TArgs, CancellationToken, Task> action,
src\RoslynAnalyzers\Utilities\Compiler\Lightup\LightupHelpers.cs (8)
67internal static Func<TSyntax, TProperty, TSyntax> CreateSyntaxWithPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 71internal static Func<TSymbol, TProperty, TSymbol> CreateSymbolWithPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 75private static Func<T, TProperty, T> CreateWithPropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 100Expression<Func<T, TProperty, T>> expression = 101Expression.Lambda<Func<T, TProperty, T>>( 126internal static Func<T, TArg, TValue> CreateAccessorWithArgument<T, TArg, TValue>(Type? type, string parameterName, Type argumentType, string argumentName, string methodName, TValue fallbackResult) 150Expression<Func<T, TArg, TValue>> expression = Expression.Lambda<Func<T, TArg, TValue>>(result, parameter, argument);
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\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\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\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; 620var findSkippedToken = includeSkipped ? s_findSkippedTokenForward : ((l, p) => default); 659var findSkippedToken = includeSkipped ? s_findSkippedTokenBackward : ((l, p) => default);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
68Func<SemanticModel?, SyntaxToken, bool> predicate,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
86public bool ForEachCurrentWrite<TArg>(ISymbol symbol, Func<IOperation, TArg, bool> action, TArg arg)
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\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\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\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\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\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\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\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\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\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\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\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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ReferenceCountedDisposableCache.cs (1)
21public IReferenceCountedDisposable<ICacheEntry<TKey, TValue>> GetOrCreate<TArg>(TKey key, Func<TKey, TArg, TValue> valueCreator, TArg arg)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (3)
122Func<TArg, CancellationToken, ValueTask<TIntermediate>> func, 123Func<TIntermediate, TArg, TResult> transform, 153static ValueTask<TResult> UnwrapAndTransformAsync(ValueTask<TIntermediate> intermediateResult, Func<TIntermediate, TArg, TResult> transform, TArg arg, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\INamedTypeSymbolExtensions.cs (9)
87Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 156Func<INamedTypeSymbol, ISymbol, bool> isValid, 270Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 330Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 331Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 332Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter, 405Func<INamedTypeSymbol, ISymbol, Func<INamedTypeSymbol, ISymbol, bool>, CancellationToken, bool> isImplemented, 406Func<INamedTypeSymbol, ISymbol, bool> isValidImplementation, 407Func<INamedTypeSymbol, ISymbol, ImmutableArray<ISymbol>> interfaceMemberGetter,
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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
197Func<SyntaxList<TDeclaration>, int, bool>? canPlaceAtIndex = null)
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\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)
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\Compilers\Shared\BuildServerConnection.cs (2)
178Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 201Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
VBCSCompiler (12)
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\Compilers\Server\VBCSCompiler\CSharpCompilerServer.cs (4)
17private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _metadataProvider; 19internal CSharpCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache) 24internal CSharpCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string? responseFile, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache) 30internal override Func<string, MetadataReferenceProperties, PortableExecutableReference> GetMetadataProvider()
src\Compilers\Server\VBCSCompiler\VisualBasicCompilerServer.cs (4)
19private readonly Func<string, MetadataReferenceProperties, PortableExecutableReference> _metadataProvider; 21internal VisualBasicCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache) 26internal VisualBasicCompilerServer(Func<string, MetadataReferenceProperties, PortableExecutableReference> metadataProvider, string? responseFile, string[] args, BuildPaths buildPaths, string? libDirectory, IAnalyzerAssemblyLoader analyzerLoader, GeneratorDriverCache driverCache) 32internal override Func<string, MetadataReferenceProperties, PortableExecutableReference> GetMetadataProvider()
src\Compilers\Shared\BuildServerConnection.cs (2)
178Func<string, ICompilerServerLogger, bool> tryCreateServerFunc, 201Func<string, ICompilerServerLogger, bool> tryCreateServerFunc,
VBCSCompiler.UnitTests (3)
TestableClientConnection.cs (1)
23public Func<BuildResponse, CancellationToken, Task> WriteBuildResponseFunc = delegate { throw new Exception(); };
TestableCompilerServerHost.cs (2)
15internal Func<RunRequest, CancellationToken, BuildResponse> RunCompilation { get; } 18internal TestableCompilerServerHost(Func<RunRequest, CancellationToken, BuildResponse> runCompilation = null, ICompilerServerLogger logger = null)