2714 references to Func
aspire (13)
Aspire.Azure.AI.Inference.Tests (4)
Aspire.Azure.AI.OpenAI.Tests (10)
Aspire.Cli.Tests (7)
Aspire.Dashboard (41)
Otlp\Storage\TelemetryRepository.cs (5)
253public Subscription OnNewResources(Func<Task> callback)
258public Subscription OnNewLogs(ResourceKey? resourceKey, SubscriptionType subscriptionType, Func<Task> callback)
263public Subscription OnNewMetrics(ResourceKey? resourceKey, SubscriptionType subscriptionType, Func<Task> callback)
268public Subscription OnNewTraces(ResourceKey? resourceKey, SubscriptionType subscriptionType, Func<Task> callback)
273private Subscription AddSubscription(string name, ResourceKey? resourceKey, SubscriptionType subscriptionType, Func<Task> callback, List<Subscription> subscriptions)
Aspire.Dashboard.Components.Tests (7)
Aspire.Dashboard.Tests (7)
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (20)
ApplicationModel\HttpCommandContext.cs (2)
9/// or <see cref="ResourceBuilderExtensions.WithHttpCommand{TResource}(IResourceBuilder{TResource}, string, string, Func{EndpointReference}?, string?, HttpCommandOptions?)"/>.
47/// or <see cref="ResourceBuilderExtensions.WithHttpCommand{TResource}(IResourceBuilder{TResource}, string, string, Func{EndpointReference}?, string?, HttpCommandOptions?)"/>.
ResourceBuilderExtensions.cs (8)
97public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, string name, Func<string> callback) where T : IResourceWithEnvironment
1518var endpointSelector = endpointName is not null
1554public static IResourceBuilder<T> WithHttpHealthCheck<T>(this IResourceBuilder<T> builder, Func<EndpointReference>? endpointSelector, string? path = null, int? statusCode = null) where T : IResourceWithEndpoints
1903Func<EndpointReference>? endpointSelector,
2008private static Func<EndpointReference> NamedEndpointSelector<TResource>(IResourceBuilder<TResource> builder, string[] endpointNames, string errorDisplayNoun)
2034private static Func<EndpointReference> DefaultEndpointSelector<TResource>(IResourceBuilder<TResource> builder)
2371var endpointSelector = endpointName is not null
2411public static IResourceBuilder<T> WithHttpProbe<T>(this IResourceBuilder<T> builder, ProbeType type, Func<EndpointReference>? endpointSelector, string? path = null, int? initialDelaySeconds = null, int? periodSeconds = null, int? timeoutSeconds = null, int? failureThreshold = null, int? successThreshold = null)
Aspire.Hosting.Azure (3)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.Kusto.Tests (10)
KustoPublicApiTests.cs (8)
12var action = () => new AzureKustoClusterResource(null!);
24var action = () => new AzureKustoClusterResource(name);
50var action = () => new AzureKustoDatabaseResource(null!, "db", parentResource);
65var action = () => new AzureKustoDatabaseResource("kusto-db", name, parentResource);
78var action = () => new AzureKustoDatabaseResource("kusto-db", null!, parentResource);
93var action = () => new AzureKustoDatabaseResource("kusto-db", name, parentResource);
106var action = () => new AzureKustoDatabaseResource("kusto-db", "db1", kustoParentResource);
129var action = () => new AzureKustoEmulatorResource(null!);
Aspire.Hosting.Azure.Tests (163)
PublicApiTests\CosmosDBPublicApiTests.cs (34)
24var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPath, parent);
44var action = () => new AzureCosmosDBContainerResource(name, containerName, [partitionKeyPath], parent);
64var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPath, parent);
84var action = () => new AzureCosmosDBContainerResource(name, containerName, [partitionKeyPath], parent);
104var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPath, parent);
122var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPaths, parent);
138var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPaths, parent);
156var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPaths, parent);
170var action = () => new AzureCosmosDBContainerResource(name, containerName, partitionKeyPath, parent);
184var action = () => new AzureCosmosDBContainerResource(name, containerName, [partitionKeyPath], parent);
200var action = () => new AzureCosmosDBDatabaseResource(name, databaseName, parent.Resource);
218var action = () => new AzureCosmosDBDatabaseResource(name, databaseName, parent.Resource);
233var action = () => new AzureCosmosDBDatabaseResource(name, databaseName, parent);
244var action = () => new AzureCosmosDBEmulatorResource(innerResource);
258var action = () => new AzureCosmosDBResource(name, configureInfrastructure);
272var action = () => new AzureCosmosDBResource(name, configureInfrastructure);
284var action = () => builder.AddAzureCosmosDB(name);
298var action = () => builder.AddAzureCosmosDB(name);
312var action = () => builder.RunAsEmulator(configureContainer);
325var action = () => builder.RunAsPreviewEmulator(configureContainer);
336var action = () => builder.WithDataVolume();
348var action = () => builder.WithGatewayPort(port);
360var action = () => builder.WithPartitionCount(count);
373var action = () => builder.AddDatabase(databaseName);
389var action = () => cosmos.AddDatabase(databaseName);
403var action = () => builder.AddCosmosDatabase(name);
418var action = () => cosmos.AddCosmosDatabase(name);
433var action = () => builder.AddContainer(name, partitionKeyPath);
450var action = () => cosmos.AddContainer(name, partitionKeyPath);
469var action = () => cosmos.AddContainer(name, partitionKeyPath);
484var action = () => cosmos.AddContainer(name, partitionKeyPaths!);
496var action = () => cosmos.AddContainer(name, partitionKeyPaths);
510var action = () => cosmos.AddContainer(name, partitionKeyPaths);
521var action = () => builder.WithDataExplorer();
PublicApiTests\EventHubsPublicApiTests.cs (28)
23var action = () => new AzureEventHubConsumerGroupResource(name, consumerGroupName, parent);
42var action = () => new AzureEventHubConsumerGroupResource(name, consumerGroupName, parent);
57var action = () => new AzureEventHubConsumerGroupResource(name, consumerGroupName, parent);
72var action = () => new AzureEventHubResource(name, hubName, parent);
89var action = () => new AzureEventHubResource(name, hubName, parent);
104var action = () => new AzureEventHubResource(name, hubName, parent);
115var action = () => new AzureEventHubsEmulatorResource(innerResource);
127var action = () => builder.AddAzureEventHubs(name);
141var action = () => builder.AddAzureEventHubs(name);
156var action = () => builder.AddEventHub(name);
172var action = () => builder.AddEventHub(name);
186var action = () => builder.AddHub(name);
201var action = () => builder.AddHub(name);
215var action = () => builder.WithProperties(configure);
228var action = () => builder.WithProperties(configure);
240var action = () => builder.AddConsumerGroup(name);
255var action = () => builder.AddConsumerGroup(name);
268var action = () => builder.RunAsEmulator();
280var action = () => builder.WithDataBindMount();
293var action = () => builder.WithDataVolume();
307var action = () => builder.WithGatewayPort(port);
319var action = () => builder.WithHostPort(port);
331var action = () => builder.WithConfigurationFile(path);
347var action = () => builder.RunAsEmulator(configure => configure.WithConfigurationFile(path));
361var action = () => builder.WithConfiguration(configJson);
374var action = () => builder.RunAsEmulator(configure => configure.WithConfiguration(configJson));
388var action = () => new AzureEventHubsResource(name, configureInfrastructure);
402var action = () => new AzureEventHubsResource(name, configureInfrastructure);
PublicApiTests\PostgreSQLPublicApiTests.cs (13)
48var action = () => builder.AddAzurePostgresFlexibleServer(name);
62var action = () => builder.AddAzurePostgresFlexibleServer(name);
76var action = () => builder.AddDatabase(name);
91var action = () => builder.AddDatabase(name);
104var action = () => builder.RunAsContainer();
115var action = () => builder.WithPasswordAuthentication();
128var action = () => new AzurePostgresResource(innerResource, configureInfrastructure);
143var action = () => new AzurePostgresResource(innerResource, configureInfrastructure);
158var action = () => new AzurePostgresFlexibleServerDatabaseResource(name, databaseName, postgresParentResource);
175var action = () => new AzurePostgresFlexibleServerDatabaseResource(name, databaseName, postgresParentResource);
190var action = () => new AzurePostgresFlexibleServerDatabaseResource(name, databaseName, postgresParentResource);
204var action = () => new AzurePostgresFlexibleServerResource(name, configureInfrastructure);
218var action = () => new AzurePostgresFlexibleServerResource(name, configureInfrastructure);
Aspire.Hosting.DevTunnels.Tests (2)
Aspire.Hosting.Garnet.Tests (8)
Aspire.Hosting.GitHub.Models (1)
Aspire.Hosting.GitHub.Models.Tests (2)
Aspire.Hosting.Kafka.Tests (11)
Aspire.Hosting.Keycloak.Tests (10)
Aspire.Hosting.Milvus.Tests (18)
Aspire.Hosting.MongoDB.Tests (20)
MongoDBPublicApiTests.cs (20)
18var action = () => builder.AddMongoDB(name, port);
33var action = () => builder.AddMongoDB(name, port);
48var action = () => builder.AddMongoDB(name, userName: userName, password: password);
64var action = () => builder.AddMongoDB(name, userName: userName, password: password);
78var action = () => builder.AddDatabase(name);
93var action = () => builder.AddDatabase(name);
106var action = () => builder.WithMongoExpress();
120var action = () => builder.WithHostPort(port);
131var action = () => builder.WithDataVolume();
143var action = () => builder.WithDataBindMount(source);
158var action = () => builder.WithDataBindMount(source);
172var action = () => builder.WithInitBindMount("init.js");
189var action = () => builder.WithInitBindMount(source);
203var action = () => builder.WithInitFiles("init.js");
218var action = () => builder.WithInitFiles(source);
235var action = () => new MongoDBDatabaseResource(name, databaseName, parent);
252var action = () => new MongoDBDatabaseResource(name, databaseName, parent);
267var action = () => new MongoDBDatabaseResource(name, databaseName, parent);
280var action = () => new MongoDBServerResource(name);
295var action = () => new MongoExpressContainerResource(name);
Aspire.Hosting.MySql.Tests (23)
Aspire.Hosting.Nats.Tests (11)
Aspire.Hosting.NodeJs.Tests (12)
NodeJsPublicApiTests.cs (10)
19var action = () => new NodeAppResource(name, command, workingDirectory);
36var action = () => new NodeAppResource(name, command, workingDirectory);
51var action = () => new NodeAppResource(name, command, workingDirectory);
64var action = () => builder.AddNodeApp(name, scriptPath);
79var action = () => builder.AddNodeApp(name, scriptPath);
96var action = () => builder.AddNodeApp(name, scriptPath);
111var action = () => builder.AddNpmApp(name: name, workingDirectory: workingDirectory);
126var action = () => builder.AddNpmApp(name: name, workingDirectory);
141var action = () => builder.AddNpmApp(name, workingDirectory);
157var action = () => builder.AddNpmApp(name, workingDirectory, scriptName);
Aspire.Hosting.OpenAI (1)
Aspire.Hosting.OpenAI.Tests (2)
Aspire.Hosting.Oracle.Tests (18)
Aspire.Hosting.PostgreSQL.Tests (24)
PostgrePublicApiTests.cs (22)
19var action = () => new PgAdminContainerResource(name);
34var action = () => new PgWebContainerResource(name);
48var action = () => builder.AddPostgres(name);
62var action = () => builder.AddPostgres(name);
76var action = () => builder.AddDatabase(name);
91var action = () => builder.AddDatabase(name);
104var action = () => builder.WithPgAdmin();
116var action = () => builder.WithHostPort(port);
128var action = () => builder.WithHostPort(port);
139var action = () => builder.WithPgWeb();
150var action = () => builder.WithDataVolume();
162var action = () => builder.WithDataBindMount(source);
177var action = () => builder.WithDataBindMount(source);
192var action = () => builder.WithInitBindMount(source);
205var action = () => builder.WithInitFiles(source);
221var action = () => builder.WithInitBindMount(source);
239var action = () => builder.WithInitFiles(source);
259var action = () => new PostgresDatabaseResource(name, databaseName, postgresParentResource);
279var action = () => new PostgresDatabaseResource(name, databaseName, postgresParentResource);
294var action = () => new PostgresDatabaseResource(name, databaseName, postgresParentResource);
310var action = () => new PostgresServerResource(name, userName, builder.Resource);
325var action = () => new PostgresServerResource(name, userName, password);
Aspire.Hosting.Python.Tests (30)
PythonPublicApiTests.cs (30)
19var action = () => new PythonAppResource(name, executablePath, appDirectory);
36var action = () => new PythonAppResource(name, executablePath, appDirectory);
50var action = () => new PythonAppResource(name, executablePath, appDirectory: null!);
65var action = () => builder.AddPythonApp(
86var action = () => builder.AddPythonApp(
109var action = () => builder.AddPythonApp(
132var action = () => builder.AddPythonApp(
153var action = () => builder.AddPythonApp(
174var action = () => builder.AddPythonApp(
200var action = () => builder.AddPythonApp(
223var action = () => builder.AddPythonApp(
248var action = () => builder.AddPythonApp(
273var action = () => builder.AddPythonApp(
298var action = () => builder.AddPythonApp(
323var action = () => builder.AddPythonApp(
350var action = () => new PythonProjectResource(name, executablePath, appDirectory);
368var action = () => new PythonProjectResource(name, executablePath, appDirectory);
383var action = () => new PythonProjectResource(name, executablePath, projectDirectory: null!);
399var action = () => builder.AddPythonProject(
421var action = () => builder.AddPythonProject(
445var action = () => builder.AddPythonProject(
469var action = () => builder.AddPythonProject(
491var action = () => builder.AddPythonProject(
513var action = () => builder.AddPythonProject(
540var action = () => builder.AddPythonProject(
564var action = () => builder.AddPythonProject(
590var action = () => builder.AddPythonProject(
616var action = () => builder.AddPythonProject(
642var action = () => builder.AddPythonProject(
668var action = () => builder.AddPythonProject(
Aspire.Hosting.Qdrant.Tests (9)
Aspire.Hosting.RabbitMQ.Tests (11)
Aspire.Hosting.Redis.Tests (16)
Aspire.Hosting.Seq.Tests (6)
Aspire.Hosting.SqlServer.Tests (12)
Aspire.Hosting.Testing.Tests (31)
TestingPublicApiTests.cs (31)
17var action = () => new DistributedApplicationFactory(entryPoint);
29var action = () => new DistributedApplicationFactory(entryPoint, args);
41var action = () => new DistributedApplicationFactory(entryPoint, args);
55var action = () => new DistributedApplicationFactory(entryPoint, args);
76var action = () => distributedApplicationFactory.CreateHttpClient(resourceName);
93var action = async () => await distributedApplicationFactory.GetConnectionString(resourceName);
110var action = () => distributedApplicationFactory.GetEndpoint(resourceName);
124var action = () => app.CreateHttpClient(resourceName);
138var action = () => distributedApplication.CreateHttpClient(resourceName);
152var action = async () => await app.GetConnectionStringAsync(resourceName);
166var action = async () => await distributedApplication.GetConnectionStringAsync(resourceName);
180var action = () => app.GetEndpoint(resourceName);
194var action = () => distributedApplication.GetEndpoint(resourceName);
207var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint);
218var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args);
231var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args);
249var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args);
261var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args);
275var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args);
293var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder);
305var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder);
319var action = () => DistributedApplicationTestingBuilder.CreateAsync<Projects.TestingAppHost1_AppHost>(args, configureBuilder);
338var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder);
351var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder);
364var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder);
379var action = () => DistributedApplicationTestingBuilder.CreateAsync(entryPoint, args, configureBuilder);
396var action = () => DistributedApplicationTestingBuilder.Create(args);
409var action = () => DistributedApplicationTestingBuilder.Create(args);
427var action = () => DistributedApplicationTestingBuilder.Create(args, configureBuilder);
439var action = () => DistributedApplicationTestingBuilder.Create(args, configureBuilder);
453var action = () => DistributedApplicationTestingBuilder.Create(args, configureBuilder);
Aspire.Hosting.Tests (2)
Aspire.Hosting.Valkey.Tests (9)
Aspire.Keycloak.Authentication.Tests (28)
KeycloakAuthenticationPublicApiTests.cs (28)
21var action = () => builder.AddKeycloakJwtBearer(serviceName, realm);
37var action = () => builder.AddKeycloakJwtBearer(serviceName, realm);
55var action = () => builder.AddKeycloakJwtBearer(serviceName, realm);
71var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, authenticationScheme);
88var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, authenticationScheme);
107var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, authenticationScheme);
126var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, authenticationScheme);
142var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, configureOptions);
159var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, configureOptions);
178var action = () => builder.AddKeycloakJwtBearer(serviceName, realm, configureOptions);
195var action = () => builder.AddKeycloakJwtBearer(
217var action = () => builder.AddKeycloakJwtBearer(
241var action = () => builder.AddKeycloakJwtBearer(
265var action = () => builder.AddKeycloakJwtBearer(
284var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm);
300var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm);
318var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm);
334var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, authenticationScheme);
351var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, authenticationScheme);
370var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, authenticationScheme);
389var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, authenticationScheme);
405var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, configureOptions);
422var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, configureOptions);
441var action = () => builder.AddKeycloakOpenIdConnect(serviceName, realm, configureOptions);
458var action = () => builder.AddKeycloakOpenIdConnect(
480var action = () => builder.AddKeycloakOpenIdConnect(
504var action = () => builder.AddKeycloakOpenIdConnect(
528var action = () => builder.AddKeycloakOpenIdConnect(
Aspire.OpenAI.Tests (12)
Aspire.Playground.Tests (2)
Aspire.StackExchange.Redis (1)
Aspire.StackExchange.Redis.Tests (2)
BinaryFormatTests (2)
Client.ClientBase.IntegrationTests (1)
Client.ExpectedExceptions.IntegrationTests (2)
ClientSample (7)
DefaultBuilder.SampleApp (1)
dotnet-dev-certs (7)
dotnet-getdocument (7)
dotnet-openapi (8)
dotnet-sql-cache (7)
dotnet-svcutil-lib (17)
dotnet-user-jwts (7)
dotnet-user-secrets (7)
ExceptionHandlerSample (1)
GenerateDocumentationAndConfigFiles (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
GetDocument.Insider (7)
IIS.FunctionalTests (3)
IIS.LongTests (3)
IIS.NewHandler.FunctionalTests (3)
IIS.NewShim.FunctionalTests (3)
IIS.ShadowCopy.Tests (3)
IISExpress.FunctionalTests (3)
Infrastructure.Common (1)
InMemory.FunctionalTests (5)
InteractiveHost32 (1)
InteractiveHost64 (1)
Interop.FunctionalTests (3)
InteropClient (1)
Metrics (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Metrics.Legacy (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.Arcade.Common (12)
Microsoft.AspNetCore.Analyzer.Testing (1)
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.Authentication.Test (2)
Microsoft.AspNetCore.Authorization.Policy (1)
Microsoft.AspNetCore.Components (29)
Microsoft.AspNetCore.Components.Authorization.Tests (5)
Microsoft.AspNetCore.Components.Forms (15)
Microsoft.AspNetCore.Components.Forms.Tests (6)
Microsoft.AspNetCore.Components.QuickGrid.Tests (5)
Microsoft.AspNetCore.Components.Server (6)
Microsoft.AspNetCore.Components.Tests (49)
RendererTest.cs (19)
629OnArbitraryDelegateEvent = (Func<Task>)(() => Task.CompletedTask),
1183builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallback), EventCallback.Factory.Create(parentComponent, (Func<Task>)(() =>
1302builder.AddComponentParameter(1, nameof(EventComponent.OnClickEventCallbackOfT), EventCallback.Factory.Create<DerivedEventArgs>(parentComponent, (Func<Task>)(() =>
1648builder.AddComponentParameter(1, nameof(EventComponent.OnClickAsyncAction), (Func<Task>)(async () =>
1759builder.AddComponentParameter(1, nameof(EventComponent.OnClickAsyncAction), (Func<Task>)(async () =>
1879builder.AddComponentParameter(1, nameof(EventComponent.OnClickAsyncAction), (Func<Task>)(async () =>
2320builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(() => throw exception1));
2354builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(() => default));
2394builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(async () => { await tcs.Task; }));
2439builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(async () => { await tcs.Task; throw exception1; }));
2478builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(() => throw new TaskCanceledException()));
2516(Func<ValueTask>)(() => new ValueTask(tcs.Task)));
4274builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(() => { disposed = true; throw exception1; }));
4302builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(async () => { await tcs.Task; disposed = true; throw exception1; }));
4911builder.AddComponentParameter(1, nameof(AsyncDisposableComponent.AsyncDisposeAction), (Func<ValueTask>)(async () => await exception2Tcs.Task));
5292public Func<Task> OnClickAsyncAction { get; set; }
5546public Func<ValueTask> AsyncDisposeAction { get; set; }
5800public Func<Task<(int id, EventType @event)>> EventAction { get; set; }
6052public Func<Task> Callback { get; set; }
Microsoft.AspNetCore.Components.Web (7)
Microsoft.AspNetCore.Components.Web.Tests (7)
Microsoft.AspNetCore.Components.WebAssembly (10)
Microsoft.AspNetCore.Components.WebView.Maui (3)
Microsoft.AspNetCore.Components.WebView.Photino (12)
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
Microsoft.AspNetCore.Connections.Abstractions (2)
Microsoft.AspNetCore.Cryptography.Internal (3)
Microsoft.AspNetCore.Cryptography.Internal.Tests (3)
Microsoft.AspNetCore.DataProtection (17)
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (4)
Microsoft.AspNetCore.DataProtection.Tests (3)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (7)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.Hosting.Tests (4)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (5)
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
Microsoft.AspNetCore.Http.Connections.Client (5)
Microsoft.AspNetCore.Http.Connections.Tests (3)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Http.Extensions.Tests (53)
RequestDelegateFactoryTests.cs (53)
1353new object[] { (Func<JsonTodo>)TestAction },
1354new object[] { (Func<Task<JsonTodo>>)TaskTestAction},
1355new object[] { (Func<Task<JsonTodo>>)TaskTestActionAwaited},
1356new object[] { (Func<ValueTask<JsonTodo>>)ValueTaskTestAction},
1357new object[] { (Func<ValueTask<JsonTodo>>)ValueTaskTestActionAwaited},
1474new object[] { (Func<CustomResult>)TestAction },
1475new object[] { (Func<Task<CustomResult>>)TaskTestAction},
1476new object[] { (Func<ValueTask<CustomResult>>)ValueTaskTestAction},
1477new object[] { (Func<FSharp.Control.FSharpAsync<CustomResult>>)FSharpAsyncTestAction },
1479new object[] { (Func<CustomResult>)StaticTestAction},
1480new object[] { (Func<Task<CustomResult>>)StaticTaskTestAction},
1481new object[] { (Func<ValueTask<CustomResult>>)StaticValueTaskTestAction},
1482new object[] { (Func<FSharp.Control.FSharpAsync<CustomResult>>)StaticFSharpAsyncTestAction },
1484new object[] { (Func<object>)StaticResultAsObject},
1486new object[] { (Func<Task<object>>)StaticTaskOfIResultAsObject},
1487new object[] { (Func<ValueTask<object>>)StaticValueTaskOfIResultAsObject},
1488new object[] { (Func<FSharp.Control.FSharpAsync<object>>)StaticFSharpAsyncOfIResultAsObject},
1490new object[] { (Func<StructResult>)TestStructAction },
1491new object[] { (Func<Task<StructResult>>)TaskTestStructAction },
1492new object[] { (Func<ValueTask<StructResult>>)ValueTaskTestStructAction },
1493new object[] { (Func<FSharp.Control.FSharpAsync<StructResult>>)FSharpAsyncTestStructAction },
1528new object[] { (Func<IResult?>)TestAction, "The IResult returned by the Delegate must not be null." },
1529new object[] { (Func<Task<IResult?>?>)TaskNullAction, "The IResult in Task<IResult> response must not be null." },
1530new object[] { (Func<Task<bool?>?>)TaskBoolAction, "The Task returned by the Delegate must not be null." },
1531new object[] { (Func<Task<IResult?>>)TaskTestAction, "The IResult returned by the Delegate must not be null." },
1532new object[] { (Func<ValueTask<IResult?>>)ValueTaskTestAction, "The IResult returned by the Delegate must not be null." },
2292new object[] { (Func<FSharp.Control.FSharpAsync<string>>)FSharpAsyncOfTMethod },
2293new object[] { (Func<FSharp.Control.FSharpAsync<string>>)FSharpAsyncOfTWithYieldMethod },
2294new object[] { (Func<FSharp.Control.FSharpAsync<object>>)FSharpAsyncOfObjectWithYieldMethod }
2382new object[] { (Func<ValueTask>)ValueTaskMethod },
2383new object[] { (Func<ValueTask<FSharp.Core.Unit>>)ValueTaskOfUnitMethod },
2384new object[] { (Func<Task>)TaskMethod },
2385new object[] { (Func<Task<FSharp.Core.Unit>>)TaskOfUnitMethod },
2386new object[] { (Func<FSharp.Control.FSharpAsync<FSharp.Core.Unit>>)FSharpAsyncOfUnitMethod },
2387new object[] { (Func<ValueTask>)ValueTaskWithYieldMethod },
2388new object[] { (Func<Task>)TaskWithYieldMethod},
2389new object[] { (Func<FSharp.Control.FSharpAsync<FSharp.Core.Unit>>)FSharpAsyncOfUnitWithYieldMethod }
2503new object[] { (Func<ValueTask<TodoStruct>>)ValueTaskOfStructMethod },
2504new object[] { (Func<ValueTask<TodoStruct>>)ValueTaskOfStructWithYieldMethod },
2505new object[] { (Func<Task<TodoStruct>>)TaskOfStructMethod },
2506new object[] { (Func<Task<TodoStruct>>)TaskOfStructWithYieldMethod },
2507new object[] { (Func<FSharp.Control.FSharpAsync<TodoStruct>>)FSharpAsyncOfStructMethod },
2508new object[] { (Func<FSharp.Control.FSharpAsync<TodoStruct>>)FSharpAsyncOfStructWithYieldMethod }
2561var @delegate = () => new object();
2573var @delegate = () => "Hello";
2648var @delegate = () => new AddsCustomEndpointMetadataResult();
2661var @delegate = () => Task.FromResult(new AddsCustomEndpointMetadataResult());
2674var @delegate = () => ValueTask.FromResult(new AddsCustomEndpointMetadataResult());
2687var @delegate = () => FSharp.Core.ExtraTopLevelOperators.DefaultAsyncBuilder.Return(new AddsCustomEndpointMetadataResult());
2700var @delegate = () => new CountsDefaultEndpointMetadataResult();
2723var @delegate = () => Task.FromResult(new CountsDefaultEndpointMetadataResult());
2746var @delegate = () => ValueTask.FromResult(new CountsDefaultEndpointMetadataResult());
2769var @delegate = () => FSharp.Core.ExtraTopLevelOperators.DefaultAsyncBuilder.Return(new CountsDefaultEndpointMetadataResult());
Microsoft.AspNetCore.Http.Results.Tests (4)
Microsoft.AspNetCore.HttpLogging.Tests (1)
Microsoft.AspNetCore.Identity.Test (2)
Microsoft.AspNetCore.InternalTesting (7)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (1)
Microsoft.AspNetCore.Mvc.Abstractions (9)
Microsoft.AspNetCore.Mvc.Core (29)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Microsoft.AspNetCore.Mvc.Razor (6)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Razor.Test (1)
Microsoft.AspNetCore.Mvc.RazorPages (6)
Microsoft.AspNetCore.Mvc.RazorPages.Test (3)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)
SelectTagHelperTest.cs (5)
19public static TheoryData<object, Type, Func<object>, NameAndId, string> GeneratesExpectedDataSet
57return new TheoryData<object, Type, Func<object>, NameAndId, string>
167Func<object> modelAccessor,
256Func<object> modelAccessor,
436Func<object> modelAccessor,
Microsoft.AspNetCore.Mvc.Testing (7)
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
Microsoft.AspNetCore.Owin (12)
OwinEnvironment.cs (10)
251public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory)
274public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory, Action<object, object> setter)
287public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory, Action<object, object> setter, Func<object> featureFactory)
299private Func<object> DefaultFactory { get; set; }
300private Func<object> FeatureFactory { get; set; }
365public FeatureMap(Func<TFeature, object> getter, Func<object> defaultFactory)
386public FeatureMap(Func<TFeature, object> getter, Func<object> defaultFactory, Action<TFeature, object> setter)
398public FeatureMap(Func<TFeature, object> getter, Func<object> defaultFactory, Action<TFeature, object> setter, Func<TFeature> featureFactory)
Microsoft.AspNetCore.RateLimiting.Tests (3)
Microsoft.AspNetCore.Razor.Runtime (11)
Microsoft.AspNetCore.Razor.Runtime.Test (5)
Microsoft.AspNetCore.Rewrite (5)
Microsoft.AspNetCore.Routing (4)
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (3)
Microsoft.AspNetCore.Session (6)
Microsoft.AspNetCore.Shared.Tests (7)
Microsoft.AspNetCore.SignalR.Client.Core (5)
Microsoft.AspNetCore.SignalR.Client.Tests (18)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (5)
Microsoft.AspNetCore.SignalR.Tests (11)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.TestHost (10)
Microsoft.AspNetCore.TestHost.Tests (3)
Microsoft.AspNetCore.Testing.Tests (1)
Microsoft.AspNetCore.WebSockets.Tests (2)
Microsoft.AspNetCore.WebUtilities (6)
Microsoft.CodeAnalysis (35)
ResourceDescription.cs (4)
24internal readonly Func<Stream> DataProvider;
38public ResourceDescription(string resourceName, Func<Stream> dataProvider, bool isPublic)
55public ResourceDescription(string resourceName, string? fileName, Func<Stream> dataProvider, bool isPublic)
60internal ResourceDescription(string resourceName, string? fileName, Func<Stream> dataProvider, bool isPublic, bool isEmbedded, bool checkArgs)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.Analyzers (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.AnalyzerUtilities (23)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.BannedApiAnalyzers (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.CodeStyle (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.Collections.Package (6)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (9)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
NavigateTo\NavigateToSearcherTests.cs (9)
48It.IsAny<Func<Task>>(),
57Func<Task> onProjectCompleted,
71It.IsAny<Func<Task>>(),
79Func<Task> onProjectCompleted,
98It.IsAny<Func<Task>>(),
107Func<Task> onProjectCompleted,
515public Task SearchCachedDocumentsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken)
527public Task SearchGeneratedDocumentsAsync(Solution solution, ImmutableArray<Project> projects, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken)
533public Task SearchProjectsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (6)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.Debugging.Package (6)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.EditorFeatures (37)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.Extensions.Package (6)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Microsoft.CodeAnalysis.Features (23)
NavigateTo\NavigateToSearcher.cs (2)
350Func<INavigateToSearchService, ImmutableArray<Project>, Func<ImmutableArray<INavigateToSearchResult>, Task>, Func<Task>, Task> processProjectAsync,
535public async Task SearchProjectsAsync(Solution solution, ImmutableArray<Project> projects, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, Func<Task> onProjectCompleted, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
Microsoft.CodeAnalysis.InteractiveHost (13)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Protocol\SumType.cs (3)
154public TResult Match<TResult>(Func<T1, TResult> firstMatch, Func<T2, TResult> secondMatch, Func<TResult>? defaultMatch = null)
427public TResult Match<TResult>(Func<T1, TResult> firstMatch, Func<T2, TResult> secondMatch, Func<T3, TResult> thirdMatch, Func<TResult>? defaultMatch = null)
798public TResult Match<TResult>(Func<T1, TResult> firstMatch, Func<T2, TResult> secondMatch, Func<T3, TResult> thirdMatch, Func<T4, TResult> fourthMatch, Func<TResult>? defaultMatch = null)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (19)
Microsoft.CodeAnalysis.PooledObjects.Package (6)
PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.PublicApiAnalyzers (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.Test.Utilities (16)
Microsoft.CodeAnalysis.Threading.Package (6)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.UnitTests (8)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (30)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (18)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.CSharp (1)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
Microsoft.DotNet.Helix.Sdk (4)
Microsoft.DotNet.Helix.Sdk.Tests (2)
Microsoft.DotNet.RemoteExecutor (3)
Microsoft.DotNet.VersionTools.Tests (1)
Microsoft.DotNet.XUnitExtensions (3)
Microsoft.Extensions.AI.Evaluation (5)
Microsoft.Extensions.AI.Evaluation.Console (10)
Microsoft.Extensions.AI.Evaluation.NLP (5)
Microsoft.Extensions.AI.Evaluation.Quality (5)
Microsoft.Extensions.AI.Evaluation.Reporting (5)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (5)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (3)
Microsoft.Extensions.AI.Evaluation.Safety (5)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.Tests (6)
Microsoft.Extensions.AmbientMetadata.Application.Tests (5)
Microsoft.Extensions.AsyncState.Tests (1)
Microsoft.Extensions.Caching.MicroBenchmarks (4)
Microsoft.Extensions.Caching.StackExchangeRedis (2)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Microsoft.Extensions.Configuration.Binder (2)
Microsoft.Extensions.DependencyModel (2)
Microsoft.Extensions.Diagnostics.HealthChecks (4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (11)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.Hosting (4)
Microsoft.Extensions.Http (5)
Microsoft.Extensions.Http.Diagnostics.Tests (18)
Microsoft.Extensions.Http.Polly.Tests (1)
Microsoft.Extensions.Http.Resilience (4)
Microsoft.Extensions.Http.Resilience.Tests (7)
Microsoft.Extensions.ObjectPool (1)
Microsoft.Extensions.Options (2)
Microsoft.Extensions.Primitives (4)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (6)
Microsoft.Extensions.ServiceDiscovery.Tests (16)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (3)
Microsoft.Extensions.Telemetry.Tests (7)
Microsoft.Extensions.WebEncoders (1)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Maui (8)
Microsoft.Maui.Controls (64)
AnimationExtensions.cs (7)
137 Func<bool> repeat = null)
143 Func<bool> r = () =>
156 Action<double, bool> finished = null, Func<bool> repeat = null)
163 Func<bool> repeat = null)
172 Action<T, bool> finished = null, Func<bool> repeat = null, IAnimationManager animationManager = null)
256 uint rate, uint length, Easing easing, Action<T, bool> finished, Func<bool> repeat)
390 public Func<bool> Repeat;
LegacyLayouts\RelativeLayout.cs (18)
279 Func<double> x;
289 Func<double> y;
299 Func<double> width;
300 Func<double> height = null;
343 void Add(T view, Expression<Func<Rect>> bounds);
345 void Add(T view, Expression<Func<double>> x = null, Expression<Func<double>> y = null, Expression<Func<double>> width = null, Expression<Func<double>> height = null);
359 public void Add(View view, Expression<Func<Rect>> bounds)
368 public void Add(View view, Expression<Func<double>> x = null, Expression<Func<double>> y = null, Expression<Func<double>> width = null, Expression<Func<double>> height = null)
370 Func<double> xCompiled = x != null ? x.Compile() : () => 0;
371 Func<double> yCompiled = y != null ? y.Compile() : () => 0;
373 Func<double> widthCompiled = width != null ? width.Compile() : () => view.Measure(Parent.Width, Parent.Height, MeasureFlags.IncludeMargins).Request.Width;
374 Func<double> heightCompiled = height != null ? height.Compile() : () => view.Measure(Parent.Width, Parent.Height, MeasureFlags.IncludeMargins).Request.Height;
Xaml\TypeConversionExtensions.cs (7)
45 internal static object ConvertTo(this object value, Type toType, Func<ParameterInfo> pinfoRetriever,
48 Func<TypeConverter> getConverter = () =>
62 internal static object ConvertTo(this object value, Type toType, Func<MemberInfo> minfoRetriever,
65 Func<TypeConverter> getConverter = () =>
118 ret = value.ConvertTo(toType, (Func<TypeConverter>)null, serviceProvider, out exception);
123 Func<TypeConverter> getConverter = () => (TypeConverter)Activator.CreateInstance(convertertype);
130 internal static object ConvertTo(this object value, Type toType, Func<TypeConverter> getConverter,
Microsoft.Maui.Controls.Build.Tasks (1)
Microsoft.Maui.Controls.Xaml (5)
ApplyPropertiesVisitor.cs (4)
174 addMethod.Invoke(source, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, new XamlServiceProvider(node, Context), out xpe) });
587 Func<MemberInfo> minforetriever;
753 addMethod.Invoke(collection, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, serviceProvider, out exception) });
821 addMethod.Invoke(collection, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, serviceProvider, out exception) });
Microsoft.Maui.Essentials (3)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
Microsoft.Maui.Resizetizer (3)
Microsoft.ML.AutoML.Tests (3)
Microsoft.ML.Core (12)
Microsoft.ML.Core.Tests (13)
UnitTests\CoreBaseTestClass.cs (13)
29protected Func<bool> GetIdComparer(DataViewRow r1, DataViewRow r2, out ValueGetter<DataViewRowId> idGetter)
45protected Func<bool> GetComparerOne<T>(DataViewRow r1, DataViewRow r2, int col, Func<T, T, bool> fn)
68protected Func<bool> GetComparerVec<T>(DataViewRow r1, DataViewRow r2, int col, int size, Func<T, T, bool> fn)
83protected Func<bool> GetColumnComparer(DataViewRow r1, DataViewRow r2, int col, DataViewType type, bool exactDoubles)
250Func<bool>[] comps = new Func<bool>[colLim];
269Func<bool> idComp = checkId ? GetIdComparer(curs1, curs2, out idGetter) : null;
309var comp = comps[col];
341Func<bool>[] comps = new Func<bool>[colLim];
343Func<bool>[] idComps = new Func<bool>[cursors.Length];
381var comp = comps[col];
Microsoft.ML.CpuMath (3)
Microsoft.ML.Data (35)
Microsoft.ML.FastTree (3)
Microsoft.ML.Predictor.Tests (2)
Microsoft.ML.TestFramework (13)
DataPipe\TestDataPipeBase.cs (13)
707Func<bool>[] comps = new Func<bool>[colLim];
726Func<bool> idComp = checkId ? GetIdComparer(curs1, curs2, out idGetter) : null;
767var comp = comps[col];
799Func<bool>[] comps = new Func<bool>[colLim];
801Func<bool>[] idComps = new Func<bool>[cursors.Length];
839var comp = comps[col];
865protected Func<bool> GetIdComparer(DataViewRow r1, DataViewRow r2, out ValueGetter<DataViewRowId> idGetter)
881protected Func<bool> GetColumnComparer(DataViewRow r1, DataViewRow r2, int col, DataViewType type, bool exactDoubles)
1000protected Func<bool> GetComparerOne<T>(DataViewRow r1, DataViewRow r2, int col, Func<T, T, bool> fn)
1017protected Func<bool> GetComparerVec<T>(DataViewRow r1, DataViewRow r2, int col, int size, Func<T, T, bool> fn)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tests (3)
Microsoft.ML.TimeSeries (2)
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.ML.Tokenizers.Tests (1)
Microsoft.ML.TorchSharp (2)
Microsoft.ML.Transforms (17)
Microsoft.VisualBasic.Tests (2)
Microsoft.VisualStudio.LanguageServices (8)
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.Implementation (6)
mscorlib (1)
Mvc.Api.Analyzers.Test (1)
netstandard (1)
PresentationCore (6)
PresentationFramework (21)
Roslyn.Diagnostics.Analyzers (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Roslyn.Diagnostics.CSharp.Analyzers (1)
Roslyn.VisualStudio.DiagnosticsWindow (1)
ScenarioTests.Common.Tests (1)
SimpleWebSiteWithWebApplicationBuilderException (1)
Sockets.BindTests (2)
Sockets.FunctionalTests (6)
Swaggatherer (7)
System.ComponentModel.Annotations (5)
System.ComponentModel.Composition (16)
System.Composition.Hosting (3)
System.Composition.Runtime (3)
System.Configuration.ConfigurationManager (1)
System.Core (1)
System.Diagnostics.DiagnosticSource (53)
System\Diagnostics\Metrics\Meter.cs (19)
266public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit = null, string? description = null) where T : struct =>
280public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
294public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit = null, string? description = null) where T : struct =>
308public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
321public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
335public ObservableUpDownCounter<T> CreateObservableUpDownCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
348public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<T> observeValue, string? unit = null, string? description = null) where T : struct =>
362public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
375public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit = null, string? description = null) where T : struct =>
389public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
403public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
417public ObservableCounter<T> CreateObservableCounter<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
427public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<T> observeValue, string? unit = null, string? description = null) where T : struct =>
438public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
448public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<Measurement<T>> observeValue, string? unit = null, string? description = null) where T : struct =>
459public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
469public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit = null, string? description = null) where T : struct =>
480public ObservableGauge<T> CreateObservableGauge<T>(string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct =>
544private Instrument GetOrCreateInstrument<T>(Type instrumentType, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags, Func<Instrument> instrumentCreator)
System\Diagnostics\Metrics\ObservableCounter.cs (6)
20internal ObservableCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
24internal ObservableCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
30internal ObservableCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
34internal ObservableCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
40internal ObservableCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null)
44internal ObservableCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableGauge.cs (6)
20internal ObservableGauge(Meter meter, string name, Func<T> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
24internal ObservableGauge(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
30internal ObservableGauge(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
34internal ObservableGauge(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
40internal ObservableGauge(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null)
44internal ObservableGauge(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableUpDownCounter.cs (6)
20internal ObservableUpDownCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
24internal ObservableUpDownCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
30internal ObservableUpDownCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null)
34internal ObservableUpDownCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
40internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null)
44internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System.Drawing.Common.Tests (12)
System.Linq.Expressions (5)
System.Linq.Parallel (3)
System.Linq.Queryable (5)
System.Net.Http (9)
System.Net.Quic (2)
System.Net.Security (2)
System.Private.CoreLib (69)
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (11)
81/// <param name="valueFactory">The <see cref="Func{T}"/> invoked to initialize the
102public static T EnsureInitialized<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class =>
112private static T EnsureInitializedCore<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class
190/// <param name="valueFactory">The <see cref="Func{T}"/> invoked to initialize the
193public static T EnsureInitialized<T>([AllowNull] ref T target, ref bool initialized, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock, Func<T> valueFactory)
214/// The <see cref="Func{T}"/> to invoke in order to produce the lazily-initialized value.
217private static T EnsureInitializedCore<T>([AllowNull] ref T target, ref bool initialized, [NotNull] ref object? syncLock, Func<T> valueFactory)
240/// <param name="valueFactory">The <see cref="Func{T}"/> invoked to initialize the reference.</param>
242public static T EnsureInitialized<T>([NotNull] ref T? target, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock, Func<T> valueFactory) where T : class =>
254/// The <see cref="Func{T}"/> to invoke in order to produce the lazily-initialized value.
257private static T EnsureInitializedCore<T>([NotNull] ref T? target, [NotNull] ref object? syncLock, Func<T> valueFactory) where T : class
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (7)
105public Task(Func<TResult> function)
126public Task(Func<TResult> function, CancellationToken cancellationToken)
150public Task(Func<TResult> function, TaskCreationOptions creationOptions)
177public Task(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions)
284internal Task(Func<TResult> valueSelector, Task? parent, CancellationToken cancellationToken,
308internal static Task<TResult> StartNew(Task? parent, Func<TResult> function, CancellationToken cancellationToken,
484if (m_action is Func<TResult> func)
System.Private.DataContractSerialization (5)
System.Private.Windows.Core.TestUtilities (1)
System.Private.Xml (3)
System.Reflection.Metadata (3)
System.Reflection.MetadataLoadContext (5)
System.Runtime (1)
System.Runtime.InteropServices.JavaScript (2)
System.Security.Claims (2)
System.Security.Cryptography (5)
System.Security.Principal.Windows (3)
System.ServiceModel.Primitives (12)
System.Text.Json (33)
System.Text.RegularExpressions (1)
System.Text.RegularExpressions.Generator (1)
System.Threading.Tasks.Dataflow (1)
System.Threading.Tasks.Parallel (17)
System\Threading\Tasks\Parallel.cs (17)
692Func<TLocal> localInit,
745Func<TLocal> localInit,
809Func<TLocal> localInit,
874Func<TLocal> localInit,
920Func<TLocal>? localInit, Action<TLocal>? localFinally)
1416public static ParallelLoopResult ForEach<TSource, TLocal>(IEnumerable<TSource> source, Func<TLocal> localInit,
1481ParallelOptions parallelOptions, Func<TLocal> localInit,
1535public static ParallelLoopResult ForEach<TSource, TLocal>(IEnumerable<TSource> source, Func<TLocal> localInit,
1599public static ParallelLoopResult ForEach<TSource, TLocal>(IEnumerable<TSource> source, ParallelOptions parallelOptions, Func<TLocal> localInit,
1643Func<TLocal>? localInit, Action<TLocal>? localFinally)
1701Func<TLocal>? localInit, Action<TLocal>? localFinally)
1760Func<TLocal>? localInit, Action<TLocal>? localFinally)
2022Func<TLocal> localInit,
2100Func<TLocal> localInit,
2396Func<TLocal> localInit,
2487Func<TLocal> localInit,
2514Func<TLocal>? localInit,
System.Windows.Controls.Ribbon (4)
System.Windows.Forms (4)
System.Windows.Forms.Design (1)
System.Windows.Forms.Primitives (1)
System.Windows.Forms.Primitives.Tests (4)
System.Windows.Forms.Primitives.TestUtilities (5)
System.Windows.Forms.Tests (27)
System.Windows.Forms.UI.IntegrationTests (6)
System.Windows.Input.Manipulations (7)
System.Xaml (4)
System.Xaml.Tests (2)
Templates.Blazor.Tests (8)
Templates.Blazor.WebAssembly.Auth.Tests (22)
src\Shared\E2ETesting\WaitAssert.cs (14)
26public static void Equal<T>(this IWebDriver driver, T expected, Func<T> actual)
29public static void NotEqual<T>(this IWebDriver driver, T expected, Func<T> actual)
32public static void True(this IWebDriver driver, Func<bool> actual)
35public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout)
38public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout, string message)
40public static void True(this IWebDriver driver, Func<bool> actual, string message)
43public static void False(this IWebDriver driver, Func<bool> actual, string message)
46public static void False(this IWebDriver driver, Func<bool> actual)
49public static void Contains(this IWebDriver driver, string expectedSubstring, Func<string> actualString)
52public static void Collection<T>(this IWebDriver driver, Func<IEnumerable<T>> actualValues, params Action<T>[] elementInspectors)
55public static void Empty(this IWebDriver driver, Func<IEnumerable> actualValues)
58public static void Single(this IWebDriver driver, Func<IEnumerable> actualValues)
64public static TElement Exists<TElement>(this IWebDriver driver, Func<TElement> actual, TimeSpan timeout)
94private static TResult WaitAssertCore<TResult>(IWebDriver driver, Func<TResult> assertion, TimeSpan timeout = default)
Templates.Blazor.WebAssembly.Tests (22)
src\Shared\E2ETesting\WaitAssert.cs (14)
26public static void Equal<T>(this IWebDriver driver, T expected, Func<T> actual)
29public static void NotEqual<T>(this IWebDriver driver, T expected, Func<T> actual)
32public static void True(this IWebDriver driver, Func<bool> actual)
35public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout)
38public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout, string message)
40public static void True(this IWebDriver driver, Func<bool> actual, string message)
43public static void False(this IWebDriver driver, Func<bool> actual, string message)
46public static void False(this IWebDriver driver, Func<bool> actual)
49public static void Contains(this IWebDriver driver, string expectedSubstring, Func<string> actualString)
52public static void Collection<T>(this IWebDriver driver, Func<IEnumerable<T>> actualValues, params Action<T>[] elementInspectors)
55public static void Empty(this IWebDriver driver, Func<IEnumerable> actualValues)
58public static void Single(this IWebDriver driver, Func<IEnumerable> actualValues)
64public static TElement Exists<TElement>(this IWebDriver driver, Func<TElement> actual, TimeSpan timeout)
94private static TResult WaitAssertCore<TResult>(IWebDriver driver, Func<TResult> assertion, TimeSpan timeout = default)
Templates.Mvc.Tests (22)
src\Shared\E2ETesting\WaitAssert.cs (14)
26public static void Equal<T>(this IWebDriver driver, T expected, Func<T> actual)
29public static void NotEqual<T>(this IWebDriver driver, T expected, Func<T> actual)
32public static void True(this IWebDriver driver, Func<bool> actual)
35public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout)
38public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout, string message)
40public static void True(this IWebDriver driver, Func<bool> actual, string message)
43public static void False(this IWebDriver driver, Func<bool> actual, string message)
46public static void False(this IWebDriver driver, Func<bool> actual)
49public static void Contains(this IWebDriver driver, string expectedSubstring, Func<string> actualString)
52public static void Collection<T>(this IWebDriver driver, Func<IEnumerable<T>> actualValues, params Action<T>[] elementInspectors)
55public static void Empty(this IWebDriver driver, Func<IEnumerable> actualValues)
58public static void Single(this IWebDriver driver, Func<IEnumerable> actualValues)
64public static TElement Exists<TElement>(this IWebDriver driver, Func<TElement> actual, TimeSpan timeout)
94private static TResult WaitAssertCore<TResult>(IWebDriver driver, Func<TResult> assertion, TimeSpan timeout = default)
Templates.Tests (22)
src\Shared\E2ETesting\WaitAssert.cs (14)
26public static void Equal<T>(this IWebDriver driver, T expected, Func<T> actual)
29public static void NotEqual<T>(this IWebDriver driver, T expected, Func<T> actual)
32public static void True(this IWebDriver driver, Func<bool> actual)
35public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout)
38public static void True(this IWebDriver driver, Func<bool> actual, TimeSpan timeout, string message)
40public static void True(this IWebDriver driver, Func<bool> actual, string message)
43public static void False(this IWebDriver driver, Func<bool> actual, string message)
46public static void False(this IWebDriver driver, Func<bool> actual)
49public static void Contains(this IWebDriver driver, string expectedSubstring, Func<string> actualString)
52public static void Collection<T>(this IWebDriver driver, Func<IEnumerable<T>> actualValues, params Action<T>[] elementInspectors)
55public static void Empty(this IWebDriver driver, Func<IEnumerable> actualValues)
58public static void Single(this IWebDriver driver, Func<IEnumerable> actualValues)
64public static TElement Exists<TElement>(this IWebDriver driver, Func<TElement> actual, TimeSpan timeout)
94private static TResult WaitAssertCore<TResult>(IWebDriver driver, Func<TResult> assertion, TimeSpan timeout = default)
Test.Utilities (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
Text.Analyzers (19)
src\Dependencies\PooledObjects\PooledDelegates.cs (6)
171/// Gets a <see cref="Func{TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the
200public static Releaser GetPooledFunction<TArg, TResult>(Func<TArg, TResult> unboundFunction, TArg argument, out Func<TResult> boundFunction)
201=> GetPooledDelegate<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>(unboundFunction, argument, out boundFunction);
204/// Equivalent to <see cref="GetPooledFunction{TArg, TResult}(Func{TArg, TResult}, TArg, out Func{TResult})"/>,
412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>>
414protected override Func<TResult> Bind()
UnitTests.Common (11)
VBCSCompiler (1)
VBCSCompiler.UnitTests (5)
Wasm.Performance.ConsoleHost (10)
WindowsBase.Tests (4)
XmlFileLogger (1)
xunit.assert (21)
xunit.console (3)