1022 references to Func
Aspire.Cli.Tests (24)
TestServices\TestDotNetCliRunner.cs (4)
17public Func<FileInfo, ProcessInvocationOptions, CancellationToken, int>? RestoreAsyncCallback { get; set; }
18public Func<FileInfo, ProcessInvocationOptions, CancellationToken, (int ExitCode, bool IsAspireHost, string? AspireHostingVersion)>? GetAppHostInformationAsyncCallback { get; set; }
19public Func<DirectoryInfo, ProcessInvocationOptions, CancellationToken, (int ExitCode, string[] ConfigPaths)>? GetNuGetConfigPathsAsyncCallback { get; set; }
30public Func<FileInfo, ProcessInvocationOptions, CancellationToken, (int ExitCode, IReadOnlyList<FileInfo> Projects)>? GetSolutionProjectsAsyncCallback { get; set; }
TestServices\TestExtensionBackchannel.cs (3)
57public Func<string, Func<string, ValidationResult>?, bool, Task<string>>? PromptForSecretStringAsyncCallback { get; set; }
60public Func<string, string?, bool, Task<string?>>? PromptForFilePathAsyncCallback { get; set; }
86public Func<string, bool, string?, Task>? WriteDebugSessionMessageAsyncCallback { get; set; }
TestServices\TestProcessExecutionFactory.cs (5)
47public Func<int, ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, string? Stdout)>>? AsyncAttemptCallback { get; set; }
104var asyncAttemptCallback = AsyncAttemptCallback;
106var callback = asyncAttemptCallback ??
142private readonly Func<int, ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, string? Stdout)>> _attemptCallback;
153Func<int, ProcessInvocationOptions, CancellationToken, Task<(int ExitCode, string? Stdout)>> attemptCallback,
Aspire.Hosting (8)
DistributedApplicationEventingExtensions.cs (7)
60public static IResourceBuilder<T> OnBeforeResourceStarted<T>(this IResourceBuilder<T> builder, Func<T, BeforeResourceStartedEvent, CancellationToken, Task> callback)
73public static IResourceBuilder<T> OnResourceStopped<T>(this IResourceBuilder<T> builder, Func<T, ResourceStoppedEvent, CancellationToken, Task> callback)
86public static IResourceBuilder<T> OnConnectionStringAvailable<T>(this IResourceBuilder<T> builder, Func<T, ConnectionStringAvailableEvent, CancellationToken, Task> callback)
99public static IResourceBuilder<T> OnInitializeResource<T>(this IResourceBuilder<T> builder, Func<T, InitializeResourceEvent, CancellationToken, Task> callback)
112public static IResourceBuilder<T> OnResourceEndpointsAllocated<T>(this IResourceBuilder<T> builder, Func<T, ResourceEndpointsAllocatedEvent, CancellationToken, Task> callback)
125public static IResourceBuilder<T> OnResourceReady<T>(this IResourceBuilder<T> builder, Func<T, ResourceReadyEvent, CancellationToken, Task> callback)
137private static IResourceBuilder<TResource> OnResourceEvent<TResource, TEvent>(this IResourceBuilder<TResource> builder, Func<TResource, TEvent, CancellationToken, Task> callback)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.Kubernetes (1)
Aspire.Hosting.Azure.Tests (4)
Aspire.Hosting.EntityFrameworkCore (1)
Aspire.Hosting.Python (1)
Aspire.Hosting.Tests (2)
dotnet (2)
GenerateDocumentationAndConfigFiles (55)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (6)
30Func<SemanticModel, TType, TNode, bool> canReplace,
53Func<SemanticModel, TType, TNode, bool> canReplace,
76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
97Func<SemanticModel, TType, TNode, bool> canReplace,
120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
155Func<SemanticModel, TType, TNode, bool> canReplace,
ILCompiler.Compiler (5)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (3)
73/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?)"/></item>
74/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool)"/></item>
75/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool, bool)"/></item>
ILCompiler.ReadyToRun (2)
illink (3)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (3)
73/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?)"/></item>
74/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool)"/></item>
75/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool, bool)"/></item>
ILLink.RoslynAnalyzer (3)
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (3)
73/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?)"/></item>
74/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool)"/></item>
75/// <item><see cref="System.Type.GetType(string, System.Func{System.Reflection.AssemblyName, System.Reflection.Assembly?}?, System.Func{System.Reflection.Assembly?, string, bool, System.Type?}?, bool, bool)"/></item>
Microsoft.Analyzers.Extra (2)
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (4)
Extensions\UseMiddlewareExtensions.cs (4)
139var factory = RuntimeFeature.IsDynamicCodeCompiled
200private static Func<T, HttpContext, IServiceProvider, Task> ReflectionFallback<T>(MethodInfo methodInfo, ParameterInfo[] parameters)
265private static Func<T, HttpContext, IServiceProvider, Task> CompileExpression<T>(MethodInfo methodInfo, ParameterInfo[] parameters)
323var lambda = Expression.Lambda<Func<T, HttpContext, IServiceProvider, Task>>(body, instanceArg, httpContextArg, providerArg);
Microsoft.AspNetCore.Http.Extensions (6)
Microsoft.AspNetCore.Identity (18)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (18)
53using RequestDelegateFactoryFunc = System.Func<System.Delegate, Microsoft.AspNetCore.Http.RequestDelegateFactoryOptions, Microsoft.AspNetCore.Http.RequestDelegateMetadataResult?, Microsoft.AspNetCore.Http.RequestDelegateResult>;
81RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
87var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.RegisterRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!);
170var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.RegisterRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!);
201RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
385RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
502RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
648RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
654var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Ok> (global::Microsoft.AspNetCore.Identity.Data.ResendConfirmationEmailRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!);
737var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Ok> (global::Microsoft.AspNetCore.Identity.Data.ResendConfirmationEmailRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!);
766RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
882RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
999RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
1005var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!);
1088var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!);
1116RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
1221RequestDelegateFactoryFunc createRequestDelegate = (del, options, inferredMetadataResult) =>
1331RequestDelegateFactoryFunc createRequestDelegate,
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.Mvc.RazorPages (9)
Microsoft.AspNetCore.OpenApi (14)
Microsoft.AspNetCore.OutputCaching (3)
Microsoft.AspNetCore.Owin (4)
Microsoft.AspNetCore.Razor.Utilities.Shared (13)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ImmutableArrayExtensions.cs (3)
123public static ImmutableArray<TResult> SelectAsArray<T, TArg, TResult>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, int, TResult> selector)
235public static TResult[] SelectAsPlainArray<T, TArg, TResult>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, int, TResult> selector)
536public static ImmutableArray<T> WhereAsArray<T, TArg>(this ImmutableArray<T> array, TArg arg, Func<T, TArg, int, bool> predicate)
Microsoft.AspNetCore.Routing (14)
RequestDelegateRouteBuilderExtensions.cs (5)
91Func<HttpRequest, HttpResponse, RouteData, Task> handler)
133Func<HttpRequest, HttpResponse, RouteData, Task> handler)
175Func<HttpRequest, HttpResponse, RouteData, Task> handler)
217Func<HttpRequest, HttpResponse, RouteData, Task> handler)
235Func<HttpRequest, HttpResponse, RouteData, Task> handler)
RouteEndpointDataSource.cs (3)
37Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createHandlerRequestDelegateFunc,
65Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> createHandlerRequestDelegateFunc,
348public required Func<Delegate, RequestDelegateFactoryOptions, RequestDelegateMetadataResult?, RequestDelegateResult> CreateHandlerRequestDelegateFunc { get; init; }
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
Microsoft.AspNetCore.SignalR.Client.Core (3)
HubConnectionExtensions.OnResult.cs (2)
129public static IDisposable On<T1, T2, T3, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, TResult> handler)
309public static IDisposable On<T1, T2, T3, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, Task<TResult>> handler)
Microsoft.Build (17)
src\9f0d3f3da306d8cf\IEnumerableExtensions.cs (2)
526public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
538public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\9f0d3f3da306d8cf\ImmutableArrayExtensions.cs (4)
172public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
440public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
455public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1267internal static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
Microsoft.Build.Tasks.Core (1)
Microsoft.CodeAnalysis (25)
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
45private readonly Func<SyntaxTree, TextSpan, CancellationToken, bool> _isGeneratedCodeLocation;
125Func<SyntaxTree, TextSpan, CancellationToken, bool> isGeneratedCodeLocation,
159Func<SyntaxTree, TextSpan, CancellationToken, bool> isGeneratedCodeLocation,
Operations\ControlFlowGraphBuilder.cs (2)
2007private ImmutableArray<T> PopArray<T>(ImmutableArray<T> originalArray, Func<IOperation, int, ImmutableArray<T>, T>? wrapper = null) where T : IOperation
2029private ImmutableArray<T> VisitArray<T>(ImmutableArray<T> originalArray, Func<T, IOperation>? unwrapper = null, Func<IOperation, int, ImmutableArray<T>, T>? wrapper = null) where T : IOperation
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
Microsoft.CodeAnalysis.Analyzers (55)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (6)
30Func<SemanticModel, TType, TNode, bool> canReplace,
53Func<SemanticModel, TType, TNode, bool> canReplace,
76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
97Func<SemanticModel, TType, TNode, bool> canReplace,
120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
155Func<SemanticModel, TType, TNode, bool> canReplace,
Microsoft.CodeAnalysis.AnalyzerUtilities (49)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
Microsoft.CodeAnalysis.CodeStyle (49)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (6)
30Func<SemanticModel, TType, TNode, bool> canReplace,
53Func<SemanticModel, TType, TNode, bool> canReplace,
76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
97Func<SemanticModel, TType, TNode, bool> canReplace,
120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
155Func<SemanticModel, TType, TNode, bool> canReplace,
Microsoft.CodeAnalysis.CSharp (24)
Symbols\TypeSymbolExtensions.cs (11)
769Func<TypeSymbol, T, bool, bool> predicate,
798Func<TypeWithAnnotations, T, bool, bool>? typeWithAnnotationsPredicate,
799Func<TypeSymbol, T, bool, bool>? typePredicate,
999static TypeSymbol? visitFunctionPointerType(FunctionPointerTypeSymbol type, Func<TypeWithAnnotations, T, bool, bool>? typeWithAnnotationsPredicate, Func<TypeSymbol, T, bool, bool>? typePredicate, T arg, bool useDefaultType, bool canDigThroughNullable, bool visitCustomModifiers, out TypeWithAnnotations next)
1250private static readonly Func<TypeSymbol, TypeParameterSymbol?, bool, bool> s_containsTypeParameterPredicate =
1261private static readonly Func<TypeSymbol, Symbol, bool, bool> s_isTypeParameterWithSpecificContainerPredicate =
1270private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_containsTypeParametersPredicate =
1301private static readonly Func<TypeSymbol, HashSet<TypeParameterSymbol>, bool, bool> s_typeParameterSymbolCollector = (typeSymbol, result, _) =>
1317private static readonly Func<TypeSymbol, object?, bool, bool> s_containsMethodTypeParameterPredicate =
1329private static readonly Func<TypeSymbol, object?, bool, bool> s_containsDynamicPredicate = (type, unused1, unused2) => type.TypeKind == TypeKind.Dynamic;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.Features (6)
Microsoft.CodeAnalysis.CSharp.Scripting (2)
Microsoft.CodeAnalysis.Extensions.Package (16)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
Microsoft.CodeAnalysis.Features (16)
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (4)
34var onItemsFound = GetOnItemsFoundCallback(solution, activeDocument: document, onResultsFound);
57Func<ImmutableArray<RoslynNavigateToItem>, VoidResult, CancellationToken, Task> onItemsFound,
164var onItemsFound = GetOnItemsFoundCallback(solution, activeDocument, onResultsFound);
193Func<ImmutableArray<RoslynNavigateToItem>, VoidResult, CancellationToken, Task> onItemsFound,
Microsoft.CodeAnalysis.NetAnalyzers (4)
SyntaxEditorFixAllProvider.cs (4)
134Func<Document, SyntaxEditor, TState, Document>? getFixedDocument = null)
168Func<Document, SyntaxEditor, TState, Document>? getFixedDocument,
193private readonly Func<Document, SyntaxEditor, TState, Document>? _getFixedDocument;
199Func<Document, SyntaxEditor, TState, Document>? getFixedDocument = null)
Microsoft.CodeAnalysis.Razor.Compiler (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (49)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
Microsoft.CodeAnalysis.Scripting (7)
Microsoft.CodeAnalysis.Workspaces (100)
CodeActions\CodeAction_Cleanup.cs (7)
44private static readonly Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> s_cleanupSyntaxPass =
47private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_cleanupSyntaxPasses = [s_cleanupSyntaxPass];
53private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_allCleanupPasses =
114ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes,
167ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes,
174foreach (var cleanupPass in passes)
180Solution solution, Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> cleanupDocumentAsync)
CodeFixes\FixAllOccurrences\FixAllProvider.cs (4)
55public static FixAllProvider Create(Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync)
75Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync,
82Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync,
104Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync,
CodeRefactorings\FixAllOccurences\RefactorAllProvider.cs (4)
55public static RefactorAllProvider Create(Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync)
74Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync,
81Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync,
98Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync,
Remote\RemoteHostClient.cs (10)
81Func<TService, RemoteServiceCallbackId, CancellationToken, ValueTask> invocation,
91Func<TService, RemoteServiceCallbackId, CancellationToken, ValueTask<TResult>> invocation,
104Func<TService, Checksum, CancellationToken, ValueTask> invocation,
118Func<TService, Checksum, CancellationToken, ValueTask> invocation,
130Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
141/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, CancellationToken, ValueTask}, CancellationToken)"/>
148Func<TService, Checksum, CancellationToken, ValueTask> invocation,
159Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
168/// Equivalent to <see cref="TryInvokeAsync{TService}(Solution, Func{TService, Checksum, CancellationToken, ValueTask}, CancellationToken)"/>
175Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
Remote\RemoteServiceConnection.cs (10)
33Func<TService, RemoteServiceCallbackId, CancellationToken, ValueTask> invocation,
37Func<TService, RemoteServiceCallbackId, CancellationToken, ValueTask<TResult>> invocation,
44Func<TService, Checksum, CancellationToken, ValueTask> invocation,
49Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
54Func<TService, Checksum, CancellationToken, ValueTask> invocation,
60Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
69Func<TService, Checksum, CancellationToken, ValueTask> invocation,
75Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
80Func<TService, Checksum, CancellationToken, ValueTask> invocation,
86Func<TService, Checksum, CancellationToken, ValueTask<TResult>> invocation,
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (6)
30Func<SemanticModel, TType, TNode, bool> canReplace,
53Func<SemanticModel, TType, TNode, bool> canReplace,
76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
97Func<SemanticModel, TType, TNode, bool> canReplace,
120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
155Func<SemanticModel, TType, TNode, bool> canReplace,
Microsoft.CSharp (4)
Microsoft.DotNet.NuGetRepack.Tasks (2)
src\NuGetVersionUpdater.cs (2)
61Func<string, string, string, bool> allowPreReleaseDependency = null)
283private static void UpdateDependencies(Dictionary<string, PackageInfo> packages, VersionTranslation translation, bool exactVersions, Func<string, string, string, bool> allowPreReleaseDependencyOpt)
Microsoft.Extensions.AI (5)
ChatCompletion\AnonymousDelegatingChatClient.cs (2)
32private readonly Func<IEnumerable<ChatMessage>, ChatOptions?, Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, Task>, CancellationToken, Task>? _sharedFunc;
51Func<IEnumerable<ChatMessage>, ChatOptions?, Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, Task>, CancellationToken, Task> sharedFunc)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (11)
Microsoft.Extensions.AI.Integration.Tests (5)
Microsoft.Extensions.AI.OpenAI (6)
OpenAIResponsesChatClient.cs (6)
44private static readonly Func<ResponsesClient, CreateResponseOptions, RequestOptions, AsyncCollectionResult<StreamingResponseUpdate>>?
46(Func<ResponsesClient, CreateResponseOptions, RequestOptions, AsyncCollectionResult<StreamingResponseUpdate>>?)
50?.CreateDelegate(typeof(Func<ResponsesClient, CreateResponseOptions, RequestOptions, AsyncCollectionResult<StreamingResponseUpdate>>));
52private static readonly Func<ResponsesClient, GetResponseOptions, RequestOptions, AsyncCollectionResult<StreamingResponseUpdate>>?
54(Func<ResponsesClient, GetResponseOptions, RequestOptions, AsyncCollectionResult<StreamingResponseUpdate>>?)
58?.CreateDelegate(typeof(Func<ResponsesClient, GetResponseOptions, RequestOptions, AsyncCollectionResult<StreamingResponseUpdate>>));
Microsoft.Extensions.AI.Tests (12)
Microsoft.Extensions.Caching.Abstractions (7)
Hybrid\HybridCache.cs (6)
145Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory,
266Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory,
306Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory,
325public static readonly Func<Func<HybridCacheEntryContext, CancellationToken, ValueTask<T>>, HybridCacheEntryContext, CancellationToken, ValueTask<T>> Instance =
332public readonly Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> Factory;
338public DefaultImplState(TState state, Func<TState, HybridCacheEntryContext, CancellationToken, ValueTask<T>> factory, HybridCacheEntryOptions? options)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (3)
ConfigurationBindingGenerator.cs (3)
102internal static Func<SemanticModel, InvocationExpressionSyntax, CancellationToken, object>? GetInterceptableLocationFunc { get; private set; }
143GetInterceptableLocationFunc = (Func<SemanticModel, InvocationExpressionSyntax, CancellationToken, object>)
144getInterceptableLocationMethod.CreateDelegate(typeof(Func<SemanticModel, InvocationExpressionSyntax, CancellationToken, object>), target: null);
Microsoft.Extensions.DataIngestion.Tests (3)
Microsoft.Extensions.DependencyModel (1)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Polly (1)
Microsoft.Extensions.Logging (9)
FilterLoggingBuilderExtensions.cs (3)
29public static ILoggingBuilder AddFilter(this ILoggingBuilder builder, Func<string?, string?, LogLevel, bool> filter) =>
171public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, string?, LogLevel, bool> filter) =>
308Func<string?, string?, LogLevel, bool>? filter = null)
LoggerInformation.cs (2)
11public MessageLogger(ILogger logger, string category, string? providerTypeFullName, LogLevel? minLevel, Func<string?, string?, LogLevel, bool>? filter)
28public Func<string?, string?, LogLevel, bool>? Filter { get; }
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Options (8)
OptionsBuilder.cs (4)
425public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, bool> validation)
438public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, bool> validation, string failureMessage)
617public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, CancellationToken, Task<bool>> validation) where TDep : notnull
627public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, CancellationToken, Task<bool>> validation, string failureMessage) where TDep : notnull
ValidateOptions.cs (2)
150public ValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, Func<TOptions, TDep1, TDep2, bool> validation, string failureMessage)
169public Func<TOptions, TDep1, TDep2, bool> Validation { get; }
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (2)
359private async ValueTask<TResult[]> SendQueryWithTelemetry<TResult>(string name, EncodedDomainName dnsSafeName, QueryType queryType, Func<EncodedDomainName, QueryType, DnsResponse, (SendQueryError error, TResult[] result)> processResponseFunc, CancellationToken cancellationToken)
375async ValueTask<(SendQueryError error, TResult[] result)> SendQueryWithRetriesAsync<TResult>(string name, EncodedDomainName dnsSafeName, QueryType queryType, Func<EncodedDomainName, QueryType, DnsResponse, (SendQueryError error, TResult[] result)> processResponseFunc, CancellationToken cancellationToken)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (1)
Microsoft.Extensions.Telemetry (4)
Logging\Import\LoggerInformation.cs (2)
17public MessageLogger(ILogger logger, string category, string? providerTypeFullName, LogLevel? minLevel, Func<string?, string?, LogLevel, bool>? filter)
42public Func<string?, string?, LogLevel, bool>? Filter { get; }
Microsoft.Extensions.VectorData.ConformanceTests (4)
Microsoft.Interop.ComInterfaceGenerator (6)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (4)
33protected abstract Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions);
106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<SolutionEditor, DocumentId, CancellationToken, Task> solutionBasedFix, CancellationToken ct)
161protected record struct ConvertToSourceGeneratedInteropFix(Func<SolutionEditor, DocumentId, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions);
200var solutionBasedFix = codeFixProvider.CreateFixForSelectedOptions(node, codeFixProvider.GetOptionsForIndividualFix(options, diagnostic));
Microsoft.Interop.LibraryImportGenerator (5)
src\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (4)
33protected abstract Func<SolutionEditor, DocumentId, CancellationToken, Task> CreateFixForSelectedOptions(SyntaxNode node, ImmutableDictionary<string, Option> selectedOptions);
106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<SolutionEditor, DocumentId, CancellationToken, Task> solutionBasedFix, CancellationToken ct)
161protected record struct ConvertToSourceGeneratedInteropFix(Func<SolutionEditor, DocumentId, CancellationToken, Task> ApplyFix, ImmutableDictionary<string, Option> SelectedOptions);
200var solutionBasedFix = codeFixProvider.CreateFixForSelectedOptions(node, codeFixProvider.GetOptionsForIndividualFix(options, diagnostic));
Microsoft.ML.Core (6)
ComponentModel\ComponentFactory.cs (3)
76public static IComponentFactory<TArg1, TArg2, TComponent> CreateFromFunction<TArg1, TArg2, TComponent>(Func<IHostEnvironment, TArg1, TArg2, TComponent> factory)
136private readonly Func<IHostEnvironment, TArg1, TArg2, TComponent> _factory;
138public SimpleComponentFactory(Func<IHostEnvironment, TArg1, TArg2, TComponent> factory)
Microsoft.ML.Core.Tests (2)
UnitTests\TestVBuffer.cs (2)
501private static void NaiveApplyInto<T1, T2, TDst>(ref VBuffer<T1> a, ref VBuffer<T2> b, ref VBuffer<TDst> dst, Func<int, T1, T2, TDst> func)
526Func<int, float, float, float> func = (int ind, float av, float bv) => 2 * bv + av - ind;
Microsoft.ML.Data (10)
Data\RowCursorUtils.cs (3)
163Func<VectorDataViewType, PrimitiveDataViewType, GetterFactory, ValueGetter<VBuffer<int>>> del = GetVecGetterAsCore<int, int>;
183Func<VectorDataViewType, PrimitiveDataViewType, GetterFactory, ValueGetter<VBuffer<TDst>>> del = GetVecGetterAsCore<int, TDst>;
200Func<VectorDataViewType, PrimitiveDataViewType, GetterFactory, ValueGetter<VBuffer<TDst>>> del = GetVecGetterAsCore<int, TDst>;
DataLoadSave\LegacyCompositeDataLoader.cs (2)
177KeyValuePair<string, string>[] tagData, Func<IHostEnvironment, int, IDataView, IDataView> createTransform)
191KeyValuePair<string, string>[] tagData, Func<IHostEnvironment, int, IDataView, IDataView> createTransform)
Microsoft.ML.FastTree (1)
Microsoft.ML.TestFramework (1)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Transforms (12)
Microsoft.NET.Build.Containers (3)
Microsoft.NET.HostModel (1)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (2)
Macros\BaseMacroConfig.cs (2)
75protected static TVal? GetOptionalParameterValue<TVal>(IGeneratedSymbolConfig config, string parameterName, Func<string, IGeneratedSymbolConfig, string, TVal> converter, TVal? defaultValue = default)
180protected TVal GetMandatoryParameterValue<TVal>(IGeneratedSymbolConfig config, string parameterName, Func<string, IGeneratedSymbolConfig, string, TVal> converter)
Microsoft.VisualBasic.Core (7)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (7)
1330Private Shared Invokers As New CacheDict(Of Integer, Func(Of CallSiteBinder, Object, Object(), Object))(16)
1340Dim Invoker As Func(Of CallSiteBinder, Object, Object(), Object) = Nothing
1363Private Shared Function CreateInvoker(ByVal ArgLength As Integer) As Func(Of CallSiteBinder, Object, Object(), Object)
1405Return DirectCast(InvokerMethod.CreateDelegate(GetType(Func(Of CallSiteBinder, Object, Object(), Object))), Func(Of CallSiteBinder, Object, Object(), Object))
1422Dim c As CallSite(Of Func(Of CallSite, Object, Object, Object)) =
1423CallSite(Of Func(Of CallSite, Object, Object, Object)).Create(action)
mscorlib (1)
netstandard (1)
NuGet.Build.Tasks.Console (2)
MSBuildStaticGraphRestore.cs (2)
959Func<string, TProject, (ProjectInstance, string), TProject> updateProjectFactory,
1262Func<string, TProject, (ProjectInstance, string), TProject> updateProjectFactory,
NuGet.CommandLine.XPlat (1)
NuGet.DependencyResolver.Core (1)
GraphModel\GraphOperations.cs (1)
551private static void ForEach<TItem, TState, TContext>(this GraphNode<TItem> root, TState state, Func<GraphNode<TItem>, TState, TContext, TState> visitor, TContext context, Func<GraphNode<TItem>, bool> skipNode = null)
NuGet.Packaging (9)
ContentModel\ContentPropertyDefinition.cs (9)
20Func<ReadOnlyMemory<char>, PatternTable?, bool, object?> parser)
27Func<ReadOnlyMemory<char>, PatternTable?, bool, object?> parser,
34Func<ReadOnlyMemory<char>, PatternTable?, bool, object?> parser,
36Func<object?, object?, object?, int>? compareTest)
43Func<ReadOnlyMemory<char>, PatternTable?, bool, object?> parser,
51Func<ReadOnlyMemory<char>, PatternTable?, bool, object?> parser,
53Func<object?, object?, object?, int>? compareTest,
77internal Func<ReadOnlyMemory<char>, PatternTable?, bool, object?> Parser { get; }
154public Func<object?, object?, object?, int>? CompareTest { get; }
PresentationFramework (2)
System\Windows\Controls\ItemContainerGenerator.cs (2)
626internal bool FindItem<TState>(Func<TState, object, DependencyObject, bool> match, TState matchState,
676private bool DoLinearSearch<TState>(Func<TState, object, DependencyObject, bool> match, TState matchState,
Roslyn.Diagnostics.Analyzers (55)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (2)
575public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
586public static async ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this IEnumerable<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<IEnumerable<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (4)
168public static ImmutableArray<TResult> SelectAsArray<TItem, TArg, TResult>(this ImmutableArray<TItem> items, Func<TItem, int, TArg, TResult> map, TArg arg)
414public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> array, Func<TItem, TArg, CancellationToken, ValueTask<TResult>> selector, TArg arg, CancellationToken cancellationToken)
426public static ValueTask<ImmutableArray<TResult>> SelectManyAsArrayAsync<TItem, TArg, TResult>(this ImmutableArray<TItem> source, Func<TItem, TArg, CancellationToken, ValueTask<ImmutableArray<TResult>>> selector, TArg arg, CancellationToken cancellationToken)
1035public static bool SequenceEqual<TElement, TArg>(this ImmutableArray<TElement> array1, ImmutableArray<TElement> array2, TArg arg, Func<TElement, TElement, TArg, bool> predicate)
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (8)
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);
285/// Gets a <see cref="Func{T1, T2, T3, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
317public static Releaser GetPooledFunction<T1, T2, T3, TArg, TResult>(Func<T1, T2, T3, TArg, TResult> unboundFunction, TArg argument, out Func<T1, T2, T3, TResult> boundFunction)
318=> GetPooledDelegate<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>(unboundFunction, argument, out boundFunction);
439: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, TArg, TResult>, TArg, Func<T1, T2, TArg, TResult>, Func<T1, T2, TResult>>
446: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, T2, T3, TArg, TResult>, TArg, Func<T1, T2, T3, TArg, TResult>, Func<T1, T2, T3, TResult>>
448protected override Func<T1, T2, T3, TResult> Bind()
src\roslyn\src\Dependencies\Threading\ProducerConsumer.cs (15)
25Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
48Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
49Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
66Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
67Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
90Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
104Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task> consumeItems,
127Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
141Func<ImmutableArray<TItem>, TArgs, CancellationToken, Task> consumeItems,
160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
249Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
321Func<Action<TItem>, TArgs, CancellationToken, Task> produceItems,
322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync,
364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync,
377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync,
390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync,
392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync,
394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (3)
44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter;
56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter)
70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
114public static void Log<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel = LogLevel.Debug)
201public static IDisposable LogBlock<TArg0, TArg1, TArg2>(FunctionId functionId, Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
29public static LogMessage Create<TArg0, TArg1, TArg2>(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
194private Func<TArg0, TArg1, TArg2, string>? _messageGetter;
199public static LogMessage Construct(Func<TArg0, TArg1, TArg2, string> messageGetter, TArg0 arg0, TArg1 arg1, TArg2 arg2, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (6)
30Func<SemanticModel, TType, TNode, bool> canReplace,
53Func<SemanticModel, TType, TNode, bool> canReplace,
76Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
97Func<SemanticModel, TType, TNode, bool> canReplace,
120Func<SemanticModel, SyntaxNode, TNode, SyntaxNode> updateRoot,
155Func<SemanticModel, TType, TNode, bool> canReplace,
ScenarioTests.Common.Tests (2)
System.Composition.Hosting (2)
System.Composition.TypedParts (2)
System.Core (1)
System.Data.Common (3)
System.Diagnostics.DiagnosticSource (6)
System\Diagnostics\DiagnosticListener.cs (4)
108public virtual IDisposable Subscribe(IObserver<KeyValuePair<string, object?>> observer, Func<string, object?, object?, bool>? isEnabled)
115Func<string, object?, object?, bool> localIsEnabled = isEnabled;
283internal Func<string, object?, object?, bool>? IsEnabled3Arg;
434Predicate<string>? isEnabled1Arg, Func<string, object?, object?, bool>? isEnabled3Arg,
System.IO.Pipelines (1)
System.Linq.AsyncEnumerable (49)
System\Linq\AggregateAsync.cs (6)
65Func<TSource, TSource, CancellationToken, ValueTask<TSource>> func,
75Func<TSource, TSource, CancellationToken, ValueTask<TSource>> func,
144Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
154Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
235Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
248Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
System\Linq\AggregateBy.cs (4)
108Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
124Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
247Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
263Func<TAccumulate, TSource, CancellationToken, ValueTask<TAccumulate>> func,
System\Linq\FullJoin.cs (4)
154Func<TOuter?, TInner?, CancellationToken, ValueTask<TResult>> resultSelector,
176Func<TOuter?, TInner?, CancellationToken, ValueTask<TResult>> resultSelector,
231Func<TOuter?, TInner?, CancellationToken, ValueTask<TResult>> resultSelector,
242Func<TOuter?, TInner?, CancellationToken, ValueTask<TResult>> resultSelector,
System\Linq\GroupBy.cs (4)
253Func<TKey, IEnumerable<TSource>, CancellationToken, ValueTask<TResult>> resultSelector,
267Func<TKey, IEnumerable<TSource>, CancellationToken, ValueTask<TResult>> resultSelector,
359Func<TKey, IEnumerable<TElement>, CancellationToken, ValueTask<TResult>> resultSelector,
375Func<TKey, IEnumerable<TElement>, CancellationToken, ValueTask<TResult>> resultSelector,
System\Linq\SelectMany.cs (12)
192Func<TSource, int, CancellationToken, ValueTask<IEnumerable<TResult>>> selector)
203Func<TSource, int, CancellationToken, ValueTask<IEnumerable<TResult>>> selector,
333Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector)
346Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector,
433Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector)
446Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector,
531Func<TSource, int, CancellationToken, ValueTask<IEnumerable<TCollection>>> collectionSelector,
532Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector)
544Func<TSource, int, CancellationToken, ValueTask<IEnumerable<TCollection>>> collectionSelector,
545Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector,
582Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector)
595Func<TSource, TCollection, CancellationToken, ValueTask<TResult>> resultSelector,
System.Linq.Expressions (9)
System\Dynamic\UpdateDelegates.Generated.cs (3)
165var @this = (CallSite<Func<CallSite, T0, T1, TRet>>)site;
166Func<CallSite, T0, T1, TRet>[] applicable;
167Func<CallSite, T0, T1, TRet> rule, originalRule = @this.Target;
System\Linq\Expressions\StackGuard.cs (2)
54public R RunOnEmptyStack<T1, T2, T3, R>(Func<T1, T2, T3, R> action, T1 arg1, T2 arg2, T3 arg3) =>
57var t = ((Func<T1, T2, T3, R>, T1, T2, T3))s;
System.Net.Http.Json (9)
System\Net\Http\Json\HttpClientJsonExtensions.cs (7)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
24private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) =>
27private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) =>
30private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken) =>
34Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod,
37Func<Stream, TJsonOptions, CancellationToken, ValueTask<TValue?>> deserializeMethod,
77Func<Stream, TJsonOptions, CancellationToken, ValueTask<TValue?>> deserializeMethod,
System.Net.HttpListener (3)
System\Net\Windows\CookieExtensions.cs (3)
52private static Func<CookieCollection, Cookie, bool, int>? s_internalAddFunc;
56s_internalAddFunc ??= (Func<CookieCollection, Cookie, bool, int>)typeof(CookieCollection).GetMethod("InternalAdd", BindingFlags.Instance | BindingFlags.NonPublic)?.CreateDelegate(typeof(Func<CookieCollection, Cookie, bool, int>))!;
System.Net.NameResolution (2)
System.Net.Quic (2)
System.Net.Security (2)
System.Private.CoreLib (18)
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (4)
108Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException)
233Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException = null)
239Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException = null)
246Func<Interop.ErrorInfo, Interop.Sys.OpenFlags, string, Exception?>? createOpenException = null)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (3)
828Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
862Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
871internal static Task<TResult> FromAsyncImpl<TArg1>(Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (4)
935Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
971Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
1303Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
1338public Task<TResult> FromAsync<TArg1, TResult>(Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod,
System\Type.NativeAot.cs (3)
79public static Type GetType(string typeName, Func<AssemblyName, Assembly?>? assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver) => GetType(typeName, assemblyResolver, typeResolver, throwOnError: false, ignoreCase: false);
82public static Type GetType(string typeName, Func<AssemblyName, Assembly?>? assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver, bool throwOnError) => GetType(typeName, assemblyResolver, typeResolver, throwOnError: throwOnError, ignoreCase: false);
85public static Type GetType(string typeName, Func<AssemblyName, Assembly?>? assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver, bool throwOnError, bool ignoreCase)
System.Reflection.MetadataLoadContext (1)
System.Runtime (1)
System.Runtime.InteropServices.JavaScript (7)
System\Runtime\InteropServices\JavaScript\JSMarshalerType.cs (4)
419/// <param name="arg1">Metadata about the type of the first argument of the <see cref="System.Func{TRes,T1,T2,T3}"/>.</param>
420/// <param name="arg2">Metadata about the type of the second argument of the <see cref="System.Func{TRes,T1,T2,T3}"/>.</param>
421/// <param name="arg3">Metadata about the type of the third argument of the <see cref="System.Func{TRes,T1,T2,T3}"/>.</param>
422/// <param name="result">Metadata about the type of the result of the <see cref="System.Func{TRes,T1,T2,T3}"/>.</param>
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Func.cs (3)
494public void ToManaged<T1, T2, T3, TResult>(out Func<T1, T2, T3, TResult>? value, ArgumentToJSCallback<T1> arg1Marshaler, ArgumentToJSCallback<T2> arg2Marshaler, ArgumentToJSCallback<T3> arg3Marshaler, ArgumentToManagedCallback<TResult> resMarshaler)
694public unsafe void ToJS<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> value, ArgumentToManagedCallback<T1> arg1Marshaler, ArgumentToManagedCallback<T2> arg2Marshaler, ArgumentToManagedCallback<T3> arg3Marshaler, ArgumentToJSCallback<TResult> resMarshaler)
696Func<T1, T2, T3, TResult> cpy = value;
System.Security.Cryptography (7)
System\Security\Cryptography\Aes.cs (4)
696Func<TState, ReadOnlySpan<byte>, Span<byte>, int> decryptEcb)
765Func<TState, ReadOnlySpan<byte>, Span<byte>, int> encryptEcb)
817Func<TState, ReadOnlySpan<byte>, Span<byte>, int> encryptEcb)
856Func<TState, ReadOnlySpan<byte>, Span<byte>, int> decryptEcb)
System.ServiceModel.Primitives (1)
Internals\System\Runtime\TaskHelpers.cs (1)
161public static Task<(TOut1, TOut2)> FromAsync<TIn, TOut1, TOut2>(Func<TIn, AsyncCallback, object, IAsyncResult> beginDelegate, EndWithOutDelegate<TOut2, TOut1> endDelegate, TIn arg1, object state)
System.Text.RegularExpressions (1)
System.Text.RegularExpressions.Generator (1)
System.Threading.Tasks.Dataflow (3)
System.Threading.Tasks.Parallel (13)
System\Threading\Tasks\Parallel.cs (13)
688Func<int, ParallelLoopState, TLocal, TLocal> body,
741Func<long, ParallelLoopState, TLocal, TLocal> body,
805Func<int, ParallelLoopState, TLocal, TLocal> body,
870Func<long, ParallelLoopState, TLocal, TLocal> body,
914Func<TInt, ParallelLoopState, TLocal, TLocal>? bodyWithLocal,
1412Func<TSource, ParallelLoopState, TLocal, TLocal> body, Action<TLocal> localFinally)
1477Func<TSource, ParallelLoopState, TLocal, TLocal> body, Action<TLocal> localFinally)
1636Func<TSource, ParallelLoopState, TLocal, TLocal>? bodyWithStateAndLocal,
1694Func<TSource, ParallelLoopState, TLocal, TLocal>? bodyWithStateAndLocal,
1753Func<TSource, ParallelLoopState, TLocal, TLocal>? bodyWithStateAndLocal,
2018Func<TSource, ParallelLoopState, TLocal, TLocal> body,
2392Func<TSource, ParallelLoopState, TLocal, TLocal> body,
2507Func<TSource, ParallelLoopState, TLocal, TLocal>? bodyWithStateAndLocal,
UnitTests.Common (9)