10963 references to Func
aspire (149)
Agents\AgentEnvironmentApplicator.cs (2)
11private readonly Func<CancellationToken, Task> _applyCallback; 22Func<CancellationToken, Task> applyCallback,
Agents\McpConfigFileHelper.cs (2)
24public static bool HasServerConfigured(string configFilePath, string serverContainerKey, string serverName, Func<string, string>? preprocessContent = null) 68public static async Task<JsonObject> ReadConfigAsync(string configFilePath, Func<string, string>? preprocessContent, CancellationToken cancellationToken)
Backchannel\AppHostConnectionResolver.cs (1)
325Func<string, string> formatPath,
Backchannel\ExtensionBackchannel.cs (10)
34Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 35Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 37Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 38Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 64private readonly Func<CancellationToken, Task>? _connectCoreAsyncOverride; 75Func<CancellationToken, Task>? connectCoreAsyncOverride) 500public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 530public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 584public async Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken) 610public async Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken)
Backchannel\ExtensionRpcTarget.cs (2)
14Func<string, ValidationResult>? ValidationFunction { get; set; } 34public Func<string, ValidationResult>? ValidationFunction { get; set; }
Certificates\CertificateGeneration\UnixCertificateManager.cs (2)
48private readonly Func<string, ProcessStartInfo> _createCertUtilStartInfo = CreateCertUtilStartInfo; 55internal UnixCertificateManager(ILogger logger, IEnvironment environment, Func<string, ProcessStartInfo> createCertUtilStartInfo)
Commands\AddCommand.cs (1)
668var rootChoices = new List<(string Label, Func<CancellationToken, Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>> Action)>();
Commands\AgentInitCommand.cs (4)
105Func<SkillDefinition, bool>? selectByDefault, 199Func<SkillDefinition, bool>? selectByDefault, 686private static IReadOnlyList<SkillDefinition> GetDefaultSkills(IEnumerable<SkillDefinition> availableSkills, Func<SkillDefinition, bool>? selectByDefault) 692var predicate = selectByDefault ?? (static skill => skill.IsDefault);
Commands\AgentTelemetryCommand.cs (1)
145private static void AddIfValid(List<(string Name, string Value)> tags, string name, string? value, Func<string, bool> isValid)
Commands\CacheCommand.cs (1)
80internal static int ClearDirectoryContents(DirectoryInfo? directory, Func<FileInfo, bool>? skipFile = null)
Commands\NewCommand.cs (6)
655Task<string> PromptForOutputPath(string v, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default); 725var rootChoices = new List<(string Label, Func<CancellationToken, Task<(NuGetPackage, PackageChannel)>> Action)>(); 768public virtual async Task<string> PromptForOutputPath(string path, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default) 770var resolvedValidator = validator;
Commands\RootCommand.cs (1)
106private static readonly (Option Option, Func<ParseResult, string[]?> GetArgs)[] s_childProcessOptions =
Commands\TelemetryLogsCommand.cs (2)
177Func<IOtlpResource, string> getResourceName = s => OtlpHelpers.GetResourceName(s, allResources); 202Func<IOtlpResource, string> getResourceName = s => OtlpHelpers.GetResourceName(s, allResources);
Commands\TelemetrySpansCommand.cs (2)
169Func<IOtlpResource, string> getResourceName = s => OtlpHelpers.GetResourceName(s, allResources); 194Func<IOtlpResource, string> getResourceName = s => OtlpHelpers.GetResourceName(s, allResources);
Commands\TelemetryTracesCommand.cs (2)
162Func<IOtlpResource, string> getResourceName = s => OtlpHelpers.GetResourceName(s, allOtlpResources); 215Func<IOtlpResource, string> getResourceName = s => OtlpHelpers.GetResourceName(s, allOtlpResources);
DotNet\DotNetCliRunner.cs (1)
115public Func<string, bool>? EnvironmentVariableFilter { get; set; }
DotNet\ProcessExecutionFactory.cs (1)
178private static void ApplyEnvironmentVariableFilter(IsolatedProcessStartInfo startInfo, Func<string, bool>? environmentVariableFilter)
Interaction\ConsoleInteractionService.cs (12)
144public async Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 218public async Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 281public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 286public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 350public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 642public async Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback) 765internal static T? MatchChoice<T>(string value, IEnumerable<T> choices, Func<T, string> choiceFormatter) where T : notnull 771internal static IReadOnlyList<T>? MatchChoices<T>(string commaSeparatedValues, IReadOnlyList<T> choices, Func<T, string> choiceFormatter) where T : notnull 809internal void ValidateResolvedStringValue(string value, bool required, Func<string, ValidationResult>? validator, string symbolDisplayName) 828internal void ThrowNonInteractiveInvalidValue<T>(string value, string symbolDisplayName, IEnumerable<T> choices, Func<T, string> choiceFormatter) where T : notnull 840internal T MatchChoiceOrThrow<T>(string value, PromptBinding<string?> binding, IEnumerable<T> choices, Func<T, string> choiceFormatter) where T : notnull 852internal IReadOnlyList<T> MatchChoicesOrThrow<T>(string value, PromptBinding<string?> binding, IEnumerable<T> choices, Func<T, string> choiceFormatter) where T : notnull
Interaction\ExtensionInteractionService.cs (6)
97public async Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 138public async Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 195public async Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 301public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 339public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 527public Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback)
Interaction\IInteractionService.cs (6)
24Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null); 25Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default); 26Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default); 28Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull; 29Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull; 41Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback);
Interaction\PromptBinding.cs (6)
16private readonly Func<ParseResult, (bool WasProvided, T? Value)> _resolver; 22Func<ParseResult, (bool WasProvided, T? Value)> resolver, 32Func<ParseResult, (bool WasProvided, T? Value)> resolver, 163private static Func<ParseResult, (bool, TResult?)> BuildResolver<TOption, TResult>( 164Option<TOption> option, Func<TOption?, TResult?> transform) => 176private static Func<ParseResult, (bool, T?)> BuildOptionResolver<T>(Option<T> option) =>
Npm\INpmProvenanceChecker.cs (1)
203Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, string? sriIntegrity, CancellationToken cancellationToken);
Npm\SigstoreNpmProvenanceChecker.cs (2)
66Func<WorkflowRefInfo, bool>? validateWorkflowRef, 463Func<WorkflowRefInfo, bool>? validateWorkflowRef)
NuGet\BundleNuGetPackageCache.cs (3)
94Func<string, bool>? filter, 280private IEnumerable<NuGetPackage> FilterPackages(IEnumerable<NuGetPackage> packages, Func<string, bool>? filter) 283var effectiveFilter = (NuGetPackage p) =>
NuGet\NuGetPackageCache.cs (4)
20Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken); 118public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string query, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 168var effectiveFilter = (NuGetPackage p) => 220var effectiveFilter = (NuGetPackage p) =>
Processes\IAppHostStopper.cs (1)
17Func<CancellationToken, Task<bool>>? requestRpcStopAsync,
Processes\IsolatedProcess.cs (2)
112private Func<CancellationToken, Task>? _waitForExitProvider; 448Func<CancellationToken, Task>? WaitForExitProvider = null,
Processes\ProcessTreeGracefulShutdownService.cs (6)
45Func<CancellationToken, Task<bool>>? requestRpcStopAsync, 77Func<CancellationToken, Task<bool>> requestGracefulShutdownAsync, 90Func<CancellationToken, Task<bool>> requestGracefulShutdownAsync, 136Func<CancellationToken, Task<bool>>? requestRpcStopAsync, 183Func<CancellationToken, Task<bool>> requestGracefulShutdownAsync, 197private async Task<bool> TryRequestRpcStopAsync(Func<CancellationToken, Task<bool>> requestRpcStopAsync, CancellationToken cancellationToken)
Program.cs (2)
577builder.Services.AddSingleton<Func<LanguageInfo, GuestAppHostProject>>(sp => 885private static bool ContainsRootOption(string[] args, Func<string, bool> predicate)
Projects\AppHostProjectFactory.cs (2)
14private readonly Func<LanguageInfo, GuestAppHostProject> _guestProjectFactory; 20Func<LanguageInfo, GuestAppHostProject> guestProjectFactory,
Projects\GuestRuntime.cs (2)
23private readonly Func<string, string?> _commandResolver; 36public GuestRuntime(RuntimeSpec spec, ILogger logger, Func<string, string?> commandResolver, IEnvironment environment, ProfilingTelemetry profilingTelemetry, FileLoggerProvider? fileLoggerProvider = null)
Projects\ProcessGuestLauncher.cs (2)
21private readonly Func<string, string?> _commandResolver; 28Func<string, string?> commandResolver,
src\Shared\ConsoleLogs\LogParser.cs (1)
43Func<string, string> callback = (s) =>
src\Shared\ConsoleLogs\PromptContext.cs (1)
31public string? AddValue<T>(string? input, Func<T, string> getKey, T instance)
src\Shared\ConsoleLogs\SharedAIHelpers.cs (15)
60Func<IOtlpResource, string> getResourceName, 89Func<IOtlpResource, string> getResourceName, 109Func<IOtlpResource, string> getResourceName, 138Func<IOtlpResource, string> getResourceName, 155Func<IOtlpResource, string> getResourceName, 169Func<IOtlpResource, string> getResourceName, 183Func<IOtlpResource, string> getResourceName, 197Func<IOtlpResource, string>? getResourceName = null, 211Func<IOtlpResource, string> getResourceName, 380Func<IOtlpResource, string> getResourceName, 712Func<IOtlpResource, string> getResourceName, 811Func<T, TResult> convertToDto, 812Func<TResult, int> estimateTokenSize) 826Func<T, TResult> convertToDto, 827Func<TResult, int> estimateTokenSize)
src\Shared\ConsoleLogs\UrlParser.cs (2)
16public static bool TryParse(string? text, Func<string, string>? nonMatchFragmentCallback, [NotNullWhen(true)] out string? modifiedText) 57static void AppendNonMatchFragment(StringBuilder stringBuilder, Func<string, string>? nonMatchFragmentCallback, string text)
src\Shared\EnumerableExtensions.cs (2)
16Func<TSource, TKey> keySelector, 17Func<TSource, TValue> valueSelector) where TKey : notnull
src\Shared\PackageUpdateHelpers.cs (1)
179internal static string ExtractJsonPayload(string stdout, Func<JsonElement, bool> isExpectedPayload)
src\Shared\ParentProcessLivenessMonitor.cs (3)
22Func<CancellationToken, Task> onParentExited, 44Func<CancellationToken, Task> onParentExited, 54Func<CancellationToken, Task> onParentExited,
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
src\Shared\SearchTextParser.cs (1)
135public static SearchFilter ParseSearch([NotNullWhen(true)] string? search, Func<string, bool>? isKnownKey = null)
Telemetry\InternalMicrosoftDetector.cs (1)
1334internal sealed record InternalMicrosoftProbe(string Name, Func<CancellationToken, Task<InternalMicrosoftProbeResult>> DetectAsync);
Templating\CallbackTemplate.cs (1)
16Func<string, bool>? supportsLanguageCallback = null,
Templating\CliTemplateFactory.cs (3)
261var outputPathResolver = OutputPathHelper.CreateProjectNameSubdirectoryOutputPathResolver(createProjectNameSubdirectory, projectName); 268var outputPathValidator = OutputPathHelper.CreateOutputPathValidator(_executionContext.WorkingDirectory.FullName); 302private async Task CopyTemplateTreeToDiskAsync(string templateRoot, string outputPath, Func<string, string> tokenReplacer, CancellationToken cancellationToken)
Templating\DotNetTemplateFactory.cs (2)
618var outputPathResolver = OutputPathHelper.CreateProjectNameSubdirectoryOutputPathResolver(createProjectNameSubdirectory, projectName); 625var validator = OutputPathHelper.CreateOutputPathValidator(executionContext.WorkingDirectory.FullName);
Templating\OutputPathHelper.cs (2)
74internal static Func<string, ValidationResult> CreateOutputPathValidator(string workingDirectory) 112internal static Func<string, string>? CreateProjectNameSubdirectoryOutputPathResolver(bool createProjectNameSubdirectory, string projectName)
Tui\TerminalViewerApp.cs (1)
234return (Func<RootContext, Hex1bWidget>)(ctx => Render(ctx));
Utils\CommandPathResolver.cs (1)
42Func<string, string?> commandResolver,
Utils\EnvironmentChecker\DeprecatedWorkloadCheck.cs (2)
22private readonly Func<ProcessStartInfo, Process?> _startProcess = Process.Start; 24internal DeprecatedWorkloadCheck(ILogger<DeprecatedWorkloadCheck> logger, IEnvironment environment, Func<ProcessStartInfo, Process?> startProcess)
Utils\EnvironmentChecker\TypeScriptAppHostToolingCheck.cs (2)
20private readonly Func<string, string?> _commandResolver; 38Func<string, string?> commandResolver)
Utils\EnvironmentChecker\VsCodeExtensionCheck.cs (4)
33private readonly Func<string, string?> _commandResolver; 42internal VsCodeExtensionCheck(IEnvironment environment, CliExecutionContext executionContext, Func<string, string?> commandResolver) 107internal static VsCodeExtensionDetection Detect(IEnvironment environment, DirectoryInfo homeDirectory, Func<string, string?> commandResolver) 119private static bool IsVsCodeInstalled(IEnvironment environment, Func<string, string?> commandResolver)
Utils\VersionHelper.cs (1)
37Func<T, string?> versionSelector,
aspire-managed (5)
src\Shared\ParentProcessLivenessMonitor.cs (3)
22Func<CancellationToken, Task> onParentExited, 44Func<CancellationToken, Task> onParentExited, 54Func<CancellationToken, Task> onParentExited,
src\Shared\ParentProcessWatchdog.cs (2)
68internal static long? GetExpectedParentStartTimeUnix(Func<string, string?> getEnvironmentVariable, out bool useRuntimeStartTime) 76Func<string, string?> getEnvironmentVariable,
Aspire.Azure.Messaging.EventHubs.Tests (2)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (2)
15private readonly Func<HttpMessage, MockResponse> _responseFactory; 31public MockTransport(Func<MockRequest, MockResponse> responseFactory)
Aspire.Azure.Security.KeyVault.Tests (2)
MockTransport.cs (2)
15private readonly Func<HttpMessage, MockResponse> _responseFactory; 31public MockTransport(Func<MockRequest, MockResponse> responseFactory)
Aspire.Cli.Tests (252)
Agents\PlaywrightCliInstallerTests.cs (2)
1042public Func<WorkflowRefInfo, bool>? CapturedValidateWorkflowRef { get; private set; } 1045public Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, string? sriIntegrity, CancellationToken cancellationToken)
Backchannel\ExtensionBackchannelTests.cs (1)
152Func<CancellationToken, Task>? connectCoreAsyncOverride = null)
Commands\AddCommandTests.cs (3)
2949Func<FileInfo?, NuGetPackage[]> searchCallback, 3559public Func<IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>, (string FriendlyName, NuGetPackage Package, PackageChannel Channel)>? PromptForIntegrationCallback { get; set; } 3560public Func<IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>, (string FriendlyName, NuGetPackage Package, PackageChannel Channel)>? PromptForIntegrationVersionCallback { get; set; }
Commands\AppHostLauncherTests.cs (1)
1295public Func<string, IReadOnlyList<string>, string, Func<string, bool>?, IReadOnlyDictionary<string, string>?, CancellationToken, Task<IProcessExecution>>? StartHandler { get; set; }
Commands\DeployCommandTests.cs (1)
594public Func<IEnumerable<string>, string>? PromptForPublisherCallback { get; set; }
Commands\NewCommandTests.cs (3)
2815async Task AssertOutputPathAsync(Func<string, string> selectedPathFactory, Func<string, string> expectedPathFactory) 3514var validator = OutputPathHelper.CreateOutputPathValidator(workspace.WorkspaceRoot.FullName);
Commands\PublishCommandPromptingIntegrationTests.cs (6)
1161public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 1177public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 1180public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 1200public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 1238public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) => action(_ => { }); 1256public Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback) => callback(_ => { });
Commands\PublishCommandTests.cs (1)
236public Func<IEnumerable<string>, string>? PromptForPublisherCallback { get; set; }
Commands\RunCommandTests.cs (67)
312var runnerFactory = (IServiceProvider sp) => 718var runnerFactory = (IServiceProvider sp) => 1287var runnerFactory = (IServiceProvider sp) => 1297var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2061var backchannelFactory = (IServiceProvider sp) => 2071var runnerFactory = (IServiceProvider sp) => 2096var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2127var backchannelFactory = (IServiceProvider sp) => 2136var runnerFactory = (IServiceProvider sp) => 2205var runnerFactory = (IServiceProvider sp) => 2251var runnerFactory = (IServiceProvider sp) => 2299var runnerFactory = (IServiceProvider sp) => 2343var runnerFactory = (IServiceProvider sp) => 2392var backchannelFactory = (IServiceProvider sp) => 2402var runnerFactory = (IServiceProvider sp) => 2419var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2487var backchannelFactory = (IServiceProvider sp) => 2503var runnerFactory = (IServiceProvider sp) => 2528var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2606var backchannelFactory = (IServiceProvider sp) => appHostBackchannel; 2608var extensionInteractionServiceFactory = (IServiceProvider sp) => new TestExtensionInteractionService(sp); 2610var runnerFactory = (IServiceProvider sp) => 2629var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2676var backchannelFactory = (IServiceProvider sp) => appHostBackchannel; 2678var extensionInteractionServiceFactory = (IServiceProvider sp) => new TestExtensionInteractionService(sp); 2680var runnerFactory = (IServiceProvider sp) => 2699var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2747var backchannelFactory = (IServiceProvider sp) => appHostBackchannel; 2749var extensionInteractionServiceFactory = (IServiceProvider sp) => new TestExtensionInteractionService(sp); 2751var runnerFactory = (IServiceProvider sp) => { 2768var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2811var extensionInteractionServiceFactory = (IServiceProvider sp) => new TestExtensionInteractionService(sp); 2813var runnerFactory = (IServiceProvider sp) => 2830var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 2873var runnerFactory = (IServiceProvider sp) => 2936var runnerFactory = (IServiceProvider sp) => 2960var backchannelFactory = (IServiceProvider sp) => 2993var runnerFactory = (IServiceProvider sp) => 3017var backchannelFactory = (IServiceProvider sp) => 3024var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3052var runnerFactory = (IServiceProvider sp) => 3072var backchannelFactory = (IServiceProvider sp) => 3079var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3105var runnerFactory = (IServiceProvider sp) => 3129var backchannelFactory = (IServiceProvider sp) => 3136var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3164var runnerFactory = (IServiceProvider sp) => 3188var backchannelFactory = (IServiceProvider sp) => 3195var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3573var backchannelFactory = (IServiceProvider sp) => 3580var runnerFactory = (IServiceProvider sp) => 3603var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3641var backchannelFactory = (IServiceProvider sp) => 3648var runnerFactory = (IServiceProvider sp) => 3684var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3742var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 3745var featuresFactory = (IServiceProvider sp) => new TestFeatures() 4110var backchannelFactory = (IServiceProvider sp) => appHostBackchannel; 4112var extensionInteractionServiceFactory = (IServiceProvider sp) => 4122var runnerFactory = (IServiceProvider sp) => 4137var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 4184var backchannelFactory = (IServiceProvider sp) => appHostBackchannel; 4186var extensionInteractionServiceFactory = (IServiceProvider sp) => 4196var runnerFactory = (IServiceProvider sp) => 4212var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator(); 4249var runnerFactory = (IServiceProvider sp) => 4256var projectLocatorFactory = (IServiceProvider sp) => new TestProjectLocator();
Commands\SdkDumpCommandTests.cs (1)
252using var result = RemoteExecutor.Invoke((Func<string, Task>)(async (baseDirectory) =>
Commands\TypeScriptAppHostToolingCheckTests.cs (1)
182Func<string, string?> commandResolver)
Commands\UpdateCommandTests.cs (7)
2408Func<object, string>? capturedFormatter = null; 3518public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) => _innerService.ShowDynamicStatusAsync(initialStatusText, action, emoji); 3520public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 3522public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 3526public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 3528public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 3552public Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback) => _innerService.DisplayLiveAsync(initialRenderable, callback);
DotNet\ProcessExecutionDetachedTests.cs (1)
484Func<string, bool>? environmentVariableFilter = null,
Interaction\ConsoleInteractionServiceTests.cs (3)
1200Func<string, string> choiceFormatter = item => $"[bold]{item}[/] (Aspire.Hosting.{item})"; 1329Func<string, ValidationResult> validator = v => 1357Func<string, ValidationResult> validator = v =>
Packaging\PackagingServiceTests.cs (1)
2338public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
ProfileCaptureServiceTests.cs (1)
585Func<HttpRequestMessage, HttpResponseMessage> telemetryResponseFactory,
Projects\ExtensionGuestLauncherTests.cs (6)
165public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) => throw new NotImplementedException(); 167public Task<string> PromptForStringAsync(string promptText, Func<string, Spectre.Console.ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 168public Task<string> PromptForFilePathAsync(string promptText, Func<string, Spectre.Console.ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 169public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull => throw new NotImplementedException(); 170public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull => throw new NotImplementedException(); 186public Task DisplayLiveAsync(Spectre.Console.Rendering.IRenderable initialRenderable, Func<Action<Spectre.Console.Rendering.IRenderable>, Task> callback) => throw new NotImplementedException();
Projects\GuestRuntimeTests.cs (2)
27Func<string, string?>? commandResolver = null) 37Func<string, string?>? commandResolver = null,
Projects\ProjectLocatorTests.cs (1)
2239private static ProjectLocator CreateProjectLocatorWithSingleFileEnabled(CliExecutionContext executionContext, Func<FileInfo, AppHostValidationResult>? validateCallback = null)
Templating\DotNetTemplateFactoryTests.cs (8)
376public Task<T> PromptForSelectionAsync<T>(string prompt, IEnumerable<T> choices, Func<T, string> displaySelector, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 379public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 382public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 385public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 394public Task<TResult> ShowDynamicStatusAsync<TResult>(string initialStatusText, Func<Action<string>, Task<TResult>> action, KnownEmoji? emoji = null) 418public Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback) => callback(_ => { }); 486public Task<string> PromptForOutputPath(string defaultPath, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default)
Templating\OutputPathHelperTests.cs (3)
134var validator = OutputPathHelper.CreateOutputPathValidator(workspace.WorkspaceRoot.FullName); 147var validator = OutputPathHelper.CreateOutputPathValidator(workspace.WorkspaceRoot.FullName); 161var validator = OutputPathHelper.CreateOutputPathValidator(workspace.WorkspaceRoot.FullName);
tests\Shared\Logging\ITestSink.cs (2)
14Func<WriteContext, bool>? WriteEnabled { get; set; } 16Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\Logging\TestLogger.cs (2)
11private readonly Func<LogLevel, bool> _filter; 18public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
tests\Shared\Logging\TestSink.cs (4)
14Func<WriteContext, bool>? writeEnabled = null, 15Func<BeginScopeContext, bool>? beginEnabled = null) 24public Func<WriteContext, bool>? WriteEnabled { get; set; } 26public Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
TestServices\CallbackNuGetPackageCache.cs (1)
23public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
TestServices\FakeAppHostServerSession.cs (1)
28public Func<CancellationToken, Task<IAppHostRpcClient>>? GetRpcClientAsyncCallback { get; init; }
TestServices\FakeInstallationDiscovery.cs (1)
20public Func<CancellationToken, Task<IReadOnlyList<InstallationInfo>>>? DiscoverAllAsyncCallback { get; init; }
TestServices\FakeNuGetPackageCache.cs (2)
28public Func<DirectoryInfo, string, Func<string, bool>?, bool, FileInfo?, bool, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetPackagesAsyncCallback { get; set; } 30public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
TestServices\FakePlaywrightServices.cs (1)
36public Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, string? sriIntegrity, CancellationToken cancellationToken)
TestServices\RecordingGracefulSignaler.cs (2)
11private readonly Func<int, Task<bool>>? _onSignal; 14public RecordingGracefulSignaler(Func<int, Task<bool>>? onSignal = null)
TestServices\TestAppHostAuxiliaryBackchannel.cs (2)
42public Func<CancellationToken, Task<WaitForAppHostReadyResponse?>>? WaitForAppHostReadyHandler { get; set; } 63public Func<CancellationToken, Task<List<ResourceSnapshot>>>? GetResourceSnapshotsHandler { get; set; }
TestServices\TestAppHostCliBackchannel.cs (5)
16public Func<CancellationToken, Task<DashboardUrlsState>>? GetDashboardUrlsAsyncCallback { get; set; } 19public Func<CancellationToken, IAsyncEnumerable<RpcResourceState>>? GetResourceStatesAsyncCallback { get; set; } 22public Func<CancellationToken, IAsyncEnumerable<BackchannelLogEntry>>? GetAppHostLogEntriesAsyncCallback { get; set; } 29public Func<CancellationToken, IAsyncEnumerable<PublishingActivity>>? GetPublishingActivitiesAsyncCallback { get; set; } 32public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; }
TestServices\TestAppHostProjectFactory.cs (2)
20public Func<FileInfo, AppHostValidationResult>? ValidateAppHostCallback { get; set; } 25public Func<FileInfo, bool>? CanHandleCallback { get; set; }
TestServices\TestAppHostStopper.cs (3)
23public Func<AppHostInformation?, bool>? StopResultSelector { get; set; } 28public Func<AppHostInformation?, Exception?>? ThrowSelector { get; set; } 37Func<CancellationToken, Task<bool>>? requestRpcStopAsync,
TestServices\TestAuxiliaryBackchannelMonitor.cs (1)
30public Func<CancellationToken, Task>? ScanAsyncCallback { get; set; }
TestServices\TestCertificateToolRunner.cs (1)
19public Func<string, string?>? ExportDevCertificatePublicPemCallback { get; set; }
TestServices\TestConfigurationService.cs (1)
15public Func<string, string?>? OnGetConfiguration { get; set; }
TestServices\TestDotNetSdkInstaller.cs (1)
10public Func<CancellationToken, (bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)>? CheckAsyncCallback { get; set; }
TestServices\TestEnvironmentCheck.cs (1)
10Func<CancellationToken, Task<IReadOnlyList<EnvironmentCheckResult>>> checkAsync) : IEnvironmentCheck
TestServices\TestExtensionBackchannel.cs (15)
20public Func<string, Task>? DisplaySuccessAsyncCallback { get; set; } 23public Func<string, Task>? DisplaySubtleMessageAsyncCallback { get; set; } 26public Func<string, Task>? DisplayErrorAsyncCallback { get; set; } 38public Func<IEnumerable<DisplayLineState>, Task>? DisplayLinesAsyncCallback { get; set; } 41public Func<DashboardUrlsState, Task>? DisplayDashboardUrlsAsyncCallback { get; set; } 44public Func<string?, Task>? ShowStatusAsyncCallback { get; set; } 54public Func<string, string?, Func<string, ValidationResult>?, bool, Task<string>>? PromptForStringAsyncCallback { get; set; } 57public Func<string, Func<string, ValidationResult>?, bool, Task<string>>? PromptForSecretStringAsyncCallback { get; set; } 63public Func<string, Task>? OpenEditorAsyncCallback { get; set; } 69public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 83public Func<string, Task>? DisplayPlainTextAsyncCallback { get; set; } 163public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 175public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 195public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool required = false, CancellationToken cancellationToken = default) 203public Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool required = false, CancellationToken cancellationToken = default)
TestServices\TestExtensionInteractionService.cs (8)
27public Func<string, Func<string, ValidationResult>?, bool, bool, PromptBinding<string?>?, CancellationToken, Task<string>>? PromptForStringCallback { get; set; } 29public Func<IRenderable, Func<Action<IRenderable>, Task>, Task>? DisplayLiveAsyncCallback { get; set; } 46public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 56public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 66public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 71public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 92public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 207public Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback)
TestServices\TestGitRepository.cs (1)
10public Func<CancellationToken, Task<DirectoryInfo?>>? GetRootAsyncCallback { get; set; }
TestServices\TestInteractionService.cs (10)
39public Func<string, IEnumerable, Func<object, string>, CancellationToken, object>? PromptForSelectionCallback { get; set; } 44public Func<string, IEnumerable, Func<object, string>, CancellationToken, IReadOnlyList<object>>? PromptForSelectionsCallback { get; set; } 90public Task<T> ShowDynamicStatusAsync<T>(string initialStatusText, Func<Action<string>, Task<T>> action, KnownEmoji? emoji = null) 117public Task<string> PromptForStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, PromptBinding<string?>? binding = null, CancellationToken cancellationToken = default) 130public Task<string> PromptForFilePathAsync(string promptText, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, PromptBinding<string?>? binding = null, bool retryOnValidationFailure = false, CancellationToken cancellationToken = default) 143private Task<string> PromptForResponseAsync(Func<string, ValidationResult>? validator, PromptBinding<string?>? binding, CancellationToken cancellationToken) 168public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, PromptBinding<string?>? binding = null, bool echoSelected = true, CancellationToken cancellationToken = default) where T : notnull 209public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, PromptBinding<string?>? binding = null, bool echoSelected = true, IEnumerable<T>? bindingChoices = null, CancellationToken cancellationToken = default) where T : notnull 377public Task DisplayLiveAsync(IRenderable initialRenderable, Func<Action<IRenderable>, Task> callback) 403internal sealed record SelectionPromptCall<T>(string PromptText, IEnumerable<T> Choices, Func<T, string> ChoiceFormatter);
TestServices\TestLanguageService.cs (2)
10public Func<CancellationToken, Task<IAppHostProject?>>? GetConfiguredProjectAsyncCallback { get; set; } 12public Func<CancellationToken, Task<IAppHostProject>>? PromptForProjectAsyncCallback { get; set; }
TestServices\TestNewCommandPrompter.cs (8)
16public Func<IEnumerable<(NuGetPackage Package, PackageChannel Channel)>, (NuGetPackage Package, PackageChannel Channel)>? PromptForTemplatesVersionCallback { get; set; } 17public Func<ITemplate[], ITemplate>? PromptForTemplateCallback { get; set; } 18public Func<string, string>? PromptForProjectNameCallback { get; set; } 19public Func<string, string>? PromptForOutputPathCallback { get; set; } 20public Func<string, Func<string, ValidationResult>?, string>? PromptForOutputPathWithValidatorCallback { get; set; } 40public override Task<string> PromptForOutputPath(string path, ParseResult parseResult, Func<string, ValidationResult>? validator = null, Func<string, string>? outputPathResolver = null, CancellationToken cancellationToken = default) 42var resolvedValidator = validator;
TestServices\TestPackagingService.cs (1)
11public Func<CancellationToken, Task<IEnumerable<PackageChannel>>>? GetChannelsAsyncCallback { get; set; }
TestServices\TestProjectLocator.cs (1)
16public Func<CancellationToken, Task<FileInfo?>>? GetAppHostFromSettingsAsyncCallback { get; set; }
Utils\CliTestHelper.cs (51)
230services.AddSingleton<Func<LanguageInfo, GuestAppHostProject>>(sp => 381public Func<IServiceProvider, ConsoleEnvironment> ConsoleEnvironmentFactory => (IServiceProvider serviceProvider) => 413public Func<IServiceProvider, INewCommandPrompter> NewCommandPrompterFactory { get; set; } = (IServiceProvider serviceProvider) => 419public Func<IServiceProvider, ICliUpdateNotifier> CliUpdateNotifierFactory { get; set; } = (IServiceProvider serviceProvider) => 429public Func<IServiceProvider, IAddCommandPrompter> AddCommandPrompterFactory { get; set; } = (IServiceProvider serviceProvider) => 435public Func<IServiceProvider, IPublishCommandPrompter> PublishCommandPrompterFactory { get; set; } = (IServiceProvider serviceProvider) => 441public Func<IServiceProvider, IConfigurationService> ConfigurationServiceFactory { get; set; } 456public Func<IServiceProvider, IProjectLocator> ProjectLocatorFactory { get; set; } 457public Func<IServiceProvider, ISolutionLocator> SolutionLocatorFactory { get; set; } 458public Func<IServiceProvider, CliExecutionContext> CliExecutionContextFactory { get; set; } 459public Func<IServiceProvider, IAppHostProjectFactory> AppHostProjectFactory { get; set; } = serviceProvider => ActivatorUtilities.CreateInstance<AppHostProjectFactory>(serviceProvider); 460public Func<IServiceProvider, IFirstTimeUseNoticeSentinel> FirstTimeUseNoticeSentinelFactory { get; set; } = _ => new TestFirstTimeUseNoticeSentinel(); 461public Func<IServiceProvider, IBannerService> BannerServiceFactory { get; set; } = _ => new TestBannerService(); 489public Func<IServiceProvider, AspireCliTelemetry> TelemetryFactory { get; set; } = (IServiceProvider serviceProvider) => 494public Func<IServiceProvider, IProjectUpdater> ProjectUpdaterFactory { get; set; } = (IServiceProvider serviceProvider) => 505public Func<IServiceProvider, ICliHostEnvironment> CliHostEnvironmentFactory { get; set; } = (IServiceProvider serviceProvider) => 511public Func<IServiceProvider, IInteractionService> InteractionServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 522public Func<IServiceProvider, ICertificateToolRunner> CertificateToolRunnerFactory { get; set; } = (IServiceProvider _) => 529public Func<IServiceProvider, ICertificateService> CertificateServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 541public Func<IServiceProvider, IScaffoldingService> ScaffoldingServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 552public Func<IServiceProvider, IProcessExecutionFactory> DotNetCliExecutionFactoryFactory { get; set; } = (IServiceProvider serviceProvider) => 557public Func<IServiceProvider, IDotNetCliRunner> DotNetCliRunnerFactory { get; set; } = (IServiceProvider serviceProvider) => 572public Func<IServiceProvider, IDotNetSdkInstaller> DotNetSdkInstallerFactory { get; set; } = (IServiceProvider serviceProvider) => 577public Func<IServiceProvider, INuGetPackageCache> NuGetPackageCacheFactory { get; set; } = (IServiceProvider serviceProvider) => 586public Func<IServiceProvider, IAppHostCliBackchannel> AppHostBackchannelFactory { get; set; } = (IServiceProvider serviceProvider) => 595public Func<IServiceProvider, IExtensionRpcTarget> ExtensionRpcTargetFactory { get; set; } = (IServiceProvider serviceProvider) => 602public Func<IServiceProvider, IExtensionBackchannel> ExtensionBackchannelFactory { get; set; } = serviceProvider => 610public Func<IServiceProvider, IFeatures> FeatureFlagsFactory { get; set; } = (IServiceProvider serviceProvider) => 617public Func<IServiceProvider, ITemplateProvider> TemplateProviderFactory { get; set; } = (IServiceProvider serviceProvider) => 641public Func<IServiceProvider, IPackagingService> PackagingServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 650public Func<IServiceProvider, IDiskCache> DiskCacheFactory { get; set; } = (IServiceProvider serviceProvider) => new NullDiskCache(); 652public Func<IServiceProvider, ICliDownloader> CliDownloaderFactory { get; set; } = (IServiceProvider serviceProvider) => 659public Func<IServiceProvider, IProcessPathProvider> ProcessPathProviderFactory { get; set; } = _ => new EnvironmentProcessPathProvider(); 661public Func<IServiceProvider, IAuxiliaryBackchannelMonitor> AuxiliaryBackchannelMonitorFactory { get; set; } = (IServiceProvider serviceProvider) => 666public Func<IServiceProvider, IAgentEnvironmentDetector> AgentEnvironmentDetectorFactory { get; set; } = (IServiceProvider serviceProvider) => 671public Func<IServiceProvider, IGitRepository> GitRepositoryFactory { get; set; } = (IServiceProvider serviceProvider) => 679public Func<IServiceProvider, INpmRunner> NpmRunnerFactory { get; set; } = _ => new FakeNpmRunner(); 681public Func<IServiceProvider, INpmProvenanceChecker> NpmProvenanceCheckerFactory { get; set; } = _ => new FakeNpmProvenanceChecker(); 683public Func<IServiceProvider, IAspireSkillsInstaller> AspireSkillsInstallerFactory { get; set; } = serviceProvider => new FakeAspireSkillsInstaller(serviceProvider.GetRequiredService<CliExecutionContext>()); 685public Func<IServiceProvider, IPlaywrightCliRunner> PlaywrightCliRunnerFactory { get; set; } = _ => new FakePlaywrightCliRunner(); 690public Func<IServiceProvider, ITelemetryHookConfigurator> TelemetryHookConfiguratorFactory { get; set; } 693public Func<IServiceProvider, ILanguageService> LanguageServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 702public Func<IServiceProvider, ILayoutDiscovery> LayoutDiscoveryFactory { get; set; } = _ => new NullLayoutDiscovery(); 705public Func<IServiceProvider, IBundleService> BundleServiceFactory { get; set; } = _ => new NullBundleService(); 708public Func<IServiceProvider, IBundlePayloadProvider> BundlePayloadProviderFactory { get; set; } = _ => new NullBundlePayloadProvider(); 710public Func<IServiceProvider, IMcpTransportFactory> McpServerTransportFactory { get; set; } = (IServiceProvider serviceProvider) => 716public Func<IServiceProvider, IDocsIndexService> DocsIndexServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 725public Func<IServiceProvider, IDocsSearchService> DocsSearchServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 732public Func<IServiceProvider, IApiDocsIndexService> ApiDocsIndexServiceFactory { get; set; } = (IServiceProvider serviceProvider) => 819public Func<CancellationToken, Task>? EnsureExtractedAsyncCallback { get; set; } 821public Func<CancellationToken, Task>? EnsureExtractedAndAcquireLayoutAsyncCallback { get; set; }
Utils\MockHttpMessageHandler.cs (2)
12private readonly Func<HttpRequestMessage, HttpResponseMessage>? _responseFactory; 37public MockHttpMessageHandler(Func<HttpRequestMessage, HttpResponseMessage> responseFactory)
Aspire.Confluent.Kafka (3)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (3)
186private readonly Func<TDeclaredObject, T> propertyFetch; 192this.propertyFetch = (Func<TDeclaredObject, T>)property.GetMethod!.CreateDelegate(typeof(Func<TDeclaredObject, T>));
Aspire.Dashboard (64)
Api\TelemetryApiService.cs (1)
370Func<string, bool> isKnownKey)
Components\Controls\Chart\ChartContainer.razor.cs (1)
41public required Func<Pages.Metrics.MetricViewKind, Task> OnViewChangedAsync { get; set; }
Components\Controls\Chart\ChartDataCalculator.cs (4)
24public ChartData CalculateChartValues(List<DimensionScope> dimensions, DateTimeOffset startTime, Func<DateTimeOffset, DateTimeOffset> toLocal, string yLabel) 68public ChartData CalculateHistogramValues(List<DimensionScope> dimensions, DateTimeOffset startTime, Func<DateTimeOffset, DateTimeOffset> toLocal, string yLabel) 186internal static bool TryCalculateHistogramPoints(List<DimensionScope> dimensions, DateTimeOffset start, DateTimeOffset end, Dictionary<int, ChartTrace> traces, List<ChartExemplar> exemplars, Func<DateTimeOffset, DateTimeOffset> toLocal) 302private static void CollectExemplars(List<ChartExemplar> exemplars, MetricValueBase metric, Func<DateTimeOffset, DateTimeOffset> toLocal)
Components\Controls\ClearSignalsButton.razor.cs (1)
27public required Func<ResourceKey?, Task> HandleClearSignal { get; set; }
Components\Controls\PropertyGrid.razor.cs (1)
96public Func<TItem, object?> ItemKey { get; init; } = static item => item.Key;
Components\Controls\PropertyValues\ResourceNameValue.razor.cs (1)
21public required Func<ResourceViewModel, string> FormatName { get; set; }
Components\Controls\SignalsActionsDisplay.razor.cs (1)
25public required Func<ResourceKey?, Task> HandleClearSignal { get; set; }
Components\Controls\StructuredLogDetails.razor.cs (1)
154private static void MoveAttributes(List<TelemetryPropertyViewModel> source, List<TelemetryPropertyViewModel> destination, Func<TelemetryPropertyViewModel, bool> predicate)
Components\Interactions\InteractionsProvider.cs (1)
159Func<DashboardDialogService, Task<IDialogReference>> openDialog;
Components\Pages\Resources.razor.cs (3)
334private bool UpdateFromResource(ResourceViewModel resource, Func<string, bool> resourceTypeVisible, Func<string, bool> stateVisible, Func<string, bool> healthStatusVisible)
Components\Pages\TraceDetail.razor.cs (2)
697Func<OtlpResourceView, string> getResourceName) 789Func<OtlpResourceView, string> getResourceName,
Components\ResourcesGridColumns\LogMessageColumnDisplay.razor.cs (1)
21public required Func<OtlpLogEntry, bool> IsGenAILogCallback { get; set; }
Extensions\ComponentExtensions.cs (1)
27public static async Task ExecuteOnDefault<T>(this FluentDataGridRow<T> row, Func<T, Task> call)
Model\DashboardCommandExecutor.cs (2)
36public async Task ExecuteAsync(ResourceViewModel resource, CommandViewModel command, Func<ResourceViewModel, string> getResourceName) 88public async Task ExecuteAsyncCore(ResourceViewModel resource, CommandViewModel command, Func<ResourceViewModel, string> getResourceName)
Model\DashboardDialogService.cs (1)
117public EventCallback<DialogResult> CreateDialogCallback(object receiver, Func<DialogResult, Task> callback)
Model\DebugSessionHelpers.cs (1)
13public static HttpClient CreateHttpClient(Uri? debugSessionUri, string? token, X509Certificate2? cert, Func<HttpClientHandler, HttpMessageHandler>? createHandler, string? dcpInstanceId = null)
Model\FilterDialogViewModel.cs (1)
13public required Func<string, Dictionary<string, int>> GetFieldValues { get; init; }
Model\INotificationService.cs (1)
75public required Func<IServiceProvider, Task> OnClick { get; init; }
Model\Otlp\SpanWaterfallViewModel.cs (3)
51public bool MatchesFilter(string filter, TelemetryFilter? typeFilter, IReadOnlyList<FieldTelemetryFilter>? structuredFilters, Func<OtlpResourceView, string> getResourceName, [NotNullWhen(true)] out IEnumerable<SpanWaterfallViewModel>? matchedDescendents) 57internal bool MatchesFilterDirect(string filter, TelemetryFilter? typeFilter, IReadOnlyList<FieldTelemetryFilter> enabledStructuredFilters, Func<OtlpResourceView, string> getResourceName) 87private bool MatchesFilterCore(string filter, TelemetryFilter? typeFilter, IReadOnlyList<FieldTelemetryFilter> enabledStructuredFilters, Func<OtlpResourceView, string> getResourceName, [NotNullWhen(true)] out IEnumerable<SpanWaterfallViewModel>? matchedDescendents)
Model\ResourceGridViewModel.cs (1)
36public static List<ResourceGridViewModel> OrderNestedResources(List<ResourceGridViewModel> initialGridVMs, Func<ResourceViewModel, bool> isCollapsed)
Model\ResourceOutgoingPeerResolver.cs (3)
181foreach (var transformer in s_addressTransformers) 257foreach (var transformer in s_addressTransformers) 269private static readonly List<Func<string, string>> s_addressTransformers = [
Model\ResourceViewModel.cs (1)
458public sealed record KnownProperty(string Key, Func<IStringLocalizer<Resources.Resources>, string> GetDisplayName);
Model\TraceHelpers.cs (2)
35var orderByFunc = static (OtlpSpan s) => s.StartTime; 44static void Visit(Dictionary<OtlpSpan, List<OtlpSpan>> spanLookup, OtlpSpan span, Func<OtlpSpan, TState, TState> spanAction, TState state, Func<OtlpSpan, DateTime> orderByFunc)
Model\TraceLinkHelpers.cs (3)
22Func<Func<Task>, Task> dispatcher, 36Func<CancellationToken, Task<bool>> isAvailableCallback, 39Func<Func<Task>, Task> dispatcher,
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
250Func<ReadOnlySequence<byte>, T> exporter)
Otlp\Http\OtlpJsonConverters.cs (4)
16private static readonly Dictionary<Type, Func<string, IMessage>> s_jsonDeserializers = new() 35private static readonly Dictionary<Type, Func<IMessage, string>> s_jsonSerializers = new() 56if (!s_jsonDeserializers.TryGetValue(typeof(TMessage), out var deserializer)) 67if (!s_jsonSerializers.TryGetValue(typeof(TMessage), out var serializer))
Otlp\Model\OtlpHelpers.cs (2)
190public static KeyValuePair<string, string>[] ToKeyValuePairs(this RepeatedField<KeyValue> attributes, OtlpContext context, Func<KeyValue, bool> filter) 425public static PagedResult<TResult> GetItems<TSource, TResult>(IEnumerable<TSource> results, int startIndex, int count, bool isFull, Func<TSource, TResult>? select)
src\Shared\ConsoleLogs\LogParser.cs (1)
43Func<string, string> callback = (s) =>
src\Shared\ConsoleLogs\UrlParser.cs (2)
16public static bool TryParse(string? text, Func<string, string>? nonMatchFragmentCallback, [NotNullWhen(true)] out string? modifiedText) 57static void AppendNonMatchFragment(StringBuilder stringBuilder, Func<string, string>? nonMatchFragmentCallback, string text)
src\Shared\EnumerableExtensions.cs (2)
16Func<TSource, TKey> keySelector, 17Func<TSource, TValue> valueSelector) where TKey : notnull
src\Shared\SearchTextParser.cs (1)
135public static SearchFilter ParseSearch([NotNullWhen(true)] string? search, Func<string, bool>? isKnownKey = null)
Telemetry\DashboardTelemetrySender.cs (4)
18private readonly Channel<(OperationContext, Func<HttpClient, Func<OperationContextProperty, object>, Task>)> _channel; 22internal Func<HttpClientHandler, HttpMessageHandler>? CreateHandler { get; set; } 38_channel = Channel.CreateBounded<(OperationContext, Func<HttpClient, Func<OperationContextProperty, object>, Task>)>(channelOptions); 162public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
Telemetry\IDashboardTelemetrySender.cs (1)
12public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc);
Utils\FilterHelpers.cs (2)
25Func<FieldTelemetryFilter?, Task> openFilterAsync, 103Func<string, Dictionary<string, int>> getFieldValues,
Utils\MaxItemCountHelper.cs (6)
19private static readonly Func<Virtualize<TItem>, int>? s_getMaxItemCount = 25private static Func<Virtualize<TItem>, int>? CreateGetter() 38return Expression.Lambda<Func<Virtualize<TItem>, int>>(body, instance).Compile(); 77private static readonly Func<FluentDataGrid<TGridItem>, Virtualize<(int, TGridItem)>>? s_getVirtualize = 80private static Func<FluentDataGrid<TGridItem>, Virtualize<(int, TGridItem)>>? CreateGetter() 93return Expression.Lambda<Func<FluentDataGrid<TGridItem>, Virtualize<(int, TGridItem)>>> (body, instance).Compile();
Aspire.Dashboard.Components.Tests (25)
Shared\TestLocalStorage.cs (2)
10public Func<string, (bool Success, object? Value)>? OnGetUnprotectedAsync { get; set; } 12public Func<string, (bool Success, object? Value)>? OnGetAsync { get; set; }
Shared\TestMessageService.cs (2)
11private readonly Func<MessageOptions, Task<Message>>? _onShowMessage; 13public TestMessageService(Func<MessageOptions, Task<Message>>? onShowMessage = null)
tests\Shared\Logging\ITestSink.cs (2)
14Func<WriteContext, bool>? WriteEnabled { get; set; } 16Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\Logging\TestLogger.cs (2)
11private readonly Func<LogLevel, bool> _filter; 18public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
tests\Shared\Logging\TestSink.cs (4)
14Func<WriteContext, bool>? writeEnabled = null, 15Func<BeginScopeContext, bool>? beginEnabled = null) 24public Func<WriteContext, bool>? WriteEnabled { get; set; } 26public Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\TestDashboardClient.cs (2)
16private readonly Func<string, Channel<IReadOnlyList<ResourceLogLine>>>? _consoleLogsChannelProvider; 37Func<string, Channel<IReadOnlyList<ResourceLogLine>>>? consoleLogsChannelProvider = null,
tests\Shared\TestDashboardTelemetrySender.cs (1)
21public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
tests\Shared\TestDialogService.cs (9)
28public EventCallback<DialogResult> CreateDialogCallback(object receiver, Func<DialogResult, Task> callback) => throw new NotImplementedException(); 29public void ShowConfirmation(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 30public Task<IDialogReference> ShowConfirmationAsync(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 94public void ShowSplashScreen(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 95public void ShowSplashScreen<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 96public void ShowSplashScreen(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 97public Task<IDialogReference> ShowSplashScreenAsync(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 99public Task<IDialogReference> ShowSplashScreenAsync<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 101public Task<IDialogReference> ShowSplashScreenAsync(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException();
tests\Shared\TestSessionStorage.cs (1)
10public Func<string, (bool Success, object? Value)>? OnGetAsync { get; set; }
Aspire.Dashboard.Tests (30)
Integration\Playwright\AccessibilityTests.cs (3)
233private static readonly IReadOnlyDictionary<string, (string StartUrl, string Label, Func<IPage, Task> OpenSurfaceAsync)> s_dialogSurfaces = 234new Dictionary<string, (string, string, Func<IPage, Task>)>(StringComparer.Ordinal) 328private async Task AssertNoBlockingWcagViolationsAsync(string relativeUrl, string theme, ViewportSize viewport, string? viewportLabel = null, Func<IPage, Task>? openSurfaceAsync = null, string? surfaceLabel = null)
Integration\Playwright\Infrastructure\PlaywrightTestsBase.cs (1)
23public async Task RunTestAsync(Func<IPage, Task> test)
Integration\ServerRetryHelper.cs (2)
27public static Task BindPortWithRetry(Func<int, Task> retryFunc, ILogger logger) 35public static async Task BindPortsWithRetry(Func<List<int>, Task> retryFunc, ILogger logger, int portCount)
LocalBrowserStorageTests.cs (1)
131public Func<(string Identifier, object?[]? Args), object?>? OnInvoke { get; set; }
TelemetryRepositoryTests\TestOutgoingPeerResolver.cs (2)
11private readonly Func<KeyValuePair<string, string>[], (string? Name, ResourceViewModel? Resource)>? _onResolve; 14public TestOutgoingPeerResolver(Func<KeyValuePair<string, string>[], (string? Name, ResourceViewModel? Resource)>? onResolve = null)
tests\Shared\Logging\ITestSink.cs (2)
14Func<WriteContext, bool>? WriteEnabled { get; set; } 16Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\Logging\TestLogger.cs (2)
11private readonly Func<LogLevel, bool> _filter; 18public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
tests\Shared\Logging\TestSink.cs (4)
14Func<WriteContext, bool>? writeEnabled = null, 15Func<BeginScopeContext, bool>? beginEnabled = null) 24public Func<WriteContext, bool>? WriteEnabled { get; set; } 26public Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\TestDashboardClient.cs (2)
16private readonly Func<string, Channel<IReadOnlyList<ResourceLogLine>>>? _consoleLogsChannelProvider; 37Func<string, Channel<IReadOnlyList<ResourceLogLine>>>? consoleLogsChannelProvider = null,
tests\Shared\TestDashboardTelemetrySender.cs (1)
21public void QueueRequest(OperationContext context, Func<HttpClient, Func<OperationContextProperty, object>, Task> requestFunc)
tests\Shared\TestDialogService.cs (9)
28public EventCallback<DialogResult> CreateDialogCallback(object receiver, Func<DialogResult, Task> callback) => throw new NotImplementedException(); 29public void ShowConfirmation(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 30public Task<IDialogReference> ShowConfirmationAsync(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 94public void ShowSplashScreen(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 95public void ShowSplashScreen<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 96public void ShowSplashScreen(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 97public Task<IDialogReference> ShowSplashScreenAsync(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 99public Task<IDialogReference> ShowSplashScreenAsync<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 101public Task<IDialogReference> ShowSplashScreenAsync(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException();
tests\Shared\TestSessionStorage.cs (1)
10public Func<string, (bool Success, object? Value)>? OnGetAsync { get; set; }
Aspire.EndToEnd.Tests (1)
IntegrationServicesTests.cs (1)
59private async Task RunTestAsync(Func<CancellationToken, Task> test)
Aspire.Hosting (188)
ApplicationModel\CertificateAuthorityCollectionResourceExtensions.cs (2)
117public static IResourceBuilder<CertificateAuthorityCollection> WithCertificatesFromStore(this IResourceBuilder<CertificateAuthorityCollection> builder, StoreName storeName, StoreLocation storeLocation, Func<X509Certificate2, bool>? filter = null) 157public static IResourceBuilder<CertificateAuthorityCollection> WithCertificatesFromFile(this IResourceBuilder<CertificateAuthorityCollection> builder, string pemFilePath, Func<X509Certificate2, bool>? filter = null)
ApplicationModel\CertificateTrustConfigurationCallbackAnnotation.cs (2)
13public sealed class CertificateTrustConfigurationCallbackAnnotation(Func<CertificateTrustConfigurationCallbackAnnotationContext, Task> callback) : IResourceAnnotation 18public Func<CertificateTrustConfigurationCallbackAnnotationContext, Task> Callback { get; } = callback ?? throw new ArgumentNullException(nameof(callback));
ApplicationModel\CertificateTrustExecutionConfigurationGatherer.cs (2)
22private readonly Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> _configContextFactory; 28public CertificateTrustExecutionConfigurationGatherer(Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> configContextFactory)
ApplicationModel\CommandLineArgsCallbackAnnotation.cs (2)
24public CommandLineArgsCallbackAnnotation(Func<CommandLineArgsCallbackContext, Task> callback) 49public Func<CommandLineArgsCallbackContext, Task> Callback { get; }
ApplicationModel\CommandOptions.cs (3)
7/// Optional configuration for resource commands added with <see cref="ResourceBuilderExtensions.WithCommand{T}(Aspire.Hosting.ApplicationModel.IResourceBuilder{T}, string, string, Func{Aspire.Hosting.ApplicationModel.ExecuteCommandContext, Task{Aspire.Hosting.ApplicationModel.ExecuteCommandResult}}, Aspire.Hosting.ApplicationModel.CommandOptions?)"/>. 56public Func<InputsDialogValidationContext, Task>? ValidateArguments { get; set; } 95public Func<UpdateCommandStateContext, ResourceCommandState>? UpdateState { get; set; }
ApplicationModel\ContainerBuildOptionsCallbackAnnotation.cs (2)
15public sealed class ContainerBuildOptionsCallbackAnnotation(Func<ContainerBuildOptionsCallbackContext, Task> callback) : IResourceAnnotation 20public Func<ContainerBuildOptionsCallbackContext, Task> Callback { get; } = callback ?? throw new ArgumentNullException(nameof(callback));
ApplicationModel\ContainerImagePushOptionsCallbackAnnotation.cs (3)
15/// or <see cref="ResourceBuilderExtensions.WithImagePushOptions{T}(IResourceBuilder{T}, Func{ContainerImagePushOptionsCallbackContext, Task})"/> 42public ContainerImagePushOptionsCallbackAnnotation(Func<ContainerImagePushOptionsCallbackContext, Task> callback) 57public Func<ContainerImagePushOptionsCallbackContext, Task> Callback { get; }
ApplicationModel\ContainerRuntimeArgsCallbackAnnotation.cs (2)
18public ContainerRuntimeArgsCallbackAnnotation(Func<ContainerRuntimeArgsCallbackContext, Task> callback) 43public Func<ContainerRuntimeArgsCallbackContext, Task> Callback { get; }
ApplicationModel\CustomResourceSnapshotExtensions.cs (2)
21/// This method is intended for use with <see cref="ResourceNotificationService.PublishUpdateAsync(IResource, Func{CustomResourceSnapshot, CustomResourceSnapshot})"/> 22/// and <see cref="ResourceNotificationService.PublishUpdateAsync(IResource, string, Func{CustomResourceSnapshot, CustomResourceSnapshot})"/>.
ApplicationModel\DebugSupportExtensions.cs (1)
153/// <see cref="ResourceBuilderExtensions.WithDebugSupport{T, TLaunchConfiguration}(IResourceBuilder{T}, Func{LaunchConfigurationCallbackContext, Task{TLaunchConfiguration}}, string)"/>,
ApplicationModel\DockerfileBuildAnnotation.cs (1)
47public Func<DockerfileFactoryContext, Task<string>>? DockerfileFactory { get; init; }
ApplicationModel\DockerfileBuilderCallbackAnnotation.cs (4)
14private readonly List<Func<DockerfileBuilderCallbackContext, Task>> _callbacks = []; 27public DockerfileBuilderCallbackAnnotation(Func<DockerfileBuilderCallbackContext, Task> callback) 36public IReadOnlyList<Func<DockerfileBuilderCallbackContext, Task>> Callbacks => _callbacks.AsReadOnly(); 43public void AddCallback(Func<DockerfileBuilderCallbackContext, Task> callback)
ApplicationModel\EndpointEnvironmentInjectionFilterAnnotation.cs (2)
9internal class EndpointEnvironmentInjectionFilterAnnotation(Func<EndpointAnnotation, bool> filter) : IResourceAnnotation 11public Func<EndpointAnnotation, bool> Filter { get; } = filter;
ApplicationModel\EnvironmentCallbackAnnotation.cs (2)
72public EnvironmentCallbackAnnotation(Func<EnvironmentCallbackContext, Task> callback) 82public Func<EnvironmentCallbackContext, Task> Callback { get; private set; }
ApplicationModel\ExecutionConfigurationBuilderExtensions.cs (2)
44public static IExecutionConfigurationBuilder WithCertificateTrustConfig(this IExecutionConfigurationBuilder builder, Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> configContextFactory) 57public static IExecutionConfigurationBuilder WithHttpsCertificateConfig(this IExecutionConfigurationBuilder builder, Func<X509Certificate2, HttpsCertificateExecutionConfigurationContext> configContextFactory)
ApplicationModel\HttpCommandOptions.cs (3)
61public Func<HttpCommandRequestContext, Task>? PrepareRequest { get; set; } 66public Func<HttpCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; } 129public Func<HttpCommandPrepareRequestContext, Task<HttpCommandRequestExportData>>? PrepareRequest { get; init; }
ApplicationModel\HttpsCertificateConfigurationCallbackAnnotaion.cs (2)
13public sealed class HttpsCertificateConfigurationCallbackAnnotation(Func<HttpsCertificateConfigurationCallbackAnnotationContext, Task> callback) : IResourceAnnotation 18public Func<HttpsCertificateConfigurationCallbackAnnotationContext, Task> Callback { get; } = callback ?? throw new ArgumentNullException(nameof(callback));
ApplicationModel\HttpsCertificateExecutionConfigurationGatherer.cs (2)
18private readonly Func<X509Certificate2, HttpsCertificateExecutionConfigurationContext> _configContextFactory; 24public HttpsCertificateExecutionConfigurationGatherer(Func<X509Certificate2, HttpsCertificateExecutionConfigurationContext> configContextFactory)
ApplicationModel\InputGeneratorAnnotation.cs (2)
10public class InputGeneratorAnnotation(Func<ParameterResource, InteractionInput> inputGenerator) : IResourceAnnotation 15public Func<ParameterResource, InteractionInput> InputGenerator => inputGenerator;
ApplicationModel\LaunchToolArgsCallbackAnnotation.cs (2)
54public LaunchToolArgsCallbackAnnotation(Func<CommandLineArgsCallbackContext, Task> callback, string? owningLaunchConfigurationType, bool showInCommandLine) 89public Func<CommandLineArgsCallbackContext, Task> Callback { get; }
ApplicationModel\ManifestPublishingCallbackAnnotation.cs (2)
33public ManifestPublishingCallbackAnnotation(Func<ManifestPublishingContext, Task>? callback) 41public Func<ManifestPublishingContext, Task>? Callback { get; }
ApplicationModel\ParameterResource.cs (2)
17private readonly Func<ParameterDefault?, string> _valueGetter; 26public ParameterResource(string name, Func<ParameterDefault?, string> callback, bool secret = false) : base(name)
ApplicationModel\ProcessCommandOptions.cs (3)
9/// Optional configuration for resource process commands added with <see cref="ResourceBuilderExtensions.WithProcessCommand{TResource}(IResourceBuilder{TResource}, string, string, Func{ExecuteCommandContext, ValueTask{ProcessCommandSpec}}, ProcessCommandOptions?)"/>. 84public Func<ProcessCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; } 131public Func<ExecuteCommandContext, Task<ProcessCommandSpecExportData>>? CreateProcessSpec { get; init; }
ApplicationModel\ProcessCommandResultContext.cs (1)
12/// <see cref="ResourceBuilderExtensions.WithProcessCommand{TResource}(IResourceBuilder{TResource}, string, string, Func{ExecuteCommandContext, ValueTask{ProcessCommandSpec}}, ProcessCommandOptions?)"/>.
ApplicationModel\RequiredCommandAnnotation.cs (1)
34public Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>? ValidationCallback { get; init; }
ApplicationModel\RequiredCommandValidator.cs (1)
187Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>? Callback);
ApplicationModel\ResourceCommandAnnotation.cs (11)
22Func<UpdateCommandStateContext, ResourceCommandState> updateState, 23Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 40Func<UpdateCommandStateContext, ResourceCommandState> updateState, 41Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 49Func<InputsDialogValidationContext, Task>? validateArguments = null) 57Func<UpdateCommandStateContext, ResourceCommandState> updateState, 58Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 67Func<InputsDialogValidationContext, Task>? validateArguments = null, 107public Func<UpdateCommandStateContext, ResourceCommandState> UpdateState { get; } 113public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; } 143public Func<InputsDialogValidationContext, Task>? ValidateArguments { get; }
ApplicationModel\ResourceExtensions.cs (1)
566Func<ContainerBuildOptionsCallbackContext, Task> callback)
ApplicationModel\ResourceLoggerService.cs (1)
315private static async IAsyncEnumerable<IReadOnlyList<LogLine>> CombineMultipleAsync(string[] resourceNames, Func<string, IAsyncEnumerable<IReadOnlyList<LogLine>>> fetch)
ApplicationModel\ResourceNotificationService.cs (8)
142private async Task WaitUntilHealthyAsync(IResource resource, IResource dependency, WaitBehavior waitBehavior, CancellationToken cancellationToken, Func<string, Task>? onDependencyReady = null) 298private async Task WaitUntilCompletionAsync(IResource resource, IResource dependency, int exitCode, CancellationToken cancellationToken, Func<string, Task>? onDependencyReady = null) 373Func<ILogger, string, string, ResourceEvent, Task> postRunningAction, CancellationToken cancellationToken, Func<string, Task>? onDependencyReady = null) 448private async Task WaitUntilStartedAsync(IResource resource, IResource dependency, WaitBehavior waitBehavior, CancellationToken cancellationToken, Func<string, Task>? onDependencyReady = null) 648public async Task<ResourceEvent> WaitForResourceAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default) 661private async Task<ResourceEvent> WaitForResourceCoreAsync(string resourceName, Func<ResourceEvent, bool> predicate, string cancellationMessage, CancellationToken cancellationToken = default, string waitCondition = "predicate") 828public Task PublishUpdateAsync(IResource resource, string resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 1229public async Task PublishUpdateAsync(IResource resource, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory)
ApplicationModel\ResourceUrlsCallbackAnnotation.cs (2)
30public ResourceUrlsCallbackAnnotation(Func<ResourceUrlsCallbackContext, Task> callback) 40public Func<ResourceUrlsCallbackContext, Task> Callback { get; private set; }
Ats\BuilderExports.cs (4)
204Func<BeforeStartEvent, Task> callback) 228Func<BeforePublishEvent, Task> callback) 252Func<AfterPublishEvent, Task> callback) 276Func<AfterResourcesCreatedEvent, Task> callback)
Ats\EventingExports.cs (14)
23public static void AddEventingSubscriber(this IDistributedApplicationBuilder builder, Func<EventingSubscriberRegistrationContext, Task> subscribe) 37public static void TryAddEventingSubscriber(this IDistributedApplicationBuilder builder, Func<EventingSubscriberRegistrationContext, Task> subscribe) 72internal static IResourceBuilder<T> OnBeforeResourceStarted<T>(this IResourceBuilder<T> builder, Func<BeforeResourceStartedEvent, Task> callback) 88internal static IResourceBuilder<T> OnResourceStopped<T>(this IResourceBuilder<T> builder, Func<ResourceStoppedEvent, Task> callback) 104internal static IResourceBuilder<T> OnConnectionStringAvailable<T>(this IResourceBuilder<T> builder, Func<ConnectionStringAvailableEvent, Task> callback) 120internal static IResourceBuilder<T> OnInitializeResource<T>(this IResourceBuilder<T> builder, Func<InitializeResourceEvent, Task> callback) 136internal static IResourceBuilder<T> OnResourceEndpointsAllocated<T>(this IResourceBuilder<T> builder, Func<ResourceEndpointsAllocatedEvent, Task> callback) 152internal static IResourceBuilder<T> OnResourceReady<T>(this IResourceBuilder<T> builder, Func<ResourceReadyEvent, Task> callback) 168public static DistributedApplicationEventSubscription OnBeforeStart(this EventingSubscriberRegistrationContext context, Func<BeforeStartEvent, Task> callback) 183public static DistributedApplicationEventSubscription OnBeforePublish(this EventingSubscriberRegistrationContext context, Func<BeforePublishEvent, Task> callback) 198public static DistributedApplicationEventSubscription OnAfterPublish(this EventingSubscriberRegistrationContext context, Func<AfterPublishEvent, Task> callback) 213public static DistributedApplicationEventSubscription OnAfterResourcesCreated(this EventingSubscriberRegistrationContext context, Func<AfterResourcesCreatedEvent, Task> callback) 221private sealed class CallbackEventingSubscriber(Func<EventingSubscriberRegistrationContext, Task> subscribe) : IDistributedApplicationEventingSubscriber 223public bool Matches(Func<EventingSubscriberRegistrationContext, Task> otherSubscribe)
Ats\ExecutionConfigurationExports.cs (1)
61Func<HttpsCertificateInfo, HttpsCertificateExecutionConfigurationContext> configContextFactory)
Ats\InteractionExports.cs (3)
376public InteractionInputBuilder WithDynamicLoading(Func<InteractionInputLoadContext, Task> callback, DynamicLoadingOptions? options = null) 742public Func<InputsDialogValidationContext, Task>? ValidationCallback { get; init; } 784public Func<ProgressContext, Task>? Work { get; init; }
Ats\PipelineExports.cs (2)
28Func<PipelineStepContext, Task> callback, 47Func<PipelineConfigurationContext, Task> callback)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
744Func<ResourceEvent, bool> predicate,
Cli\CliOrphanDetector.cs (1)
12internal Func<int, bool> IsProcessRunning { get; set; } = (int pid) =>
ConnectionStringParameterResource.cs (1)
12public ConnectionStringParameterResource(string name, Func<ParameterDefault?, string> callback, string? environmentVariableName) : base(name, callback, secret: true)
ContainerResourceBuilderExtensions.cs (12)
544/// This is intended to pass additional arguments to the underlying container runtime run command to enable advanced features such as exposing GPUs to the container. To pass runtime arguments to the actual container, use the <see cref="ResourceBuilderExtensions.WithArgs{T}(IResourceBuilder{T}, Func{CommandLineArgsCallbackContext, Task})"/> method. 552public static IResourceBuilder<T> WithContainerRuntimeArgs<T>(this IResourceBuilder<T> builder, Func<ContainerRuntimeArgsCallbackContext, Task> callback) where T : ContainerResource 776public static IResourceBuilder<T> WithDockerfileFactory<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileFactoryContext, string> dockerfileFactory, string? stage = null) where T : ContainerResource 824public static IResourceBuilder<T> WithDockerfileFactory<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) where T : ContainerResource 951public static IResourceBuilder<ContainerResource> AddDockerfileFactory(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileFactoryContext, string> dockerfileFactory, string? stage = null) 982public static IResourceBuilder<ContainerResource> AddDockerfileFactory(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) 1032public static IResourceBuilder<ContainerResource> AddDockerfileBuilder(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileBuilderCallbackContext, Task> callback, string? stage = null) 1077/// <remarks>This synchronous overload is not available in polyglot app hosts. Use the overload that accepts a <see cref="Func{T, TResult}"/>.</remarks> 1698public static IResourceBuilder<T> WithDockerfileBuilder<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileBuilderCallbackContext, Task> callback, string? stage = null) where T : ContainerResource 1722Func<DockerfileFactoryContext, Task<string>> dockerfileFactory = async factoryContext => 1737foreach (var cb in annotation.Callbacks) 1800/// <remarks>This synchronous overload is not available in polyglot app hosts. Use the overload that accepts a <see cref="Func{T, TResult}"/>.</remarks>
Dashboard\DashboardService.cs (1)
477private async Task ExecuteAsync(Func<CancellationToken, Task> execute, ServerCallContext serverCallContext)
Dcp\DcpExecutor.cs (3)
551Func<TDcpResource, string?> stateSelector, 940var snapshotBuild = BuildSnapshotFunc(r.DcpResource); 1024Func<CustomResourceSnapshot, CustomResourceSnapshot> BuildSnapshotFunc(CustomResource dcpResource)
Dcp\DcpExecutorEvents.cs (4)
14internal record OnResourceChangedContext(CancellationToken CancellationToken, string ResourceType, IResource Resource, string DcpResourceName, ResourceStatus Status, Func<CustomResourceSnapshot, CustomResourceSnapshot> UpdateSnapshot); 19private readonly ConcurrentDictionary<Type, Func<object, Task>> _eventSubscriptionListLookup = new(); 21public void Subscribe<T>(Func<T, Task> callback) where T : notnull 32if (_eventSubscriptionListLookup.TryGetValue(typeof(T), out var callback))
Dcp\DcpResourceWatcher.cs (1)
82internal Func<string?, ValueTask>? BeforeLogBatchDeliveryAsync { get; set; }
Dcp\IDcpObjectFactory.cs (1)
54Func<TDcpResource, string?> stateSelector,
Dcp\KubernetesService.cs (5)
455Func<DcpKubernetesClient, TResult> operation, 456Func<Exception, bool> isRetryable, 470Func<DcpKubernetesClient, Task<TResult>> operation, 471Func<Exception, bool> isRetryable, 507Func<Exception, bool> isRetryable,
IInteractionService.cs (3)
234public required Func<LoadInputContext, Task> LoadCallback { get; init; } 820public Func<InputsDialogValidationContext, Task>? ValidationCallback { get; set; } 935public Func<ProgressContext, Task>? Work { get; set; }
Lifecycle\LifecycleHookServiceCollectionExtensions.cs (2)
46public static void AddLifecycleHook<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) where T : class, IDistributedApplicationLifecycleHook 59public static void TryAddLifecycleHook<T>(this IServiceCollection services, Func<IServiceProvider, T> implementationFactory) where T : class, IDistributedApplicationLifecycleHook
LinqExtensions.cs (1)
8public static (int index, T value) IndexOf<T>(this IEnumerable<T> source, Func<T, bool> predicate)
Orchestrator\ApplicationOrchestrator.cs (2)
283static Task PublishUpdateAsync(ResourceNotificationService notificationService, IResource resource, string? resourceId, Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 779private async Task PublishEventToHierarchy<TEvent>(Func<IResource, TEvent> createEvent, IResource resource, CancellationToken cancellationToken)
ParameterResourceBuilderExtensions.cs (1)
242public static IResourceBuilder<ParameterResource> WithCustomInput(this IResourceBuilder<ParameterResource> builder, Func<ParameterResource, InteractionInput> createInput)
Pipelines\DistributedApplicationPipeline.cs (5)
29private readonly List<Func<PipelineConfigurationContext, Task>> _configurationCallbacks = []; 459Func<PipelineStepContext, Task> action, 541public void AddPipelineConfiguration(Func<PipelineConfigurationContext, Task> callback) 775var callbacks = new List<Func<PipelineConfigurationContext, Task>>(); 800foreach (var callback in callbacks)
Pipelines\IDistributedApplicationPipeline.cs (2)
24Func<PipelineStepContext, Task> action, 38void AddPipelineConfiguration(Func<PipelineConfigurationContext, Task> callback);
Pipelines\PipelineConfigurationAnnotation.cs (2)
21public Func<PipelineConfigurationContext, Task> Callback { get; } 27public PipelineConfigurationAnnotation(Func<PipelineConfigurationContext, Task> callback)
Pipelines\PipelineStep.cs (1)
37public required Func<PipelineStepContext, Task> Action { get; init; }
Pipelines\PipelineStepAnnotation.cs (5)
17private readonly Func<PipelineStepFactoryContext, Task<IEnumerable<PipelineStep>>> _factory; 23public PipelineStepAnnotation(Func<PipelineStepFactoryContext, PipelineStep> factory) 32public PipelineStepAnnotation(Func<PipelineStepFactoryContext, Task<PipelineStep>> factory) 41public PipelineStepAnnotation(Func<PipelineStepFactoryContext, IEnumerable<PipelineStep>> factory) 50public PipelineStepAnnotation(Func<PipelineStepFactoryContext, Task<IEnumerable<PipelineStep>>> factory)
Pipelines\PipelineStepFactoryExtensions.cs (6)
26Func<PipelineStepFactoryContext, PipelineStep> factory) where T : IResource 45Func<PipelineStepFactoryContext, Task<PipelineStep>> factory) where T : IResource 64Func<PipelineStepFactoryContext, IEnumerable<PipelineStep>> factory) where T : IResource 83Func<PipelineStepFactoryContext, Task<IEnumerable<PipelineStep>>> factory) where T : IResource 107Func<PipelineStepContext, Task> callback, 140Func<PipelineConfigurationContext, Task> callback) where T : IResource
ProjectResourceBuilderExtensions.cs (1)
939this IResourceBuilder<ProjectResource> builder, Func<EndpointAnnotation, bool> filter)
RequiredCommandResourceExtensions.cs (1)
68Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> validationCallback,
ResourceBuilderExtensions.cs (17)
383public static IResourceBuilder<T> WithEnvironment<T>(this IResourceBuilder<T> builder, Func<EnvironmentCallbackContext, Task> callback) where T : IResourceWithEnvironment 741public static IResourceBuilder<T> WithArgs<T>(this IResourceBuilder<T> builder, Func<CommandLineArgsCallbackContext, Task> callback) where T : IResourceWithArgs 776public static IResourceBuilder<T> WithManifestPublishingCallback<T>(this IResourceBuilder<T> builder, Func<ManifestPublishingContext, Task> callback) where T : IResource 2002public static IResourceBuilder<T> WithUrls<T>(this IResourceBuilder<T> builder, Func<ResourceUrlsCallbackContext, Task> callback) 2154/// To add another URL for an endpoint, use <see cref="WithUrlForEndpoint{T}(IResourceBuilder{T}, string, Func{EndpointReference, ResourceUrlAnnotation})"/>. 2230public static IResourceBuilder<T> WithUrlForEndpoint<T>(this IResourceBuilder<T> builder, string endpointName, Func<EndpointReference, ResourceUrlAnnotation> callback) 2916Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 2980Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 2981Func<UpdateCommandStateContext, ResourceCommandState>? updateState = null, 3123Func<ExecuteCommandContext, ProcessCommandSpec> processSpecFactory, 3181Func<ExecuteCommandContext, ValueTask<ProcessCommandSpec>> processSpecFactory, 3264Func<ExecuteCommandContext, Task<ProcessCommandSpecExportData>> createProcessSpec, 4144public static IResourceBuilder<TResource> WithCertificateTrustConfiguration<TResource>(this IResourceBuilder<TResource> builder, Func<CertificateTrustConfigurationCallbackAnnotationContext, Task> callback) 4279public static IResourceBuilder<TResource> WithHttpsCertificateConfiguration<TResource>(this IResourceBuilder<TResource> builder, Func<HttpsCertificateConfigurationCallbackAnnotationContext, Task> callback) 4859Func<string, TLaunchConfiguration> launchConfigurationProducer, 4956Func<LaunchConfigurationCallbackContext, Task<TLaunchConfiguration>> launchConfigurationProducer, 5287Func<ContainerImagePushOptionsCallbackContext, Task> callback)
src\Shared\PackageUpdateHelpers.cs (1)
179internal static string ExtractJsonPayload(string stdout, Func<JsonElement, bool> isExpectedPayload)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
SupportsDebuggingAnnotation.cs (3)
24Func<LaunchConfigurationCallbackContext, Task<object>> launchConfigurationProducer) 48internal Func<LaunchConfigurationCallbackContext, Task<object>> LaunchConfigurationProducer { get; } 53Func<LaunchConfigurationCallbackContext, Task<T>> launchConfigurationProducer)
Aspire.Hosting.Analyzers (1)
Infrastructure\BoundedCacheWithFactory.cs (1)
27public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
Aspire.Hosting.Azure (12)
AzureProvisioningController.cs (4)
2393private static async Task<ExecuteCommandResult> ExecuteCommandAsync<T>(Func<Task<T>> action, string successMessage, Func<T, Task<CommandResultData>> createResultData, string? failureOperation = null) 3676Func<CustomResourceSnapshot, CustomResourceSnapshot> stateFactory) 4349Func<InputsDialogValidationContext, Task>? ValidateArguments = null); 4362Func<InputsDialogValidationContext, Task>? ValidateArguments = null);
AzureProvisioningResource.cs (1)
125public static T CreateExistingOrNewProvisionableResource<T>(AzureResourceInfrastructure infrastructure, Func<string, BicepValue<string>, T> createExisting, Func<AzureResourceInfrastructure, T> createNew)
AzureResourcePreparer.cs (1)
105Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand,
AzureResourceProperties.cs (1)
101private static void Add(ImmutableArray<ResourcePropertySnapshot>.Builder properties, Func<string?, ResourcePropertySnapshot> createProperty, string? value, bool includeEmptyProperties)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
Aspire.Hosting.Azure.AppConfiguration (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.AppContainers (2)
src\Shared\CrossScopeAcrPullIdentityPreparer.cs (2)
43Func<AzureUserAssignedIdentityResource, IAcrPullIdentityAnnotation> createIdentityAnnotation, 106Func<AzureUserAssignedIdentityResource, IAcrPullIdentityAnnotation> createIdentityAnnotation,
Aspire.Hosting.Azure.AppService (2)
src\Shared\CrossScopeAcrPullIdentityPreparer.cs (2)
43Func<AzureUserAssignedIdentityResource, IAcrPullIdentityAnnotation> createIdentityAnnotation, 106Func<AzureUserAssignedIdentityResource, IAcrPullIdentityAnnotation> createIdentityAnnotation,
Aspire.Hosting.Azure.CognitiveServices (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.ContainerRegistry (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.EventHubs (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.Functions (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.KeyVault (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.Kubernetes (5)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
Aspire.Hosting.Azure.Kusto (4)
AzureKustoHealthCheckBuilderExtensions.cs (1)
22public static IHealthChecksBuilder AddAzureKustoHealthCheck(this IHealthChecksBuilder builder, string name, bool isCluster, Func<IServiceProvider, KustoConnectionStringBuilder> connectionStringFactory)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.Search (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.ServiceBus (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.SignalR (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.Storage (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Azure.Tests (26)
AzureBicepResourceTests.cs (6)
32public static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> AzureExtensions => 35private static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> CreateAllAzureExtensions(string resourceName) 75public void AzureExtensionsAutomaticallyAddAzureProvisioning(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource) 87public void BicepResourcesAreIdempotent(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource) 103public static TheoryData<Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>>> AzureExtensionsWithHyphen => 108public void AzureResourcesProduceValidBicep(Func<IDistributedApplicationBuilder, IResourceBuilder<IResource>> addAzureResource)
AzureDeployerTests.cs (1)
1092var deploymentOutputsProvider = (string deploymentName) => deploymentName switch
ProvisioningTestHelpers.cs (18)
65public static IArmClientProvider CreateArmClientProvider(Func<string, Dictionary<string, object>> deploymentOutputsProvider) => new TestArmClientProvider(deploymentOutputsProvider); 203private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 234public TestArmClient(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 527public TestSubscriptionResource(Func<string, Dictionary<string, object>> deploymentOutputsProvider, string subscriptionId = DefaultSubscriptionId) 561private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 573public TestResourceGroupCollection(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 639public TestResourceGroupResource(string name, Func<string, Dictionary<string, object>> deploymentOutputsProvider, string subscriptionId = DefaultSubscriptionId) 723private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 724private readonly Func<string, ResourceIdentifier>? _deploymentIdFactory; 726public TestArmDeploymentCollection(Dictionary<string, object> deploymentOutputs, Func<string, ResourceIdentifier>? deploymentIdFactory = null) 732public TestArmDeploymentCollection(Func<string, Dictionary<string, object>> deploymentOutputsProvider, Func<string, ResourceIdentifier>? deploymentIdFactory = null) 787public TestTenantResource(Func<string, Dictionary<string, object>> deploymentOutputsProvider) 845private readonly Func<string, Dictionary<string, object>>? _deploymentDataProvider; 862public TestArmDeploymentResource(string name, Func<string, Dictionary<string, object>> deploymentDataProvider, ResourceIdentifier? id = null, ResourcesProvisioningState? provisioningState = null) 870public TestArmDeploymentResource(string name, Func<string, Dictionary<string, object>> deploymentDataProvider, ResourcesProvisioningState provisioningState) 925private readonly Func<string, Dictionary<string, object>>? _deploymentOutputsProvider; 941public TestArmClientProvider(Func<string, Dictionary<string, object>> deploymentOutputsProvider)
RoleAssignmentTests.cs (1)
339Func<string, string?>? scrubLines = null
Aspire.Hosting.Azure.WebPubSub (3)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Browsers (32)
BrowserConfiguration.cs (4)
89internal static string GetDefaultBrowser(Func<string, string?> resolveBrowserExecutable) => 95internal static string GetDefaultBrowser(BrowserUserDataMode userDataMode, Func<string, string?> resolveBrowserExecutable) 199Func<BrowserConfiguration, T> getRuntimeValue, 203Func<string?, ConfigurationValue<T>> parseConfigurationValue,
BrowserHost.cs (4)
38Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 50Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 62Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 112Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
BrowserLogsCdpConnection.cs (5)
49private readonly Func<BrowserLogsCdpProtocolEvent, ValueTask> _eventHandler; 57private BrowserLogsCdpConnection(IBrowserLogsCdpTransport transport, Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, ILogger<BrowserLogsSessionManager> logger) 69Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 83Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 101Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
BrowserLogsCdpConnectionMultiplexer.cs (5)
27Func<Func<BrowserLogsCdpProtocolEvent, ValueTask>, IBrowserLogsCdpConnection> connectionFactory, 36public IBrowserLogsCdpConnection CreateConnection(Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler) 217private sealed class Subscription(long id, Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler) 223public Func<BrowserLogsCdpProtocolEvent, ValueTask> EventHandler { get; } = eventHandler;
BrowserPageSession.cs (5)
10Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 30private readonly Func<BrowserLogsCdpProtocolEvent, ValueTask> _eventHandler; 55Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 132Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 157Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
IBrowserHost.cs (4)
35Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 46Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 88private readonly Func<CancellationToken, ValueTask> _releaseAsync; 91public BrowserHostLease(IBrowserHost host, Func<CancellationToken, ValueTask> releaseAsync)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
Aspire.Hosting.Browsers.Tests (42)
BrowserLogsCdpConnectionTests.cs (1)
406private sealed class FakeSharedCdpConnection(Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler) : IBrowserLogsCdpConnection
BrowserLogsRunningSessionTests.cs (3)
124Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 133Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 151Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler) : IBrowserPageSession
BrowserLogsSessionManagerTests.cs (2)
660Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 669Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
BrowserPageSessionTests.cs (4)
364Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 373Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 388private Func<BrowserLogsCdpProtocolEvent, ValueTask>? _eventHandler; 466public void SetEventHandler(Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler)
src\Aspire.Hosting.Browsers\BrowserConfiguration.cs (4)
89internal static string GetDefaultBrowser(Func<string, string?> resolveBrowserExecutable) => 95internal static string GetDefaultBrowser(BrowserUserDataMode userDataMode, Func<string, string?> resolveBrowserExecutable) 199Func<BrowserConfiguration, T> getRuntimeValue, 203Func<string?, ConfigurationValue<T>> parseConfigurationValue,
src\Aspire.Hosting.Browsers\BrowserHost.cs (4)
38Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 50Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 62Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 112Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnection.cs (5)
49private readonly Func<BrowserLogsCdpProtocolEvent, ValueTask> _eventHandler; 57private BrowserLogsCdpConnection(IBrowserLogsCdpTransport transport, Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, ILogger<BrowserLogsSessionManager> logger) 69Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 83Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 101Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
src\Aspire.Hosting.Browsers\BrowserLogsCdpConnectionMultiplexer.cs (5)
27Func<Func<BrowserLogsCdpProtocolEvent, ValueTask>, IBrowserLogsCdpConnection> connectionFactory, 36public IBrowserLogsCdpConnection CreateConnection(Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler) 217private sealed class Subscription(long id, Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler) 223public Func<BrowserLogsCdpProtocolEvent, ValueTask> EventHandler { get; } = eventHandler;
src\Aspire.Hosting.Browsers\BrowserPageSession.cs (5)
10Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 30private readonly Func<BrowserLogsCdpProtocolEvent, ValueTask> _eventHandler; 55Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 132Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 157Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler,
src\Aspire.Hosting.Browsers\IBrowserHost.cs (4)
35Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 46Func<BrowserLogsCdpProtocolEvent, ValueTask> eventHandler, 88private readonly Func<CancellationToken, ValueTask> _releaseAsync; 91public BrowserHostLease(IBrowserHost host, Func<CancellationToken, ValueTask> releaseAsync)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
Aspire.Hosting.CodeGeneration.Go (1)
src\Shared\CodeGeneration\AtsOptionsFlattening.cs (1)
30Func<AtsParameterInfo, bool> isCancellationToken,
Aspire.Hosting.CodeGeneration.Go.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (7)
229Func<TestCallbackContext, Task> asyncCallback) 240Func<TestCallbackContext, Task<bool>> asyncCallback) 251Func<IResourceBuilder<TestRedisResource>, Task> asyncConfigure) 508Func<TestEnvironmentContext, Task> callback) where T : IResourceWithEnvironment 556Func<TestCallbackContext, Task>? callback = null) where T : IResource 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 722Func<CancellationToken, Task> operation) where T : IResource
Aspire.Hosting.CodeGeneration.Java.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (7)
229Func<TestCallbackContext, Task> asyncCallback) 240Func<TestCallbackContext, Task<bool>> asyncCallback) 251Func<IResourceBuilder<TestRedisResource>, Task> asyncConfigure) 508Func<TestEnvironmentContext, Task> callback) where T : IResourceWithEnvironment 556Func<TestCallbackContext, Task>? callback = null) where T : IResource 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 722Func<CancellationToken, Task> operation) where T : IResource
Aspire.Hosting.CodeGeneration.Python.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (7)
229Func<TestCallbackContext, Task> asyncCallback) 240Func<TestCallbackContext, Task<bool>> asyncCallback) 251Func<IResourceBuilder<TestRedisResource>, Task> asyncConfigure) 508Func<TestEnvironmentContext, Task> callback) where T : IResourceWithEnvironment 556Func<TestCallbackContext, Task>? callback = null) where T : IResource 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 722Func<CancellationToken, Task> operation) where T : IResource
Aspire.Hosting.CodeGeneration.Rust.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (7)
229Func<TestCallbackContext, Task> asyncCallback) 240Func<TestCallbackContext, Task<bool>> asyncCallback) 251Func<IResourceBuilder<TestRedisResource>, Task> asyncConfigure) 508Func<TestEnvironmentContext, Task> callback) where T : IResourceWithEnvironment 556Func<TestCallbackContext, Task>? callback = null) where T : IResource 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 722Func<CancellationToken, Task> operation) where T : IResource
Aspire.Hosting.CodeGeneration.TypeScript (1)
src\Shared\CodeGeneration\AtsOptionsFlattening.cs (1)
30Func<AtsParameterInfo, bool> isCancellationToken,
Aspire.Hosting.CodeGeneration.TypeScript.Tests (7)
TestTypes\TestExtensions.cs (7)
229Func<TestCallbackContext, Task> asyncCallback) 240Func<TestCallbackContext, Task<bool>> asyncCallback) 251Func<IResourceBuilder<TestRedisResource>, Task> asyncConfigure) 508Func<TestEnvironmentContext, Task> callback) where T : IResourceWithEnvironment 556Func<TestCallbackContext, Task>? callback = null) where T : IResource 593Func<TestResourceContext, Task<bool>> validator) where T : IResource 722Func<CancellationToken, Task> operation) where T : IResource
Aspire.Hosting.Containers.Tests (1)
ResourceFailureLoggingTests.cs (1)
130private static void AssertSingleLogLine(List<string> logLines, Func<string, bool> predicate, string expected)
Aspire.Hosting.Docker (7)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
src\Shared\Yaml\ForceQuotedStringsEventEmitter.cs (2)
24private readonly Func<string, (bool, ScalarStyle?)> _shouldApply; 37Func<string, (bool, ScalarStyle?)>? shouldApply = null
Aspire.Hosting.EntityFrameworkCore (2)
EFMigrationResourceBuilderExtensions.cs (1)
406Func<TAnnotation, IResource?> resourceSelector)
EFResourceBuilderExtensions.cs (1)
803Func<EFCoreOperationExecutor, Task<EFOperationResult>> executeOperation) =>
Aspire.Hosting.EntityFrameworkCore.Tests (1)
EFCoreOperationExecutorTests.cs (1)
216private static DotnetToolResource CreateToolResource(Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand)
Aspire.Hosting.Foundry (6)
HostedAgent\HostedAgentBuilderExtension.cs (1)
637public required Func<string, HttpContent> CreateRequestContent { get; init; }
Project\ConnectionBuilderExtensions.cs (2)
36Func<AzureResourceInfrastructure, CognitiveServicesConnectionProperties> configureProperties) 426Func<AzureResourceInfrastructure, CognitiveServicesConnectionProperties> configureProperties)
src\Shared\AzureRoleAssignmentUtils.cs (3)
10internal static IResourceBuilder<T> WithRoleAssignments<T, TTarget, TBuiltInRole>(this IResourceBuilder<T> builder, IResourceBuilder<TTarget> target, Func<TBuiltInRole, string> getName, TBuiltInRole[] roles) 18internal static IResourceBuilder<T> WithDefaultRoleAssignments<T, TBuiltInRole>(this IResourceBuilder<T> builder, Func<TBuiltInRole, string> getName, params TBuiltInRole[] roles) 25private static HashSet<RoleDefinition> CreateRoleDefinitions<TBuiltInRole>(IReadOnlyList<TBuiltInRole> roles, Func<TBuiltInRole, string> getName)
Aspire.Hosting.Integration.Analyzers (1)
src\Aspire.Hosting.Analyzers\Infrastructure\BoundedCacheWithFactory.cs (1)
27public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
Aspire.Hosting.Java (1)
JavaBuildToolResolver.cs (1)
29Func<string, Exception> createAmbiguityException)
Aspire.Hosting.Java.Tests (3)
AddJavaAppPublishTests.cs (3)
1787Func<IResourceBuilder<JavaAppResource>, IResourceBuilder<JavaAppResource>>? configureResource = null) 2010Func<IResourceBuilder<JavaAppResource>, IResourceBuilder<JavaAppResource>>? configureResource = null) 2034Func<IResourceBuilder<JavaAppResource>, IResourceBuilder<JavaAppResource>>? configureResource = null)
Aspire.Hosting.JavaScript (1)
JavaScriptPackageManagerAnnotation.cs (1)
59internal Func<string, string>? ResolvePackageScriptRuntimeImage { get; init; }
Aspire.Hosting.Kubernetes (2)
src\Shared\Yaml\ForceQuotedStringsEventEmitter.cs (2)
24private readonly Func<string, (bool, ScalarStyle?)> _shouldApply; 37Func<string, (bool, ScalarStyle?)>? shouldApply = null
Aspire.Hosting.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
923public Func<IResourceBuilder<MauiProjectResource>, IResourceBuilder<IResource>> AddPlatformWithDefaultName { get; } 938Func<IResourceBuilder<MauiProjectResource>, IResourceBuilder<IResource>> addDefault,
Aspire.Hosting.Radius (5)
Publishing\RadCredentialRegisterStep.cs (2)
389IReadOnlyList<Func<CancellationToken, Task<(string Flag, string Value)>>> ArgumentFactories, 396foreach (var factory in ArgumentFactories)
Publishing\SealedSecretApplyStep.cs (3)
268Func<CancellationToken, Task<SealedSecretStatusSnapshot>> getStatus, 269Func<CancellationToken, Task<bool>> secretExists, 318Func<CancellationToken, Task<T>> probe,
Aspire.Hosting.RemoteHost (1)
OrphanDetector.cs (1)
25internal Func<int, bool> IsProcessRunning { get; set; } = static pid => ProcessStartTimeHelper.IsProcessRunning(pid);
Aspire.Hosting.RemoteHost.Tests (1)
CapabilityDispatcherTests.cs (1)
2369public static void InvokeTypedCallback(Func<string, Task> callback)
Aspire.Hosting.Rust (3)
RustCargoArgsCallbackAnnotation.cs (2)
12internal sealed class RustCargoArgsCallbackAnnotation(Func<RustCargoArgsCallbackContext, Task> callback) : IResourceAnnotation 31public Func<RustCargoArgsCallbackContext, Task> Callback { get; } = callback ?? throw new ArgumentNullException(nameof(callback));
RustHostingExtensions.cs (1)
238public static IResourceBuilder<T> WithCargoArgs<T>(this IResourceBuilder<T> builder, Func<RustCargoArgsCallbackContext, Task> callback)
Aspire.Hosting.Rust.Tests (3)
AddRustAppPublishTests.cs (1)
1122Func<IResourceBuilder<RustAppResource>, IResourceBuilder<RustAppResource>>? configureResource = null)
FakeCargoMetadataReader.cs (2)
37public Func<CancellationToken, Task>? OnRead { get; set; } 42public Func<int, string>? MetadataJsonFactory { get; set; }
Aspire.Hosting.Tasks (1)
RunAspireCliCommand.cs (1)
63internal Func<Process, bool>? TestTerminateProcess { get; set; }
Aspire.Hosting.Testing.Tests (8)
tests\Shared\Logging\ITestSink.cs (2)
14Func<WriteContext, bool>? WriteEnabled { get; set; } 16Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\Logging\TestLogger.cs (2)
11private readonly Func<LogLevel, bool> _filter; 18public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
tests\Shared\Logging\TestSink.cs (4)
14Func<WriteContext, bool>? writeEnabled = null, 15Func<BeginScopeContext, bool>? beginEnabled = null) 24public Func<WriteContext, bool>? WriteEnabled { get; set; } 26public Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
Aspire.Hosting.Tests (39)
ApplicationModel\Docker\DockerfileBuilderCallbackAnnotationTests.cs (9)
18Func<DockerfileBuilderCallbackContext, Task> callback = context => Task.CompletedTask; 46Func<DockerfileBuilderCallbackContext, Task> callback = context => 74Func<DockerfileBuilderCallbackContext, Task> callback = async context => 98Func<DockerfileBuilderCallbackContext, Task> callback = context => 128Func<DockerfileBuilderCallbackContext, Task> callback = context => 154Func<DockerfileBuilderCallbackContext, Task> callback1 = context => Task.CompletedTask; 155Func<DockerfileBuilderCallbackContext, Task> callback2 = context => Task.CompletedTask; 189foreach (var callback in annotation.Callbacks) 224foreach (var callback in annotation.Callbacks)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
1176private static async Task<ResourceSnapshot> ReadSnapshotAsync(IAsyncEnumerator<ResourceSnapshot> enumerator, Func<ResourceSnapshot, bool> predicate)
DistributedApplicationTests.cs (3)
717var callback1 = (IServiceProvider sp) => new DummyLifecycleHook(); 722var callback2 = (IServiceProvider sp) => new DummyLifecycleHook(); 2311private static async Task EnsureLogLines(Stream stream, CancellationToken ct, long nlines, Func<long, bool>? validateLineNumber = default)
ExecutionConfigurationGathererTests.cs (19)
291var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 319var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 349var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 377var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 399var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 425var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 460var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 490var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 526var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 586var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 649var configContextFactory = CreateCertificateTrustConfigurationContextFactory(); 683var configContextFactory = CreateHttpsCertificateConfigurationContextFactory(); 717var configContextFactory = CreateHttpsCertificateConfigurationContextFactory(); 747var configContextFactory = CreateHttpsCertificateConfigurationContextFactory(); 767var configContextFactory = CreateHttpsCertificateConfigurationContextFactory(); 790var configContextFactory = CreateHttpsCertificateConfigurationContextFactory(); 834var configContextFactory = CreateHttpsCertificateConfigurationContextFactory(); 882private static Func<CertificateTrustScope, CertificateTrustExecutionConfigurationContext> CreateCertificateTrustConfigurationContextFactory() 893private static Func<X509Certificate2, HttpsCertificateExecutionConfigurationContext> CreateHttpsCertificateConfigurationContextFactory()
ProjectResourceBuilderExtensionTests.cs (1)
230private static Func<X509Certificate2, HttpsCertificateExecutionConfigurationContext> CreateHttpsCertificateConfigurationContextFactory()
RequiredCommandAnnotationTests.cs (2)
43Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> callback = 88Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> callback =
ResourceExtensionsTests.cs (1)
449var callback = async (ContainerImagePushOptionsCallbackContext context) =>
ResourceFailureLoggingTests.cs (1)
88private static void AssertSingleLogLine(List<string> logLines, Func<string, bool> predicate, string expected)
WithProcessCommandTests.cs (1)
1343Func<ExecuteCommandContext, ValueTask<ProcessCommandSpec>> processSpecFactory = _ => new ValueTask<ProcessCommandSpec>((ProcessCommandSpec)null!);
WithUrlsTests.cs (1)
22Func<ResourceUrlsCallbackContext, Task> callback = c => Task.CompletedTask;
Aspire.Hosting.TestUtilities (14)
Helpers\DashboardServiceDataExtensions.cs (2)
11public static async Task<ResourceSnapshot> WaitForResourceAsync(this DashboardServiceData dashboardServiceData, string resourceName, Func<ResourceSnapshot, bool> predicate, CancellationToken cancellationToken = default) 30private static bool TryFindMatch(IEnumerable<ResourceSnapshot> resources, string resourceName, Func<ResourceSnapshot, bool> predicate, [NotNullWhen(true)] out ResourceSnapshot? match)
Helpers\KubernetesHelper.cs (2)
13public static async Task<T> GetResourceByNameAsync<T>(IKubernetesService kubernetes, string resourceName, string resourceNameSuffix, Func<T, bool> ready, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 28public static async Task<T> GetResourceByNameMatchAsync<T>(IKubernetesService kubernetes, string resourceNamePattern, Func<T, bool> ready, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata
tests\Shared\Logging\ITestSink.cs (2)
14Func<WriteContext, bool>? WriteEnabled { get; set; } 16Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\Logging\TestLogger.cs (2)
11private readonly Func<LogLevel, bool> _filter; 18public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
tests\Shared\Logging\TestSink.cs (4)
14Func<WriteContext, bool>? writeEnabled = null, 15Func<BeginScopeContext, bool>? beginEnabled = null) 24public Func<WriteContext, bool>? WriteEnabled { get; set; } 26public Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
Utils\TestConsoleLogsService.cs (2)
12private readonly Func<string, Channel<IReadOnlyList<LogEntry>>>? _getConsoleLogsChannel; 14public TestConsoleLogsService(Func<string, Channel<IReadOnlyList<LogEntry>>>? getConsoleLogsChannel = null)
Aspire.Hosting.Yarp (3)
ConfigurationBuilder\YarpCluster.cs (1)
86internal void Configure(Func<ClusterConfig, ClusterConfig> configure)
ConfigurationBuilder\YarpRoute.cs (2)
32internal void Configure(Func<RouteConfig, RouteConfig> configure) 68private static YarpRoute ConfigureMatch(this YarpRoute route, Func<RouteMatch, RouteMatch> match)
Aspire.Microsoft.Extensions.Configuration.AzureAppConfiguration.Tests (2)
tests\Aspire.Azure.Security.KeyVault.Tests\MockTransport.cs (2)
15private readonly Func<HttpMessage, MockResponse> _responseFactory; 31public MockTransport(Func<MockRequest, MockResponse> responseFactory)
Aspire.NATS.Net (5)
AspireNatsClientExtensions.cs (5)
34public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Func<NatsOpts, NatsOpts>? configureOptions) 42public static void AddNatsClient(this IHostApplicationBuilder builder, string connectionName, Action<NatsClientSettings>? configureSettings, Func<NatsOpts, NatsOpts>? configureOptions) 77public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Func<NatsOpts, NatsOpts>? configureOptions) 93public static void AddKeyedNatsClient(this IHostApplicationBuilder builder, string name, Action<NatsClientSettings>? configureSettings, Func<NatsOpts, NatsOpts>? configureOptions) 210private static Func<IServiceProvider, NatsOpts, NatsOpts>? Wrap(Func<NatsOpts, NatsOpts>? func)
Aspire.NATS.Net.Tests (4)
NatsClientPublicApiTests.cs (4)
26Func<NatsOpts, NatsOpts>? configureOptions = null; 62Func<NatsOpts, NatsOpts>? configureOptions = null; 94Func<NatsOpts, NatsOpts>? configureOptions = null; 130Func<NatsOpts, NatsOpts>? configureOptions = null;
Aspire.Playground.Tests (22)
Infrastructure\DistributedApplicationExtensions.cs (1)
154static void AssertDoesNotContain(IReadOnlyList<FakeLogRecord> logs, Func<FakeLogRecord, bool> predicate)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
tests\Aspire.TestUtilities\TestcontainersPodmanConfiguration.cs (8)
111Func<string, string?> getEnvironmentVariable, 112Func<string?, bool> socketExists, 184private static bool IsRyukSettingExplicit(Func<string, string?> getEnvironmentVariable) 190private static bool DockerSocketExists(string? homeDirectory, Func<string, string?> getEnvironmentVariable, Func<string?, bool> socketExists) 209Func<string, string?> getEnvironmentVariable, 210Func<string?, bool> socketExists, 290private static string? CombineWithEnvironmentVariable(Func<string, string?> getEnvironmentVariable, string variable, params string[] parts)
tests\Shared\Logging\ITestSink.cs (2)
14Func<WriteContext, bool>? WriteEnabled { get; set; } 16Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
tests\Shared\Logging\TestLogger.cs (2)
11private readonly Func<LogLevel, bool> _filter; 18public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
tests\Shared\Logging\TestSink.cs (4)
14Func<WriteContext, bool>? writeEnabled = null, 15Func<BeginScopeContext, bool>? beginEnabled = null) 24public Func<WriteContext, bool>? WriteEnabled { get; set; } 26public Func<BeginScopeContext, bool>? BeginEnabled { get; set; }
Aspire.StackExchange.Redis (9)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (6)
23private static readonly Lazy<Func<object, (string?, string?)>> MessageDataGetter = new(() => 30var messageDelegate = CreateFieldGetter<object>(profiledCommandType, "Message", BindingFlags.NonPublic | BindingFlags.Instance); 31var scriptDelegate = CreateFieldGetter<string>(scriptMessageType, "script", BindingFlags.NonPublic | BindingFlags.Instance); 251private static Func<object, TField?>? CreateFieldGetter<TField>( 283return (Func<object, TField>)getterMethod.CreateDelegate(typeof(Func<object, TField>));
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.cs (2)
178private readonly Func<TDeclaredObject, T> propertyFetch; 185this.propertyFetch = property.GetMethod!.CreateDelegate<Func<TDeclaredObject, T>>();
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisInstrumentationOptions.cs (1)
54public Func<RedisInstrumentationContext, bool>? Filter { get; set; }
Aspire.Templates.Tests (1)
TemplateTestsBase.cs (1)
54Func<AspireProject, Task>? onBuildAspireProject = null,
Aspire.TerminalHost (7)
DcpUpstreamAdapter.cs (2)
61private readonly Func<CancellationToken, Task<Stream>> _streamFactory; 81Func<CancellationToken, Task<Stream>> streamFactory,
src\Shared\ParentProcessLivenessMonitor.cs (3)
22Func<CancellationToken, Task> onParentExited, 44Func<CancellationToken, Task> onParentExited, 54Func<CancellationToken, Task> onParentExited,
src\Shared\ParentProcessWatchdog.cs (2)
68internal static long? GetExpectedParentStartTimeUnix(Func<string, string?> getEnvironmentVariable, out bool useRuntimeStartTime) 76Func<string, string?> getEnvironmentVariable,
Aspire.TerminalHost.Tests (1)
TerminalHostAppTests.cs (1)
588byte expectedType, Func<byte[], bool> match, TimeSpan timeout)
Aspire.TestTools (1)
TrxReader.cs (1)
51public static IList<DetailedTestResult> GetDetailedTestResultsFromTrx(string filepath, Func<DetailedTestResult, bool>? testFilter = null)
Aspire.TestUtilities (13)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
TestcontainersPodmanConfiguration.cs (8)
111Func<string, string?> getEnvironmentVariable, 112Func<string?, bool> socketExists, 184private static bool IsRyukSettingExplicit(Func<string, string?> getEnvironmentVariable) 190private static bool DockerSocketExists(string? homeDirectory, Func<string, string?> getEnvironmentVariable, Func<string?, bool> socketExists) 209Func<string, string?> getEnvironmentVariable, 210Func<string?, bool> socketExists, 290private static string? CombineWithEnvironmentVariable(Func<string, string?> getEnvironmentVariable, string variable, params string[] parts)
Aspire.TypeSystem (2)
AttributeDataReader.cs (2)
139private static T? FindSingleAttribute<T>(IList<CustomAttributeData> attributes, string attributeFullName, Func<CustomAttributeData, T> parser) where T : class 152private static IEnumerable<T> FindAllAttributes<T>(IList<CustomAttributeData> attributes, string attributeFullName, Func<CustomAttributeData, T> parser) where T : class
BlazorHosted (2)
Program.cs (2)
13var previous = options.Filter; 24var previous = options.FilterHttpRequestMessage;
CodeStyleConfigFileGenerator (1)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
csc (2)
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (2)
20internal static T RunWithUtf8Output<T>(Func<TextWriter, T> func) 41internal static T RunWithUtf8Output<T>(bool utf8Output, TextWriter textWriter, Func<TextWriter, T> func)
dotnet (36)
Commands\DotNetCommandFactory.cs (2)
27if (!_alwaysRunOutOfProc && TryGetBuiltInCommand(commandName, out var builtInCommand)) 38private static bool TryGetBuiltInCommand(string commandName, out Func<string[], int> commandFunc)
Commands\New\PostActions\DotnetRestorePostActionProcessor.cs (2)
10internal class DotnetRestorePostActionProcessor(Func<string, bool>? restoreCallback = null) : PostActionProcessorBase 12private readonly Func<string, bool> _restoreCallback = restoreCallback ?? DotnetCommandCallbacks.RestoreProject;
Commands\Run\RunCommand.cs (5)
175Func<ProjectCollection, ProjectInstance>? projectFactory = null; 236internal ICommand GetTargetCommand(LaunchProfile? launchSettings, Func<ProjectCollection, ProjectInstance>? projectFactory, RunProperties? cachedRunProperties, bool runPropertiesFromEvaluation, FacadeLogger? logger) 424private void EnsureProjectIsBuilt(out Func<ProjectCollection, ProjectInstance>? projectFactory, out RunProperties? cachedRunProperties, out VirtualProjectBuildingCommand? projectBuilder, string? intermediateOutputPath, bool hasRuntimeEnvironmentVariableSupport) 520private ICommand GetTargetCommandForProject(ProjectLaunchProfile? launchSettings, Func<ProjectCollection, ProjectInstance>? projectFactory, RunProperties? cachedRunProperties, bool runPropertiesFromEvaluation, FacadeLogger? logger) 579static ProjectInstance EvaluateProject(string? projectFilePath, Func<ProjectCollection, ProjectInstance>? projectFactory, MSBuildArgs msbuildArgs, ILogger? binaryLogger)
Commands\Run\RunTelemetry.cs (2)
100public static string GetProjectBasedIdentifier(string projectFilePath, string? repoRoot = null, Func<string, string>? hasher = null) 125public static string GetFileBasedIdentifier(string entryPointFilePath, Func<string, string>? hasher = null)
Commands\Test\MTP\IPC\HttpTestHostGateway.cs (2)
19private readonly Func<IRequest, Task<IResponse>> _callback; 29Func<IRequest, Task<IResponse>> callback,
Commands\Test\MTP\Logger.cs (1)
88public static void LogTrace<T>(T arg, Func<T, string> messageGetter)
Commands\Test\MTP\Terminal\TerminalTestReporter.cs (1)
904private static string? GetStringFromIndexOrDefault(FlatException[]? exceptions, Func<FlatException, string?> property, int index) =>
Commands\Test\MTP\Terminal\TestProgressState.cs (1)
247Func<TestNodeInfoEntry, TestNodeInfoEntry> incrementTestNodeInfoEntry,
Commands\Workload\Install\FileBasedInstaller.cs (1)
397public void GarbageCollect(Func<string, IWorkloadResolver> getResolverForWorkloadSet, DirectoryPath? offlineCache = null, bool cleanAllPacks = false)
Commands\Workload\Install\IInstaller.cs (1)
23void GarbageCollect(Func<string, IWorkloadResolver> getResolverForWorkloadSet, DirectoryPath? offlineCache = null, bool cleanAllPacks = false);
Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (2)
49Func<string, string?>? getEnvironmentVariable = null, 59private readonly Func<string, string?> _getEnvironmentVariable = getEnvironmentVariable ?? Environment.GetEnvironmentVariable;
Commands\Workload\Install\WorkloadGarbageCollector.cs (2)
27internal class WorkloadGarbageCollector(string dotnetDir, SdkFeatureBand sdkFeatureBand, IEnumerable<WorkloadId> installedWorkloads, Func<string, IWorkloadResolver> getResolverForWorkloadSet, 33private readonly Func<string, IWorkloadResolver> _getResolverForWorkloadSet = getResolverForWorkloadSet;
Commands\Workload\Install\WorkloadInstallCommand.cs (1)
310internal static void TryRunGarbageCollection(IInstaller workloadInstaller, IReporter reporter, VerbosityOptions verbosity, Func<string, IWorkloadResolver> getResolverForWorkloadSet, DirectoryPath? offlineCache = null)
Commands\Workload\Install\WorkloadManifestUpdater.Managed.cs (1)
33Func<string, string?>? getEnvironmentVariable = null,
PrintableTable.cs (2)
19public Func<T, string> GetContent { get; set; } 24public void AddColumn(string header, Func<T, string> getContent, int maxWidth = int.MaxValue)
SdkVulnerability\SdkReleaseMetadataCache.cs (2)
24private readonly Func<string, string?> _getEnvironmentVariable; 33internal SdkReleaseMetadataCache(string cacheDirectory, Func<string, string?> getEnvironmentVariable)
SdkVulnerability\SdkVulnerabilityChecker.cs (1)
24Func<Product, IEnumerable<ProductRelease>> getProductReleases)
src\sdk\src\Common\SdkVulnerabilityCacheReader.cs (1)
29Func<string, string?> getEnvironmentVariable,
Telemetry\TelemetryCommonProperties.cs (2)
16Func<string, string>? hasher = null, 28private readonly Func<string, string> _hasher = hasher ?? Sha256Hasher.Hash;
Telemetry\TelemetryFilter.cs (2)
13internal class TelemetryFilter(Func<string, string>? hash) : ITelemetryFilter 16private readonly Func<string, string> _hash = hash ?? throw new ArgumentNullException(nameof(hash));
ToolManifest\ToolManifestFinder.cs (2)
19private readonly Func<string, string> _getEnvironmentVariable; 25Func<string, string> getEnvironmentVariable = null)
dotnet-aot (19)
src\sdk\src\Cli\dotnet\Commands\DotNetCommandFactory.cs (2)
27if (!_alwaysRunOutOfProc && TryGetBuiltInCommand(commandName, out var builtInCommand)) 38private static bool TryGetBuiltInCommand(string commandName, out Func<string[], int> commandFunc)
src\sdk\src\Cli\dotnet\Commands\Run\AotRunCommand.cs (1)
51Func<AotRunInvocation, int> launch,
src\sdk\src\Cli\dotnet\Commands\Solution\SolutionCommandParser.cs (1)
22command.AddCommand.SetAction((Func<ParseResult, int>)(_ => throw new CommandNotAvailableInAotException()));
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (2)
49Func<string, string?>? getEnvironmentVariable = null, 59private readonly Func<string, string?> _getEnvironmentVariable = getEnvironmentVariable ?? Environment.GetEnvironmentVariable;
src\sdk\src\Cli\dotnet\PrintableTable.cs (2)
19public Func<T, string> GetContent { get; set; } 24public void AddColumn(string header, Func<T, string> getContent, int maxWidth = int.MaxValue)
src\sdk\src\Cli\dotnet\SdkVulnerability\SdkReleaseMetadataCache.cs (2)
24private readonly Func<string, string?> _getEnvironmentVariable; 33internal SdkReleaseMetadataCache(string cacheDirectory, Func<string, string?> getEnvironmentVariable)
src\sdk\src\Cli\dotnet\SdkVulnerability\SdkVulnerabilityChecker.cs (1)
24Func<Product, IEnumerable<ProductRelease>> getProductReleases)
src\sdk\src\Cli\dotnet\Telemetry\TelemetryCommonProperties.cs (2)
16Func<string, string>? hasher = null, 28private readonly Func<string, string> _hasher = hasher ?? Sha256Hasher.Hash;
src\sdk\src\Cli\dotnet\Telemetry\TelemetryFilter.cs (2)
13internal class TelemetryFilter(Func<string, string>? hash) : ITelemetryFilter 16private readonly Func<string, string> _hash = hash ?? throw new ArgumentNullException(nameof(hash));
src\sdk\src\Cli\dotnet\ToolManifest\ToolManifestFinder.cs (2)
19private readonly Func<string, string> _getEnvironmentVariable; 25Func<string, string> getEnvironmentVariable = null)
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (2)
11private readonly Func<string, string?> _getEnvironmentVariable; 25public CliFolderPathCalculatorCore(Func<string, string?> getEnvironmentVariable)
dotnet-format (5)
Utilities\GeneratedCodeUtilities.cs (4)
12private static readonly Func<SyntaxTrivia, bool> s_isCSharpCommentTrivia = 18private static readonly Func<SyntaxTrivia, bool> s_isVisualBasicCommentTrivia = 29var isCommentTrivia = syntaxTree.Options.Language == LanguageNames.CSharp 64private static bool BeginsWithAutoGeneratedComment(SyntaxNode syntaxRoot, Func<SyntaxTrivia, bool> isComment)
Workspaces\MSBuildWorkspaceFinder.cs (1)
95private static string? FindMatchingFile(string searchBase, Func<string, IEnumerable<string>> fileSelector, string multipleFilesFoundError)
dotnet-svcutil-lib (10)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\Globals.cs (4)
1046private static Func<object, string> s_serializeFunc; 1047private static Func<string, object> s_deserializeFunc; 1060internal static void SetScriptObjectJsonSerializer(Type typeOfScriptObject, Func<object, string> serializeFunc, Func<string, object> deserializeFunc)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AsyncResult.cs (2)
25private Func<IAsyncResult, bool> _checkSyncValidationFunc; 250protected void SetCheckSyncValidationFunc(Func<IAsyncResult, bool> checkSyncValidationFunc)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
52Func<KeyInfoSerializer, IEnumerable<SerializerEntries>> additionalEntries)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSKeyInfoSerializer.cs (1)
16private static Func<KeyInfoSerializer, IEnumerable<SecurityTokenSerializer.SerializerEntries>> CreateAdditionalEntries(SecurityVersion securityVersion, SecureConversationVersion secureConversationVersion)
Metadata\ServiceDescriptor.cs (1)
93public async Task ImportMetadataAsync(Action<WsdlImporter> onWsdlImporterCreated, Action<ServiceDescriptor> onBeforeMetadataImport, Func<ServiceDescriptor, bool> onAfterMetadataImport, CancellationToken cancellationToken)
Shared\Utilities\PathHelper.cs (1)
238private static async Task<string> TryFindItemAsync(Func<string, IEnumerable<string>> EnumerateItems, string itemName, string workingDir, ILogger logger, CancellationToken cancellationToken)
dotnet-watch (1)
CommandLine\CommandLineOptions.cs (1)
369private static int IndexOf<T>(IReadOnlyList<T> list, Func<T, bool> predicate)
GenerateDocumentationAndConfigFiles (424)
Program.cs (1)
1223Func<DiagnosticSeverity?, string> getSeverityString,
src\7a47995420f988d7\AbstractRemoveUnnecessaryImportsService.cs (2)
22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25Document document, Func<SyntaxNode, bool> predicate, CancellationToken cancellationToken)
src\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (1)
16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
19protected readonly Func<TypeInferenceInfo, bool> IsUsableTypeFunc; 24private static readonly Func<TypeInferenceInfo, bool> s_isNotNull = t => t.InferredType != null;
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
29public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (2)
115private readonly Func<INamedTypeSymbol, bool> _isDisallowedCatchType; 121public DisallowGeneralCatchUnlessRethrowWalker(Func<INamedTypeSymbol, bool> isDisallowedCatchType, bool checkAnonymousFunctions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
131public static TOperation? GetAncestor<TOperation>(this IOperation root, OperationKind ancestorKind, Func<TOperation, bool>? predicate = null) 166public static IOperation? GetAncestor(this IOperation root, ImmutableArray<OperationKind> ancestorKinds, Func<IOperation, bool>? predicate = null)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\SourceTextExtensions.cs (1)
25public static T Parse<T>(this SourceText text, Func<StreamReader, T> parser)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (2)
458Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, 473static bool TryParse(string s, (Compilation compilation, Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out SymbolNamesWithValueOption<TValue> option)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
83Func<string, NameParts> getSymbolNamePartsFunc)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (2)
24Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
203internal bool IsTaskOfType([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol, bool> typeArgumentPredicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
17public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 20public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (2)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 80Func<SyntaxEditor, Task> editAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
235Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
501Func<SyntaxTrivia, bool> isEndOfLineTrivia, 521Func<SyntaxToken, bool> isComma, 549Func<SyntaxToken, bool> isAccessibilityModifier)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
195Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 196Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
29Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 52Func<TType, TNode> selector, 96Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 153Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
31private static readonly Func<ISymbol, bool> s_LocalNameFilter = s => 76Func<ISymbol, bool>? filter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
35Func<ISymbol, bool> filter, IEnumerable<string> usedNames, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
35protected static readonly Func<SyntaxNode, bool> s_containsAnnotations = n => n.ContainsAnnotations; 36protected static readonly Func<SyntaxNodeOrToken, bool> s_hasSimplifierAnnotation = n => n.HasAnnotation(Simplifier.Annotation); 40protected abstract ImmutableArray<NodeOrTokenToReduce> GetNodesAndTokensToReduce(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 283Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpan)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
20Func<SyntaxNode, bool>? expandInsideNode, 27Func<SyntaxNode, bool>? expandInsideNode,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (6)
43Func<string, bool>? canUse = null, 63Func<string, bool>? canUse = null, 86Func<string, bool>? canUse = null, 134public static string GenerateUniqueName(string baseName, Func<string, bool> canUse) 140public static string GenerateUniqueName(string baseName, string extension, Func<string, bool> canUse) 160public static string GenerateUniqueName(IEnumerable<string> baseNames, Func<string, bool> canUse)
GetDocument.Insider (11)
Commands\GetDocumentCommandWorker.cs (1)
97var factory = HostFactoryResolver.ResolveHostFactory(assembly,
src\44e1214b125d320f\HostFactoryResolver.cs (10)
41public static Func<string[], TWebHost>? ResolveWebHostFactory<TWebHost>(Assembly assembly) 46public static Func<string[], TWebHostBuilder>? ResolveWebHostBuilderFactory<TWebHostBuilder>(Assembly assembly) 51public static Func<string[], THostBuilder>? ResolveHostBuilderFactory<THostBuilder>(Assembly assembly) 62public static Func<string[], object>? ResolveHostFactory(Assembly assembly, 96private static Func<string[], T>? ResolveFactory<T>(Assembly assembly, string name) 123public static Func<string[], IServiceProvider?>? ResolveServiceProviderFactory(Assembly assembly, TimeSpan? waitTimeout = null) 126var webHostFactory = ResolveWebHostFactory<object>(assembly); 136var webHostBuilderFactory = ResolveWebHostBuilderFactory<object>(assembly); 147var hostBuilderFactory = ResolveHostBuilderFactory<object>(assembly); 158var hostFactory = ResolveHostFactory(assembly, waitTimeout: waitTimeout);
ILAssembler (15)
DocumentCompiler.cs (2)
16public (ImmutableArray<Diagnostic>, PEBuilder?) Compile(SourceText document, Func<string, SourceText> includedDocumentLoader, Func<string, byte[]> resourceLocator, Options options)
EntityRegistry.cs (7)
460static FieldDefinitionHandle GetFieldHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 463static MethodDefinitionHandle GetMethodHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 466static PropertyDefinitionHandle GetPropertyHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 469static EventDefinitionHandle GetEventHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 472static ParameterHandle GetParameterHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex) 475static EntityHandle GetHandleForList(IReadOnlyList<EntityBase> list, IReadOnlyList<EntityBase> listOwner, Func<EntityBase, IReadOnlyList<EntityBase>> getList, int ownerIndex, TableIndex tokenType) 594private TEntity GetOrCreateEntity<TKey, TEntity>(TKey key, TableIndex table, Dictionary<TKey, TEntity> cache, Func<TKey, TEntity> constructor, Action<TEntity> onCreate)
GrammarVisitor.cs (3)
83private readonly Func<string, byte[]> _resourceLocator; 105public GrammarVisitor(IReadOnlyDictionary<string, SourceText> documents, Options options, Func<string, byte[]> resourceLocator) 250Func<IEnumerable<Blob>, BlobContentId>? deterministicIdProvider = _options.Deterministic
PreprocessedTokenSource.cs (2)
19private readonly Func<string, ITokenSource> _loadIncludedDocument; 24public PreprocessedTokenSource(ITokenSource underlyingSource, Func<string, ITokenSource> loadIncludedDocument)
VTableExportPEBuilder.cs (1)
96Func<IEnumerable<Blob>, BlobContentId>? deterministicIdProvider = null,
ILCompiler.Compiler (20)
Compiler\Dataflow\ReflectionMarker.cs (4)
239internal void MarkConstructorsOnType(in MessageOrigin origin, TypeDesc type, Func<MethodDesc, bool>? filter, TypeSystemEntity reason, BindingFlags? bindingFlags = null) 249internal void MarkFieldsOnTypeHierarchy(in MessageOrigin origin, TypeDesc type, Func<FieldDesc, bool> filter, TypeSystemEntity reason, BindingFlags? bindingFlags = BindingFlags.Default) 259internal void MarkPropertiesOnTypeHierarchy(in MessageOrigin origin, TypeDesc type, Func<PropertyPseudoDesc, bool> filter, TypeSystemEntity reason, BindingFlags? bindingFlags = BindingFlags.Default) 269internal void MarkEventsOnTypeHierarchy(in MessageOrigin origin, TypeDesc type, Func<EventPseudoDesc, bool> filter, TypeSystemEntity reason, BindingFlags? bindingFlags = BindingFlags.Default)
Compiler\DependencyAnalysis\NodeFactory.cs (4)
161private Func<TKey, TValue> _creator; 164public NodeCache(Func<TKey, TValue> creator, IEqualityComparer<TKey> comparer) 170public NodeCache(Func<TKey, TValue> creator) 181public TValue GetOrAdd(TKey key, Func<TKey, TValue> creator)
src\runtime\src\coreclr\tools\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
18private readonly Func<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCreator;
src\runtime\src\coreclr\tools\Common\Compiler\Dataflow\DynamicallyAccessedMembersBinder.cs (7)
140public static IEnumerable<MethodDesc> GetConstructorsOnType(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 172public static IEnumerable<MethodDesc> GetMethodsOnTypeHierarchy(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 225public static IEnumerable<FieldDesc> GetFieldsOnTypeHierarchy(this TypeDesc type, Func<FieldDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 266public static IEnumerable<MetadataType> GetNestedTypesOnType(this TypeDesc type, Func<MetadataType, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 292public static IEnumerable<PropertyPseudoDesc> GetPropertiesOnTypeHierarchy(this TypeDesc type, Func<PropertyPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 360public static IEnumerable<EventPseudoDesc> GetEventsOnTypeHierarchy(this TypeDesc type, Func<EventPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 515private static IEnumerable<T> ApplyIncludeInherited<T>(this TypeDesc type, Func<TypeDesc, IEnumerable<T>> selector, bool includeBases)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
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.MetadataTransform (2)
src\runtime\src\coreclr\tools\Common\Internal\LowLevelLinq\LowLevelEnumerable.cs (2)
20public static IEnumerable<U> Select<T, U>(this IEnumerable<T> values, Func<T, U> func) 29public static IEnumerable<T> Where<T>(this IEnumerable<T> source, Func<T, bool> filter)
ILCompiler.ReadyToRun (42)
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (1)
375Func<uint, bool> isEmptyEntryInBucket = (uint bucketIndex) =>
Compiler\DependencyAnalysis\ReadyToRun\ModuleTokenResolver.cs (2)
34private Func<IEcmaModule, int> _moduleIndexLookup; 46public void SetModuleIndexLookup(Func<IEcmaModule, int> moduleIndexLookup)
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (3)
31private Func<TKey, TValue> _creator; 34public NodeCache(Func<TKey, TValue> creator, IEqualityComparer<TKey> comparer) 40public NodeCache(Func<TKey, TValue> creator)
Compiler\ProfileDataManager.cs (1)
45Func<MethodDesc, bool> canBeIncludedInCurrentCompilation,
Compiler\ReadyToRunCodegenCompilation.cs (3)
296private readonly Func<MethodDesc, string> _printReproInstructions; 317private Func<TypeDesc, bool> _computedFixedLayoutTypesUncached; 335Func<MethodDesc, string> printReproInstructions,
Compiler\ReadyToRunCodegenCompilationBuilder.cs (2)
35Func<MethodDesc, string> _printReproInstructions; 163public ReadyToRunCodegenCompilationBuilder UsePrintReproInstructions(Func<MethodDesc, string> printReproInstructions)
Compiler\ReadyToRunCompilationModuleGroupBase.cs (10)
49private readonly Func<TypeDesc, CompilationUnitSet> _layoutCompilationUnitsUncached; 51private readonly Func<TypeDesc, bool> _versionsWithTypeUncached; 53private readonly Func<TypeDesc, bool> _versionsWithTypeReferenceUncached; 55private readonly Func<MethodDesc, bool> _versionsWithMethodUncached; 57private readonly Func<MethodDesc, bool> _crossModuleInlineableCacheUncached; 59private readonly Func<TypeDesc, bool> _crossModuleInlineableTypeCacheUncached; 61private readonly Func<MethodDesc, bool> _crossModuleCompilableCacheUncached; 67private readonly Func<EcmaMethod, bool> _tokenTranslationFreeNonVersionableUncached; 872private static bool ComputeInstantiationVersionsWithCode(Instantiation inst, TypeSystemEntity entityWithInstantiation, Func<TypeDesc, bool> versionsWithTypePredicate) 924static bool ComputeInstantiationTypeVersionsWithCode(Func<TypeDesc, bool> versionsWithTypePredicate, TypeDesc type)
src\runtime\src\coreclr\tools\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
18private readonly Func<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCreator;
src\runtime\src\coreclr\tools\Common\Compiler\Dataflow\DynamicallyAccessedMembersBinder.cs (7)
140public static IEnumerable<MethodDesc> GetConstructorsOnType(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 172public static IEnumerable<MethodDesc> GetMethodsOnTypeHierarchy(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 225public static IEnumerable<FieldDesc> GetFieldsOnTypeHierarchy(this TypeDesc type, Func<FieldDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 266public static IEnumerable<MetadataType> GetNestedTypesOnType(this TypeDesc type, Func<MetadataType, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 292public static IEnumerable<PropertyPseudoDesc> GetPropertiesOnTypeHierarchy(this TypeDesc type, Func<PropertyPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 360public static IEnumerable<EventPseudoDesc> GetEventsOnTypeHierarchy(this TypeDesc type, Func<EventPseudoDesc, bool> filter, BindingFlags? bindingFlags = BindingFlags.Default) 515private static IEnumerable<T> ApplyIncludeInherited<T>(this TypeDesc type, Func<TypeDesc, IEnumerable<T>> selector, bool includeBases)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (2)
4913public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objectToHandle, PgoSchemaElem[] pgoResultsSchemas, out PgoInstrumentationSchema[] nativeSchemas, MemoryStream instrumentationData, Func<TypeDesc, bool> typeFilter = null)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
TypeSystem\Mutable\MutableModule.cs (9)
25readonly Func<ModuleDesc, int> _moduleToIndex; 84Func<ModuleDesc, int> moduleToIndex, 167Func<ModuleDesc, int> _moduleToIndex; 169public Cache(MutableModule module, string assemblyName, AssemblyFlags assemblyFlags, byte[] publicKeyArray, Version version, AssemblyHashAlgorithm hashAlgorithm, Func<ModuleDesc, int> moduleToIndex) 202public Func<T, int?> CreateCacheFunc<T>(Func<TypeSystemMetadataEmitter, object, int> handleFunc) 307Func<ModuleDesc, int> moduleToIndex, 339public Func<TypeSystemEntity, int?> TryGetHandle { get; } 340public Func<string, int?> TryGetStringHandle { get; } 341public Func<AssemblyNameInfo, int?> TryGetAssemblyRefHandle { get; }
ILCompiler.RyuJit (3)
src\runtime\src\coreclr\tools\Common\JitInterface\CorInfoImpl.cs (2)
4913public static void ComputeJitPgoInstrumentationSchema(Func<object, IntPtr> objectToHandle, PgoSchemaElem[] pgoResultsSchemas, out PgoInstrumentationSchema[] nativeSchemas, MemoryStream instrumentationData, Func<TypeDesc, bool> typeFilter = null)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
ILCompiler.TypeSystem (4)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaSignatureTranslator.cs (2)
15private Func<int, int> _getAlternateStreamToken; 17public EcmaSignatureTranslator(BlobReader input, BlobBuilder output, Func<int, int> getAlternateStreamToken)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\ILTokenReplacer.cs (1)
12public static void Replace(byte[] ilStream, Func<int, int> tokenReplaceFunc)
illink (18)
ILLink.CodeFixProvider (1)
UnsafeModifierCodeFixHelpers.cs (1)
36Func<SyntaxNode, bool> isSupportedDeclaration,
ILLink.RoslynAnalyzer (10)
DataFlow\DynamicallyAccessedMembersBinder.cs (7)
137public static IEnumerable<IMethodSymbol> GetConstructorsOnType(this ITypeSymbol type, Func<IMethodSymbol, bool>? filter, BindingFlags? bindingFlags = null) 164public static IEnumerable<IMethodSymbol> GetMethodsOnTypeHierarchy(this ITypeSymbol thisType, Func<IMethodSymbol, bool>? filter, BindingFlags? bindingFlags = null) 209public static IEnumerable<IFieldSymbol> GetFieldsOnTypeHierarchy(this ITypeSymbol thisType, Func<IFieldSymbol, bool>? filter, BindingFlags? bindingFlags = BindingFlags.Default) 250public static IEnumerable<ITypeSymbol> GetNestedTypesOnType(this ITypeSymbol type, Func<ITypeSymbol, bool>? filter, BindingFlags? bindingFlags = BindingFlags.Default) 273public static IEnumerable<IPropertySymbol> GetPropertiesOnTypeHierarchy(this ITypeSymbol thisType, Func<IPropertySymbol, bool>? filter, BindingFlags? bindingFlags = BindingFlags.Default) 328public static IEnumerable<IEventSymbol> GetEventsOnTypeHierarchy(this ITypeSymbol thisType, Func<IEventSymbol, bool>? filter, BindingFlags? bindingFlags = BindingFlags.Default) 470private static IEnumerable<T> ApplyIncludeInherited<T>(this ITypeSymbol thisType, Func<ITypeSymbol, IEnumerable<T>> selector, bool includeBases)
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>
Infrastructure.Tests (5)
src\Shared\PathLookupHelper.cs (5)
110internal static string? FindFullPathFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 132internal static IEnumerable<string> FindAllFullPathsFromPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions = null) 145private static string? FindFullPath(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 155private static IEnumerable<string> FindAllFullPaths(string command, string? pathVariable, char pathSeparator, Func<string, bool> fileExists, string[]? pathExtensions) 208private static bool FileExistsSafe(Func<string, bool> fileExists, string path)
Microsoft.Arcade.Common (4)
ExponentialRetry.cs (2)
44public Task<bool> RunAsync(Func<int, Task<RetryResult>> actionAsync) 50Func<int, Task<RetryResult>> actionAsync,
IRetryHandler.cs (2)
13Func<int, Task<RetryResult>> actionAsync); 16Func<int, Task<RetryResult>> actionAsync,
Microsoft.AspNetCore (6)
BootstrapHostBuilder.cs (1)
79public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) where TContainerBuilder : notnull
ConfigureHostBuilder.cs (1)
112public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) where TContainerBuilder : notnull
ConfigureWebHostBuilder.cs (1)
183IWebHostBuilder ISupportsStartup.UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<WebHostBuilderContext, TStartup> startupFactory)
WebApplication.cs (1)
224public IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware)
WebApplicationBuilder.cs (2)
523_builtApplication.Properties[MiddlewareInvokedKeys.PostRoutingPipeline] = (Func<RequestDelegate, RequestDelegate>)postRoutingPipeline.CreateMiddleware; 533_builtApplication.Properties[MiddlewareInvokedKeys.PostRoutingPipeline] = (Func<RequestDelegate, RequestDelegate>)csrfPostRoutingPipeline.CreateMiddleware;
Microsoft.AspNetCore.App.Analyzers (6)
Infrastructure\VirtualChars\VirtualCharSequence.cs (5)
125public VirtualChar? FirstOrNull(Func<VirtualChar, bool> predicate) 138public VirtualChar? LastOrNull(Func<VirtualChar, bool> predicate) 152public bool Any(Func<VirtualChar, bool> predicate) 165public bool All(Func<VirtualChar, bool> predicate) 181public VirtualCharSequence SkipWhile(Func<VirtualChar, bool> predicate)
src\aspnetcore\src\Shared\RoslynUtils\BoundedCacheWithFactory.cs (1)
30public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
Microsoft.AspNetCore.Authentication (4)
AuthenticationSchemeOptions.cs (1)
89public Func<HttpContext, string?>? ForwardDefaultSelector { get; set; }
Events\RemoteAuthenticationEvents.cs (3)
14public Func<AccessDeniedContext, Task> OnAccessDenied { get; set; } = context => Task.CompletedTask; 19public Func<RemoteFailureContext, Task> OnRemoteFailure { get; set; } = context => Task.CompletedTask; 24public Func<TicketReceivedContext, Task> OnTicketReceived { get; set; } = context => Task.CompletedTask;
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenEvents.cs (1)
14public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; } = context => Task.CompletedTask;
Microsoft.AspNetCore.Authentication.Certificate (3)
Events\CertificateAuthenticationEvents.cs (3)
16public Func<CertificateAuthenticationFailedContext, Task> OnAuthenticationFailed { get; set; } = context => Task.CompletedTask; 26public Func<CertificateValidatedContext, Task> OnCertificateValidated { get; set; } = context => Task.CompletedTask; 31public Func<CertificateChallengeContext, Task> OnChallenge { get; set; } = context => Task.CompletedTask;
Microsoft.AspNetCore.Authentication.Cookies (11)
CookieAuthenticationEvents.cs (9)
20public Func<CookieValidatePrincipalContext, Task> OnValidatePrincipal { get; set; } = context => Task.CompletedTask; 25public Func<CookieSlidingExpirationContext, Task> OnCheckSlidingExpiration { get; set; } = context => Task.CompletedTask; 30public Func<CookieSigningInContext, Task> OnSigningIn { get; set; } = context => Task.CompletedTask; 35public Func<CookieSignedInContext, Task> OnSignedIn { get; set; } = context => Task.CompletedTask; 40public Func<CookieSigningOutContext, Task> OnSigningOut { get; set; } = context => Task.CompletedTask; 45public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToLogin { get; set; } = context => 62public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToAccessDenied { get; set; } = context => 79public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToLogout { get; set; } = context => 95public Func<RedirectContext<CookieAuthenticationOptions>, Task> OnRedirectToReturnUrl { get; set; } = context =>
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (2)
259Func<string, bool> rejectPredicate; 260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
Microsoft.AspNetCore.Authentication.DeviceBoundSessions (3)
PostConfigureDeviceBoundSessionCookieOptions.cs (2)
35var priorSigningIn = options.Events.OnSigningIn; 42var priorSigningOut = options.Events.OnSigningOut;
PostConfigureDeviceBoundSessionDerivedCookieOptions.cs (1)
100var priorValidatePrincipal = options.Events.OnValidatePrincipal;
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
91Func<T, string?> formatter,
Microsoft.AspNetCore.Authentication.JwtBearer (7)
JwtBearerConfigureOptions.cs (1)
16private static readonly Func<string, TimeSpan> _invariantTimeSpanParse = (string timespanString) => TimeSpan.Parse(timespanString, CultureInfo.InvariantCulture);
JwtBearerEvents.cs (5)
14public Func<AuthenticationFailedContext, Task> OnAuthenticationFailed { get; set; } = context => Task.CompletedTask; 19public Func<ForbiddenContext, Task> OnForbidden { get; set; } = context => Task.CompletedTask; 24public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; } = context => Task.CompletedTask; 29public Func<TokenValidatedContext, Task> OnTokenValidated { get; set; } = context => Task.CompletedTask; 34public Func<JwtBearerChallengeContext, Task> OnChallenge { get; set; } = context => Task.CompletedTask;
src\aspnetcore\src\Shared\StringHelpers.cs (1)
8public static T ParseValueOrDefault<T>(string? stringValue, Func<string, T> parser, T defaultValue)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
105Func<T, string> formatter,
Microsoft.AspNetCore.Authentication.Negotiate (4)
Events\NegotiateEvents.cs (4)
14public Func<AuthenticationFailedContext, Task> OnAuthenticationFailed { get; set; } = context => Task.CompletedTask; 20public Func<LdapContext, Task> OnRetrieveLdapClaims { get; set; } = context => Task.CompletedTask; 25public Func<AuthenticatedContext, Task> OnAuthenticated { get; set; } = context => Task.CompletedTask; 30public Func<ChallengeContext, Task> OnChallenge { get; set; } = context => Task.CompletedTask;
Microsoft.AspNetCore.Authentication.OAuth (6)
ClaimActionCollectionMapExtensions.cs (2)
82public static void MapCustomJson(this ClaimActionCollection collection, string claimType, Func<JsonElement, string?> resolver) 97public static void MapCustomJson(this ClaimActionCollection collection, string claimType, string valueType, Func<JsonElement, string?> resolver)
CustomJsonClaimAction.cs (2)
20public CustomJsonClaimAction(string claimType, string valueType, Func<JsonElement, string?> resolver) 29public Func<JsonElement, string?> Resolver { get; }
Events\OAuthEvents.cs (2)
14public Func<OAuthCreatingTicketContext, Task> OnCreatingTicket { get; set; } = context => Task.CompletedTask; 19public Func<RedirectContext<OAuthOptions>, Task> OnRedirectToAuthorizationEndpoint { get; set; } = context =>
Microsoft.AspNetCore.Authentication.OpenIdConnect (14)
Events\OpenIdConnectEvents.cs (11)
14public Func<AuthenticationFailedContext, Task> OnAuthenticationFailed { get; set; } = context => Task.CompletedTask; 19public Func<AuthorizationCodeReceivedContext, Task> OnAuthorizationCodeReceived { get; set; } = context => Task.CompletedTask; 24public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; } = context => Task.CompletedTask; 31public Func<RedirectContext, Task> OnRedirectToIdentityProvider { get; set; } = context => Task.CompletedTask; 36public Func<RedirectContext, Task> OnRedirectToIdentityProviderForSignOut { get; set; } = context => Task.CompletedTask; 41public Func<RemoteSignOutContext, Task> OnSignedOutCallbackRedirect { get; set; } = context => Task.CompletedTask; 46public Func<RemoteSignOutContext, Task> OnRemoteSignOut { get; set; } = context => Task.CompletedTask; 51public Func<TokenResponseReceivedContext, Task> OnTokenResponseReceived { get; set; } = context => Task.CompletedTask; 57public Func<TokenValidatedContext, Task> OnTokenValidated { get; set; } = context => Task.CompletedTask; 62public Func<UserInformationReceivedContext, Task> OnUserInformationReceived { get; set; } = context => Task.CompletedTask; 67public Func<PushedAuthorizationContext, Task> OnPushAuthorization { get; set; } = context => Task.CompletedTask;
OpenIdConnectConfigureOptions.cs (2)
15private static readonly Func<string, TimeSpan> _invariantTimeSpanParse = (string timespanString) => TimeSpan.Parse(timespanString, CultureInfo.InvariantCulture); 16private static readonly Func<string, TimeSpan?> _invariantNullableTimeSpanParse = (string timespanString) => TimeSpan.Parse(timespanString, CultureInfo.InvariantCulture);
src\aspnetcore\src\Shared\StringHelpers.cs (1)
8public static T ParseValueOrDefault<T>(string? stringValue, Func<string, T> parser, T defaultValue)
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterEvents.cs (2)
14public Func<TwitterCreatingTicketContext, Task> OnCreatingTicket { get; set; } = context => Task.CompletedTask; 19public Func<RedirectContext<TwitterOptions>, Task> OnRedirectToAuthorizationEndpoint { get; set; } = context =>
Microsoft.AspNetCore.Authentication.WsFederation (6)
WsFederationEvents.cs (6)
14public Func<AuthenticationFailedContext, Task> OnAuthenticationFailed { get; set; } = context => Task.CompletedTask; 19public Func<MessageReceivedContext, Task> OnMessageReceived { get; set; } = context => Task.CompletedTask; 24public Func<RedirectContext, Task> OnRedirectToIdentityProvider { get; set; } = context => Task.CompletedTask; 29public Func<RemoteSignOutContext, Task> OnRemoteSignOut { get; set; } = context => Task.CompletedTask; 34public Func<SecurityTokenReceivedContext, Task> OnSecurityTokenReceived { get; set; } = context => Task.CompletedTask; 39public Func<SecurityTokenValidatedContext, Task> OnSecurityTokenValidated { get; set; } = context => Task.CompletedTask;
Microsoft.AspNetCore.Authorization (5)
AssertionRequirement.cs (3)
19public Func<AuthorizationHandlerContext, Task<bool>> Handler { get; } 25public AssertionRequirement(Func<AuthorizationHandlerContext, bool> handler) 36public AssertionRequirement(Func<AuthorizationHandlerContext, Task<bool>> handler)
AuthorizationPolicyBuilder.cs (2)
199public AuthorizationPolicyBuilder RequireAssertion(Func<AuthorizationHandlerContext, bool> handler) 212public AuthorizationPolicyBuilder RequireAssertion(Func<AuthorizationHandlerContext, Task<bool>> handler)
Microsoft.AspNetCore.Authorization.Policy (2)
src\aspnetcore\src\Http\Routing\src\DataSourceDependentCache.cs (2)
16private readonly Func<IReadOnlyList<Endpoint>, T> _initializeCore; 27public DataSourceDependentCache(EndpointDataSource dataSource, Func<IReadOnlyList<Endpoint>, T> initialize)
Microsoft.AspNetCore.Components (67)
CascadingValueServiceCollectionExtensions.cs (7)
24this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> initialValueFactory) 37this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> initialValueFactory) 53this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory) 65Func<IServiceProvider, Func<ComponentState, TAttribute, CascadingParameterInfo, CascadingParameterSubscription>> subscribeFactory) 84this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> valueFactory) 102this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> valueFactory) 123this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory)
CompilerServices\RuntimeHelpers.cs (4)
51public static EventCallback<T> CreateInferredEventCallback<T>(object receiver, Func<T, Task> callback, T value) 81public static Func<T, Task> CreateInferredBindSetter<T>(Func<T, Task> callback, T value) 94public static Func<T, Task> CreateInferredBindSetter<T>(Action<T?> callback, T value)
EventCallbackFactory.cs (3)
77public EventCallback Create(object receiver, Func<object, Task> callback) 161public EventCallback<TValue> Create<TValue>(object receiver, Func<TValue, Task> callback) 191public EventCallback<TValue> CreateInferred<TValue>(object receiver, Func<TValue, Task> callback, TValue value)
EventCallbackFactoryBinderExtensions.cs (36)
69Func<string?, Task> setter, 109Func<bool, Task> setter, 149Func<bool?, Task> setter, 189Func<int, Task> setter, 229Func<int?, Task> setter, 269Func<long, Task> setter, 309Func<short, Task> setter, 349Func<long?, Task> setter, 389Func<short?, Task> setter, 429Func<float, Task> setter, 469Func<float?, Task> setter, 509Func<double, Task> setter, 549Func<double?, Task> setter, 589Func<decimal, Task> setter, 629Func<decimal?, Task> setter, 669Func<DateTime, Task> setter, 712Func<DateTime, Task> setter, 753Func<DateTime?, Task> setter, 796Func<DateTime?, Task> setter, 837Func<DateTimeOffset, Task> setter, 880Func<DateTimeOffset, Task> setter, 921Func<DateTimeOffset?, Task> setter, 964Func<DateTimeOffset?, Task> setter, 1005Func<DateOnly, Task> setter, 1048Func<DateOnly, Task> setter, 1089Func<DateOnly?, Task> setter, 1132Func<DateOnly?, Task> setter, 1173Func<TimeOnly, Task> setter, 1216Func<TimeOnly, Task> setter, 1257Func<TimeOnly?, Task> setter, 1300Func<TimeOnly?, Task> setter, 1343Func<T, Task> setter, 1397Func<T, Task> setter, 1402Func<ChangeEventArgs, Task> callback = async e => 1486Func<T, Task> setter, 1492Func<ChangeEventArgs, Task> callback = async e =>
EventCallbackFactoryEventArgsExtensions.cs (2)
34public static EventCallback<EventArgs> Create(this EventCallbackFactory factory, object receiver, Func<EventArgs, Task> callback) 64public static EventCallback<ChangeEventArgs> Create(this EventCallbackFactory factory, object receiver, Func<ChangeEventArgs, Task> callback)
EventCallbackWorkItem.cs (1)
57case Func<T, Task> funcEventArgs:
NavigationManager.cs (8)
34private readonly List<Func<LocationChangingContext, ValueTask>> _locationChangingHandlers = new(); 463var locationChangingHandlersCopy = ArrayPool<Func<LocationChangingContext, ValueTask>>.Shared.Rent(handlerCount); 509ArrayPool<Func<LocationChangingContext, ValueTask>>.Shared.Return(locationChangingHandlersCopy); 538private async ValueTask InvokeLocationChangingHandlerAsync(Func<LocationChangingContext, ValueTask> handler, LocationChangingContext context) 576public IDisposable RegisterLocationChangingHandler(Func<LocationChangingContext, ValueTask> locationChangingHandler) 592private void RemoveLocationChangingHandler(Func<LocationChangingContext, ValueTask> locationChangingHandler) 659private readonly Func<LocationChangingContext, ValueTask> _handler; 662public LocationChangingRegistration(Func<LocationChangingContext, ValueTask> handler, NavigationManager navigationManager)
Routing\IHostEnvironmentNavigationManager.cs (1)
25void Initialize(string baseUri, string uri, Func<string, Task> onNavigateTo) =>
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (5)
15private readonly Func<object, object?> _GetterDelegate; 39getMethod.CreateDelegate(typeof(Func<,>).MakeGenericType(targetType, property.PropertyType)); 44_GetterDelegate = (Func<object, object>) 45callPropertyGetterClosedGenericMethod.CreateDelegate(typeof(Func<object, object>), propertyGetterAsFunc); 56Func<TTarget, TValue> Getter,
Microsoft.AspNetCore.Components.AI (3)
Components\BlockRenderer.cs (1)
42public Func<TBlock, bool>? When { get; set; }
Components\BlockRendererRegistration.cs (2)
10public Func<ContentBlock, bool>? When { get; init; } 12public required Func<ContentBlock, RenderFragment> Render { get; init; }
Microsoft.AspNetCore.Components.Analyzers (4)
InternalUsageAnalyzer.cs (4)
14private readonly Func<ISymbol, bool> _isInternalNamespace; 15private readonly Func<ISymbol, bool> _hasInternalAttribute; 28public InternalUsageAnalyzer(Func<ISymbol, bool> isInInternalNamespace, Func<ISymbol, bool> hasInternalAttribute, DiagnosticDescriptor descriptor)
Microsoft.AspNetCore.Components.Endpoints (23)
CacheView\CacheViewStore.cs (1)
10Func<CancellationToken, ValueTask<SerializedRenderFragment>> factory,
CacheView\HybridCacheViewStore.cs (1)
22Func<CancellationToken, ValueTask<SerializedRenderFragment>> factory,
CacheView\MemoryCacheViewStore.cs (1)
28Func<CancellationToken, ValueTask<SerializedRenderFragment>> factory,
DependencyInjection\HttpNavigationManager.cs (2)
19private Func<string, Task>? _onNavigateTo; 23void IHostEnvironmentNavigationManager.Initialize(string baseUri, string uri, Func<string, Task> onNavigateTo)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (5)
15private readonly Func<object, object?> _GetterDelegate; 39getMethod.CreateDelegate(typeof(Func<,>).MakeGenericType(targetType, property.PropertyType)); 44_GetterDelegate = (Func<object, object>) 45callPropertyGetterClosedGenericMethod.CreateDelegate(typeof(Func<object, object>), propertyGetterAsFunc); 56Func<TTarget, TValue> Getter,
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (2)
259Func<string, bool> rejectPredicate; 260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (11)
46private Func<object, object?>? _valueGetter; 71public Func<object, object?> ValueGetter 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 190private static Func<object, object?> MakeFastPropertyGetter( 230typeof(Func<,>), 243private static Func<object, object?> MakeFastPropertyGetter( 256typeof(Func<object, object?>), 259return (Func<object, object?>)accessorDelegate; 344Func<TDeclaringType, TValue> getter, 361Func<TDeclaringType, TValue> getter,
Microsoft.AspNetCore.Components.Forms (23)
EditContext.cs (5)
49/// <see cref="ValidationRequestedEventArgs.AddAsyncValidator(Func{CancellationToken, Task})"/>, for example 232/// <see cref="ValidationRequestedEventArgs.AddAsyncValidator(Func{CancellationToken, Task})"/> causes an 251/// register via <see cref="ValidationRequestedEventArgs.AddAsyncValidator(Func{CancellationToken, Task})"/>. 337static Task InvokeAsyncValidator(Func<CancellationToken, Task> validate, CancellationToken cancellationToken) 364public void RegisterAsyncFieldValidator(in FieldIdentifier fieldIdentifier, Func<CancellationToken, Task> validator)
FieldIdentifier.cs (6)
19private static readonly ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>> _fieldAccessors = new(); 172ConcurrentDictionary<(Type ModelType, MemberInfo Member), Func<object, object>>? cache = null) 175Func<object, object>? accessor = null; 209static Func<object, object> CreateAccessor((Type model, MemberInfo member) arg) 216var lambda = Expression.Lambda<Func<object, object>>(expression, parameter); 218var func = lambda.Compile();
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (7)
256var func = CreateMemberEvaluator<int>(memberExpression); 261var func = CreateMemberEvaluator<string>(memberExpression); 266var func = CreateMemberEvaluator<ISpanFormattable>(memberExpression); 271var func = CreateMemberEvaluator<IFormattable>(memberExpression); 279static Func<object, TResult> CreateMemberEvaluator<TResult>(MemberExpression memberExpression) 299static Func<object, TResult> CompileMemberEvaluator<TResult>(MemberExpression memberExpression) 304var replacedExpression = Expression.Lambda<Func<object, TResult>>(replacedMemberExpression, parameterExpression);
ValidationRequestedEventArgs.cs (5)
11private List<Func<CancellationToken, Task>>? _asyncValidators; 27/// Async validation can be registered via <see cref="AddAsyncValidator(Func{CancellationToken, Task})"/> only 43public void AddAsyncValidator(Func<CancellationToken, Task> validator) 57internal IReadOnlyList<Func<CancellationToken, Task>> AsyncValidators 58=> _asyncValidators ?? (IReadOnlyList<Func<CancellationToken, Task>>)[];
Microsoft.AspNetCore.Components.QuickGrid (10)
Columns\GridSort.cs (4)
40public static GridSort<TGridItem> ByAscending<U>(Expression<Func<TGridItem, U>> expression) 50public static GridSort<TGridItem> ByDescending<U>(Expression<Func<TGridItem, U>> expression) 60public GridSort<TGridItem> ThenAscending<U>(Expression<Func<TGridItem, U>> expression) 77public GridSort<TGridItem> ThenDescending<U>(Expression<Func<TGridItem, U>> expression)
Columns\PropertyColumn.cs (4)
16private Expression<Func<TGridItem, TProp>>? _lastAssignedProperty; 17private Func<TGridItem, string?>? _cellTextFunc; 23[Parameter, EditorRequired] public Expression<Func<TGridItem, TProp>> Property { get; set; } = default!; 46var compiledPropertyExpression = Property.Compile();
QuickGrid.razor.cs (2)
104[Parameter] public Func<TGridItem, object> ItemKey { get; set; } = x => x!; 156[Parameter] public Func<TGridItem, string?>? RowClass { get; set; }
Microsoft.AspNetCore.Components.SdkAnalyzers (4)
InternalUsageAnalyzer.cs (4)
14private readonly Func<ISymbol, bool> _isInternalNamespace; 15private readonly Func<ISymbol, bool> _hasInternalAttribute; 28public InternalUsageAnalyzer(Func<ISymbol, bool> isInInternalNamespace, Func<ISymbol, bool> hasInternalAttribute, DiagnosticDescriptor descriptor)
Microsoft.AspNetCore.Components.Server (9)
Circuits\CircuitHandler.cs (2)
81public virtual Func<CircuitInboundActivityContext, Task> CreateInboundActivityHandler(Func<CircuitInboundActivityContext, Task> next) => next;
Circuits\CircuitHost.cs (4)
30private Func<Func<Task>, Task> _dispatchInboundActivity; 666private static Func<Func<Task>, Task> BuildInboundActivityDispatcher(IReadOnlyList<CircuitHandler> circuitHandlers, Circuit circuit) 674var result = static (CircuitInboundActivityContext context) => context.Handler(); 678var next = result;
Circuits\HybridCacheCircuitPersistenceProvider.cs (1)
13private static readonly Func<CancellationToken, ValueTask<PersistedCircuitState>> _failOnCreate =
Circuits\RemoteNavigationManager.cs (2)
25private Func<string, Task>? _onNavigateTo; 60public void Initialize(string baseUri, string uri, Func<string, Task> onNavigateTo)
Microsoft.AspNetCore.Components.Web (8)
JSComponents\JSComponentInterop.cs (1)
184var callback = jsObjectReference is null ? null : new Func<object, Task>(
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (7)
256var func = CreateMemberEvaluator<int>(memberExpression); 261var func = CreateMemberEvaluator<string>(memberExpression); 266var func = CreateMemberEvaluator<ISpanFormattable>(memberExpression); 271var func = CreateMemberEvaluator<IFormattable>(memberExpression); 279static Func<object, TResult> CreateMemberEvaluator<TResult>(MemberExpression memberExpression) 299static Func<object, TResult> CompileMemberEvaluator<TResult>(MemberExpression memberExpression) 304var replacedExpression = Expression.Lambda<Func<object, TResult>>(replacedMemberExpression, parameterExpression);
Microsoft.AspNetCore.Components.WebAssembly.Authentication (1)
Options\AuthenticationStateDeserializationOptions.cs (1)
23public Func<AuthenticationStateData?, Task<AuthenticationState>> DeserializationCallback { get; set; } = DeserializeAuthenticationStateAsync;
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
AuthenticationStateSerializationOptions.cs (1)
34public Func<AuthenticationState, ValueTask<AuthenticationStateData?>> SerializationCallback { get; set; }
AuthenticationStateSerializer.cs (1)
16private readonly Func<AuthenticationState, ValueTask<AuthenticationStateData?>> _serializeCallback;
Microsoft.AspNetCore.Components.WebView (1)
src\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
25public ManifestStaticWebAssetFileProvider(StaticWebAssetManifest manifest, Func<string, IFileProvider> fileProviderFactory)
Microsoft.AspNetCore.Connections.Abstractions (15)
ConnectionBuilder.cs (4)
16private readonly IList<Func<ConnectionDelegate, ConnectionDelegate>> _components = new List<Func<ConnectionDelegate, ConnectionDelegate>>(); 31public IConnectionBuilder Use(Func<ConnectionDelegate, ConnectionDelegate> middleware) 45foreach (var component in Enumerable.Reverse(_components))
ConnectionBuilderExtensions.cs (3)
32/// If you aren't calling the next function, use <see cref="Run(IConnectionBuilder, Func{ConnectionContext, Task})"/> instead. 60/// If you aren't calling the next function, use <see cref="Run(IConnectionBuilder, Func{ConnectionContext, Task})"/> instead. 76public static IConnectionBuilder Run(this IConnectionBuilder connectionBuilder, Func<ConnectionContext, Task> middleware)
Features\IConnectionCompleteFeature.cs (1)
20void OnCompleted(Func<object, Task> callback, object state);
Features\IStatefulReconnectFeature.cs (1)
28public void OnReconnected(Func<PipeWriter, Task> notifyOnReconnect);
IConnectionBuilder.cs (1)
23IConnectionBuilder Use(Func<ConnectionDelegate, ConnectionDelegate> middleware);
IMultiplexedConnectionBuilder.cs (1)
23IMultiplexedConnectionBuilder Use(Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate> middleware);
MultiplexedConnectionBuilder.cs (4)
16private readonly IList<Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate>> _components = new List<Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate>>(); 31public IMultiplexedConnectionBuilder Use(Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate> middleware) 45foreach (var component in Enumerable.Reverse(_components))
Microsoft.AspNetCore.CookiePolicy (1)
CookiePolicyOptions.cs (1)
70public Func<HttpContext, bool>? CheckConsentNeeded { get; set; }
Microsoft.AspNetCore.Cors (4)
Infrastructure\CorsMiddleware.cs (1)
18private readonly Func<object, Task> OnResponseStartingDelegate = OnResponseStarting;
Infrastructure\CorsPolicy.cs (2)
15private Func<string, bool> _isOriginAllowed; 82public Func<string, bool> IsOriginAllowed
Infrastructure\CorsPolicyBuilder.cs (1)
206public CorsPolicyBuilder SetIsOriginAllowed(Func<string, bool> isOriginAllowed)
Microsoft.AspNetCore.DataProtection (3)
DataProtectionBuilderExtensions.cs (1)
109public static IDataProtectionBuilder AddKeyEscrowSink(this IDataProtectionBuilder builder, Func<IServiceProvider, IKeyEscrowSink> factory)
KeyManagement\IDeletableKeyManager.cs (1)
47bool DeleteKeys(Func<IKey, bool> shouldDelete);
KeyManagement\XmlKeyManager.cs (1)
414public bool DeleteKeys(Func<IKey, bool> shouldDelete)
Microsoft.AspNetCore.Diagnostics (10)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (2)
40private readonly Func<ErrorContext, Task> _exceptionHandler; 72var nextFilter = _exceptionHandler;
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
27private readonly Func<object, Task> _clearCacheHeadersDelegate;
ExceptionHandler\ExceptionHandlerOptions.cs (2)
51public Func<Exception, int>? StatusCodeSelector { get; set; } 79public Func<ExceptionHandlerSuppressDiagnosticsContext, bool>? SuppressDiagnosticsCallback { get; set; }
src\aspnetcore\src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
StatusCodePage\StatusCodePagesExtensions.cs (3)
61public static IApplicationBuilder UseStatusCodePages(this IApplicationBuilder app, Func<StatusCodeContext, Task> handler) 215private static Func<StatusCodeContext, Task> CreateHandler(string pathFormat, string? queryFormat, RequestDelegate? next = null) 217var handler = async (StatusCodeContext context) =>
StatusCodePage\StatusCodePagesOptions.cs (1)
62public Func<StatusCodeContext, Task> HandleAsync { get; set; }
Microsoft.AspNetCore.Diagnostics.Abstractions (1)
IDeveloperPageExceptionFilter.cs (1)
18Task HandleExceptionAsync(ErrorContext errorContext, Func<ErrorContext, Task> next);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
DatabaseDeveloperPageExceptionFilter.cs (1)
45public async Task HandleExceptionAsync(ErrorContext errorContext, Func<ErrorContext, Task> next)
Microsoft.AspNetCore.Diagnostics.HealthChecks (2)
Builder\HealthCheckApplicationBuilderExtensions.cs (1)
210Func<HttpContext, bool> predicate = c =>
HealthCheckOptions.cs (1)
23public Func<HealthCheckRegistration, bool>? Predicate { get; set; }
Microsoft.AspNetCore.Diagnostics.Middleware (4)
Buffering\IncomingRequestLogBufferHolder.cs (1)
14public IncomingRequestLogBuffer GetOrAdd(string category, Func<string, IncomingRequestLogBuffer> valueFactory) =>
Latency\Internal\HttpLatencyLogEnricher.cs (2)
83private static void AppendSpanEscapingSlash<TX>(StringBuilder sb, ReadOnlySpan<TX> span, Func<TX, string> select) 97private static void AppendSpan<TX, TY>(StringBuilder sb, ReadOnlySpan<TX> span, Func<TX, TY> apply)
Logging\Internal\LoggingRedactionOptionsConfigureOptions.cs (1)
101private static void BindValue<T>(IConfigurationSection section, string key, Func<string, T> parser, Action<T> setter)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (7)
Latency\AcceptanceTests.cs (1)
84private static bool IsMatchByName<TX>(in ReadOnlySpan<TX> span, Func<TX, bool> isMatch)
Latency\AddServerTimingHeaderMiddlewareTests.cs (1)
55public override void OnStarting(Func<object, Task> callback, object state)
Latency\RequestLatencyTelemetryMiddlewareTests.cs (5)
191public override void OnStarting(Func<object, Task> callback, object state) 196public override void OnCompleted(Func<object, Task> callback, object state) 201private void ChainCallback(Func<object, Task> callback, object state) 219feature.Setup(m => m.OnCompleted(It.IsAny<Func<object, Task>>(), It.IsAny<object>())) 220.Callback<Func<object, Task>, object>((c, o) => c(o));
Microsoft.AspNetCore.HeaderPropagation (4)
HeaderPropagationEntry.cs (2)
29Func<HeaderPropagationContext, StringValues>? valueFilter) 62public Func<HeaderPropagationContext, StringValues>? ValueFilter { get; }
HeaderPropagationEntryCollection.cs (2)
37public void Add(string headerName, Func<HeaderPropagationContext, StringValues> valueFilter) 79Func<HeaderPropagationContext, StringValues> valueFilter)
Microsoft.AspNetCore.Hosting (22)
GenericHost\GenericWebHostBuilder.cs (2)
191public IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<WebHostBuilderContext, TStartup> startupFactory) 244var configureServices = configureServicesBuilder.Build(instance);
GenericHost\HostingStartupWebHostBuilder.cs (1)
90public IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<WebHostBuilderContext, TStartup> startupFactory)
GenericHost\SlimWebHostBuilder.cs (1)
72public IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<WebHostBuilderContext, TStartup> startupFactory)
Infrastructure\ISupportsStartup.cs (2)
12/// <see cref="WebHostBuilderExtensions.UseStartup(IWebHostBuilder, Type)"/> and <see cref="WebHostBuilderExtensions.UseStartup{TStartup}(IWebHostBuilder, Func{WebHostBuilderContext, TStartup})"/> 44IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(Func<WebHostBuilderContext, TStartup> startupFactory);
Internal\ConfigureContainerBuilder.cs (1)
18public Func<Action<object>, Action<object>> ConfigureContainerFilters { get; set; } = f => f;
Internal\ConfigureServicesBuilder.cs (4)
19public Func<Func<IServiceCollection, IServiceProvider?>, Func<IServiceCollection, IServiceProvider?>> StartupServiceFilters { get; set; } = f => f; 21public Func<IServiceCollection, IServiceProvider?> Build(object instance) => services => Invoke(instance, services);
Internal\StartupLoader.cs (7)
83public abstract Func<IServiceCollection, IServiceProvider> Build(); 105public override Func<IServiceCollection, IServiceProvider> Build() 108var configureServicesCallback = ConfigureServicesBuilder.Build(Instance); 132Func<IServiceCollection, IServiceProvider> ConfigureServices( 133Func<IServiceCollection, IServiceProvider?> configureServicesCallback, 168private Func<IServiceCollection, IServiceProvider?> BuildStartupServicesFilterPipeline(Func<IServiceCollection, IServiceProvider?> startup)
Internal\StartupMethods.cs (2)
12public StartupMethods(object? instance, Action<IApplicationBuilder> configure, Func<IServiceCollection, IServiceProvider> configureServices) 23public Func<IServiceCollection, IServiceProvider> ConfigureServicesDelegate { get; }
src\aspnetcore\src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (1)
25public ManifestStaticWebAssetFileProvider(StaticWebAssetManifest manifest, Func<string, IFileProvider> fileProviderFactory)
WebHostBuilderExtensions.cs (1)
90public static IWebHostBuilder UseStartup<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TStartup>(this IWebHostBuilder hostBuilder, Func<WebHostBuilderContext, TStartup> startupFactory) where TStartup : class
Microsoft.AspNetCore.Http (30)
Builder\ApplicationBuilder.cs (3)
23private readonly List<Func<RequestDelegate, RequestDelegate>> _components = new(); 120public IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware) 128private static string CreateMiddlewareDescription(Func<RequestDelegate, RequestDelegate> middleware)
DefaultHttpContext.cs (7)
28private static readonly Func<IFeatureCollection, IItemsFeature> _newItemsFeature = f => new ItemsFeature(); 29private static readonly Func<DefaultHttpContext, IServiceProvidersFeature> _newServiceProvidersFeature = context => new RequestServicesFeature(context, context.ServiceScopeFactory); 30private static readonly Func<IFeatureCollection, IHttpAuthenticationFeature> _newHttpAuthenticationFeature = f => new HttpAuthenticationFeature(); 31private static readonly Func<IFeatureCollection, IHttpRequestLifetimeFeature> _newHttpRequestLifetimeFeature = f => new HttpRequestLifetimeFeature(); 32private static readonly Func<IFeatureCollection, ISessionFeature> _newSessionFeature = f => new DefaultSessionFeature(); 33private static readonly Func<IFeatureCollection, ISessionFeature?> _nullSessionFeature = f => null; 34private static readonly Func<IFeatureCollection, IHttpRequestIdentifierFeature> _newHttpRequestIdentifierFeature = f => new HttpRequestIdentifierFeature();
Features\HttpResponseFeature.cs (2)
37public virtual void OnStarting(Func<object, Task> callback, object state) 42public virtual void OnCompleted(Func<object, Task> callback, object state)
Features\QueryFeature.cs (1)
17private static readonly Func<IFeatureCollection, IHttpRequestFeature?> _nullRequestFeature = f => null;
Features\RequestCookiesFeature.cs (1)
15private static readonly Func<IFeatureCollection, IHttpRequestFeature?> _nullRequestFeature = f => null;
Internal\DefaultConnectionInfo.cs (3)
14private static readonly Func<IFeatureCollection, IHttpConnectionFeature> _newHttpConnectionFeature = f => new HttpConnectionFeature(); 15private static readonly Func<IFeatureCollection, ITlsConnectionFeature> _newTlsConnectionFeature = f => new TlsConnectionFeature(); 16private static readonly Func<IFeatureCollection, IConnectionLifetimeNotificationFeature> _newConnectionLifetime = f => new DefaultConnectionLifetimeNotificationFeature(f.Get<IHttpResponseFeature>());
Internal\DefaultHttpRequest.cs (6)
16private static readonly Func<IFeatureCollection, IHttpRequestFeature?> _nullRequestFeature = f => null; 17private static readonly Func<IFeatureCollection, IQueryFeature?> _newQueryFeature = f => new QueryFeature(f); 18private static readonly Func<DefaultHttpRequest, IFormFeature> _newFormFeature = r => new FormFeature(r, r._context.FormOptions ?? FormOptions.Default, r._context.GetEndpoint()); 19private static readonly Func<IFeatureCollection, IRequestCookiesFeature> _newRequestCookiesFeature = f => new RequestCookiesFeature(f); 20private static readonly Func<IFeatureCollection, IRouteValuesFeature> _newRouteValuesFeature = f => new RouteValuesFeature(); 21private static readonly Func<HttpContext, IRequestBodyPipeFeature> _newRequestBodyPipeFeature = context => new RequestBodyPipeFeature(context);
Internal\DefaultHttpResponse.cs (5)
17private static readonly Func<IFeatureCollection, IHttpResponseFeature?> _nullResponseFeature = f => null; 18private static readonly Func<IFeatureCollection, IHttpResponseBodyFeature?> _nullResponseBodyFeature = f => null; 19private static readonly Func<IFeatureCollection, IResponseCookiesFeature?> _newResponseCookiesFeature = f => new ResponseCookiesFeature(f); 127public override void OnStarting(Func<object, Task> callback, object state) 134public override void OnCompleted(Func<object, Task> callback, object state)
Internal\DefaultWebSocketManager.cs (2)
13private static readonly Func<IFeatureCollection, IHttpRequestFeature?> _nullRequestFeature = f => null; 14private static readonly Func<IFeatureCollection, IHttpWebSocketFeature?> _nullWebSocketFeature = f => null;
Microsoft.AspNetCore.Http.Abstractions (24)
Extensions\MapWhenExtensions.cs (2)
9using Predicate = Func<HttpContext, bool>; 23public static IApplicationBuilder MapWhen(this IApplicationBuilder app, Predicate predicate, Action<IApplicationBuilder> configuration)
Extensions\MapWhenOptions.cs (2)
13private Func<HttpContext, bool>? _predicate; 18public Func<HttpContext, bool>? Predicate
Extensions\UseWhenExtensions.cs (2)
8using Predicate = Func<HttpContext, bool>; 22public static IApplicationBuilder UseWhen(this IApplicationBuilder app, Predicate predicate, Action<IApplicationBuilder> configuration)
Features\IConnectionAuthenticationRefreshFeature.cs (1)
20Func<AuthenticationRefreshContext, Task<bool>> OnAuthenticationRefresh { get; set; }
HttpResponse.cs (4)
19private static readonly Func<object, Task> _callbackDelegate = callback => ((Func<Task>)callback)(); 20private static readonly Func<object, Task> _disposeDelegate = state => 91public abstract void OnStarting(Func<object, Task> callback, object state); 110public abstract void OnCompleted(Func<object, Task> callback, object state);
IApplicationBuilder.cs (1)
37IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware);
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (11)
46private Func<object, object?>? _valueGetter; 71public Func<object, object?> ValueGetter 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 190private static Func<object, object?> MakeFastPropertyGetter( 230typeof(Func<,>), 243private static Func<object, object?> MakeFastPropertyGetter( 256typeof(Func<object, object?>), 259return (Func<object, object?>)accessorDelegate; 344Func<TDeclaringType, TValue> getter, 361Func<TDeclaringType, TValue> getter,
src\aspnetcore\src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
Microsoft.AspNetCore.Http.Connections (12)
HttpConnectionDispatcherOptions.cs (1)
157public Func<AuthenticationRefreshContext, Task<bool>>? OnAuthenticationRefresh { get; set; }
Internal\HttpConnectionContext.cs (10)
63private Func<AuthenticationRefreshContext, Task<bool>> _onAuthenticationRefresh = DefaultOnAuthenticationRefreshAsync; 75internal Func<PipeWriter, Task>? NotifyOnReconnect { get; set; } 262public Func<AuthenticationRefreshContext, Task<bool>> OnAuthenticationRefresh 326Func<AuthenticationRefreshContext, Task<bool>>? additionalAuthenticationRefresh = null, 331Func<AuthenticationRefreshContext, Task<bool>> callback; 451Func<AuthenticationRefreshContext, Task<bool>> callback, 465Func<AuthenticationRefreshContext, Task<bool>> callback) 470private async Task<bool> InvokeOnAuthenticationRefreshAsync(Func<AuthenticationRefreshContext, Task<bool>> callback, AuthenticationRefreshContext context) 1103public void OnReconnected(Func<PipeWriter, Task> notifyOnReconnect) 1112var localOnReconnect = NotifyOnReconnect;
WebSocketOptions.cs (1)
28public Func<IList<string>, string>? SubProtocolSelector { get; set; }
Microsoft.AspNetCore.Http.Connections.Client (4)
HttpConnectionOptions.cs (1)
65public Func<HttpMessageHandler, HttpMessageHandler>? HttpMessageHandlerFactory { get; set; }
Internal\WebSocketsTransport.cs (3)
47private Func<PipeWriter, Task>? _notifyOnReconnect; 56public void OnReconnected(Func<PipeWriter, Task> notifyOnReconnect) 64var localNotifyOnReconnect = _notifyOnReconnect;
Microsoft.AspNetCore.Http.Extensions (32)
RequestDelegateFactory.cs (8)
189Expression<Func<HttpContext, object?>> targetFactory = (httpContext) => handler.Target; 210public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory, RequestDelegateFactoryOptions? options) 229public static RequestDelegateResult Create(MethodInfo methodInfo, Func<HttpContext, object>? targetFactory = null, RequestDelegateFactoryOptions? options = null, RequestDelegateMetadataResult? metadataResult = null) 318Expression<Func<HttpContext, object?>>? targetFactory = null) 358Expression<Func<EndpointFilterInvocationContext, ValueTask<object?>>> invokePipeline = (context) => filterPipeline(context); 421private static EndpointFilterDelegate? CreateFilterPipeline(MethodInfo methodInfo, Expression? targetExpression, RequestDelegateFactoryContext factoryContext, Expression<Func<HttpContext, object?>>? targetFactory) 2062var bindAsyncDelegate = Expression.Lambda<Func<HttpContext, ValueTask<object?>>>(bindAsyncMethod.Expression, HttpContextExpr).Compile();
RequestDelegateFactoryContext.cs (1)
41public List<Func<HttpContext, ValueTask<object?>>> ParameterBinders { get; } = new();
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
23typeof(Func<object, object>), // getAwaiterMethod 24typeof(Func<object, bool>), // isCompletedMethod 25typeof(Func<object, object>), // getResultMethod 282var getAwaiterFunc = Expression.Lambda<Func<object, object>>( 293var isCompletedFunc = Expression.Lambda<Func<object, bool>>( 300Func<object, object> getResultFunc; 308getResultFunc = Expression.Lambda<Func<object, object>>( 321getResultFunc = Expression.Lambda<Func<object, object>>(
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorAwaitable.cs (10)
19private readonly Func<object, object> _getAwaiterMethod; 20private readonly Func<object, bool> _isCompletedMethod; 21private readonly Func<object, object> _getResultMethod; 45Func<object, object> getAwaiterMethod, 46Func<object, bool> isCompletedMethod, 47Func<object, object> getResultMethod, 68private readonly Func<object, bool> _isCompletedMethod; 69private readonly Func<object, object> _getResultMethod; 75Func<object, bool> isCompletedMethod, 76Func<object, object> getResultMethod,
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 218(Func<ParameterInfo, Expression>?, int) Finder(Type nonNullableParameterType) 442private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType)
Microsoft.AspNetCore.Http.Features (3)
IHttpResponseFeature.cs (3)
45/// <see cref="OnStarting(Func{object, Task}, object)"/> should no longer be called. 59void OnStarting(Func<object, Task> callback, object state); 67void OnCompleted(Func<object, Task> callback, object state);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\aspnetcore\src\Shared\RoslynUtils\BoundedCacheWithFactory.cs (1)
30public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\aspnetcore\src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
13Func<TSource, TElement> sourceToElementTransform,
Microsoft.AspNetCore.Http.Results (8)
PhysicalFileHttpResult.cs (1)
104internal Func<string, FileInfoWrapper> GetFileInfoWrapper { get; init; } =
PushStreamHttpResult.cs (4)
16private readonly Func<Stream, Task> _streamWriterCallback; 24internal PushStreamHttpResult(Func<Stream, Task> streamWriterCallback, string? contentType) 38Func<Stream, Task> streamWriterCallback, 55Func<Stream, Task> streamWriterCallback,
Results.cs (1)
453Func<Stream, Task> streamWriterCallback,
src\aspnetcore\src\Shared\ResponseContentTypeHelper.cs (1)
30Func<string, Encoding?> getEncoding,
TypedResults.cs (1)
473Func<Stream, Task> streamWriterCallback,
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingOptions.cs (1)
27public Func<string, X509Certificate2> HeaderConverter = (headerValue) => new X509Certificate2(Convert.FromBase64String(headerValue));
Microsoft.AspNetCore.Identity (4)
IdentityPasskeyOptions.cs (3)
158public Func<int, bool>? IsAllowedAlgorithm { get; set; } 172public Func<PasskeyOriginValidationContext, ValueTask<bool>>? ValidateOrigin { get; set; } 185public Func<PasskeyAttestationStatementVerificationContext, ValueTask<bool>>? VerifyAttestationStatement { get; set; }
SecurityStampValidatorOptions.cs (1)
22public Func<SecurityStampRefreshingPrincipalContext, Task>? OnRefreshingPrincipal { get; set; }
Microsoft.AspNetCore.InternalTesting (8)
Logging\ITestSink.cs (2)
15Func<WriteContext, bool> WriteEnabled { get; set; } 17Func<BeginScopeContext, bool> BeginEnabled { get; set; }
Logging\TestLogger.cs (2)
13private readonly Func<LogLevel, bool> _filter; 20public TestLogger(string name, ITestSink sink, Func<LogLevel, bool> filter)
Logging\TestSink.cs (4)
15Func<WriteContext, bool> writeEnabled = null, 16Func<BeginScopeContext, bool> beginEnabled = null) 25public Func<WriteContext, bool> WriteEnabled { get; set; } 27public Func<BeginScopeContext, bool> BeginEnabled { get; set; }
Microsoft.AspNetCore.JsonPatch (39)
JsonPatchDocumentOfT.cs (39)
53public JsonPatchDocument<TModel> Add<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 75Expression<Func<TModel, IList<TProp>>> path, 97public JsonPatchDocument<TModel> Add<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 116public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, TProp>> path) 132public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, IList<TProp>>> path, int position) 150public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, IList<TProp>>> path) 169public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 190public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, IList<TProp>>> path, 211public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 231public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 252public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, IList<TProp>>> path, 273public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 294Expression<Func<TModel, TProp>> from, 295Expression<Func<TModel, TProp>> path) 317Expression<Func<TModel, IList<TProp>>> from, 319Expression<Func<TModel, TProp>> path) 341Expression<Func<TModel, TProp>> from, 342Expression<Func<TModel, IList<TProp>>> path, 366Expression<Func<TModel, IList<TProp>>> from, 368Expression<Func<TModel, IList<TProp>>> path, 391Expression<Func<TModel, IList<TProp>>> from, 393Expression<Func<TModel, IList<TProp>>> path) 414Expression<Func<TModel, TProp>> from, 415Expression<Func<TModel, IList<TProp>>> path) 436Expression<Func<TModel, TProp>> from, 437Expression<Func<TModel, TProp>> path) 459Expression<Func<TModel, IList<TProp>>> from, 461Expression<Func<TModel, TProp>> path) 483Expression<Func<TModel, TProp>> from, 484Expression<Func<TModel, IList<TProp>>> path, 508Expression<Func<TModel, IList<TProp>>> from, 510Expression<Func<TModel, IList<TProp>>> path, 533Expression<Func<TModel, IList<TProp>>> from, 535Expression<Func<TModel, IList<TProp>>> path) 556Expression<Func<TModel, TProp>> from, 557Expression<Func<TModel, IList<TProp>>> path) 660internal string GetPath<TProp>(Expression<Func<TModel, TProp>> expr, string position) 732var lambda = Expression.Lambda<Func<object, object>>(converted, fakeParameter); 733var func = lambda.Compile();
Microsoft.AspNetCore.JsonPatch.SystemTextJson (39)
JsonPatchDocumentOfT.cs (39)
56public JsonPatchDocument<TModel> Add<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 78Expression<Func<TModel, IList<TProp>>> path, 100public JsonPatchDocument<TModel> Add<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 119public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, TProp>> path) 135public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, IList<TProp>>> path, int position) 153public JsonPatchDocument<TModel> Remove<TProp>(Expression<Func<TModel, IList<TProp>>> path) 172public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 193public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, IList<TProp>>> path, 214public JsonPatchDocument<TModel> Replace<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 234public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, TProp>> path, TProp value) 255public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, IList<TProp>>> path, 276public JsonPatchDocument<TModel> Test<TProp>(Expression<Func<TModel, IList<TProp>>> path, TProp value) 297Expression<Func<TModel, TProp>> from, 298Expression<Func<TModel, TProp>> path) 320Expression<Func<TModel, IList<TProp>>> from, 322Expression<Func<TModel, TProp>> path) 344Expression<Func<TModel, TProp>> from, 345Expression<Func<TModel, IList<TProp>>> path, 369Expression<Func<TModel, IList<TProp>>> from, 371Expression<Func<TModel, IList<TProp>>> path, 394Expression<Func<TModel, IList<TProp>>> from, 396Expression<Func<TModel, IList<TProp>>> path) 417Expression<Func<TModel, TProp>> from, 418Expression<Func<TModel, IList<TProp>>> path) 439Expression<Func<TModel, TProp>> from, 440Expression<Func<TModel, TProp>> path) 462Expression<Func<TModel, IList<TProp>>> from, 464Expression<Func<TModel, TProp>> path) 486Expression<Func<TModel, TProp>> from, 487Expression<Func<TModel, IList<TProp>>> path, 511Expression<Func<TModel, IList<TProp>>> from, 513Expression<Func<TModel, IList<TProp>>> path, 536Expression<Func<TModel, IList<TProp>>> from, 538Expression<Func<TModel, IList<TProp>>> path) 559Expression<Func<TModel, TProp>> from, 560Expression<Func<TModel, IList<TProp>>> path) 672internal string GetPath<TProp>(Expression<Func<TModel, TProp>> expr, string position) 747var lambda = Expression.Lambda<Func<object, object>>(converted, fakeParameter); 748var func = lambda.Compile();
Microsoft.AspNetCore.Localization (2)
CustomRequestCultureProvider.cs (2)
13private readonly Func<HttpContext, Task<ProviderCultureResult?>> _provider; 19public CustomRequestCultureProvider(Func<HttpContext, Task<ProviderCultureResult?>> provider)
Microsoft.AspNetCore.MiddlewareAnalysis (1)
AnalysisBuilder.cs (1)
63public IApplicationBuilder Use(Func<RequestDelegate, RequestDelegate> middleware)
Microsoft.AspNetCore.Mvc.Abstractions (18)
ModelBinding\BindingInfo.cs (4)
87public Func<ActionContext, bool>? RequestPredicate { get; set; } 280public Func<ModelMetadata, bool> PropertyFilter => CreatePropertyFilter(); 282private Func<ModelMetadata, bool> CreatePropertyFilter() 290foreach (var propertyFilter in propertyFilters)
ModelBinding\IPropertyFilterProvider.cs (1)
19Func<ModelMetadata, bool> PropertyFilter { get; }
ModelBinding\IRequestPredicateProvider.cs (1)
16Func<ActionContext, bool> RequestPredicate { get; }
ModelBinding\Metadata\ModelBindingMessageProvider.cs (6)
18public virtual Func<string, string> MissingBindRequiredValueAccessor { get; } = default!; 39public virtual Func<string, string> ValueMustNotBeNullAccessor { get; } = default!; 55public virtual Func<string, string> NonPropertyAttemptedValueIsInvalidAccessor { get; } = default!; 63public virtual Func<string, string> UnknownValueIsInvalidAccessor { get; } = default!; 78public virtual Func<string, string> ValueIsInvalidAccessor { get; } = default!; 85public virtual Func<string, string> ValueMustBeANumberAccessor { get; } = default!;
ModelBinding\ModelBindingContext.cs (1)
96public abstract Func<ModelMetadata, bool>? PropertyFilter { get; set; }
ModelBinding\ModelMetadata.cs (2)
601public abstract Func<object, object?>? PropertyGetter { get; } 611public virtual Func<object?[], object>? BoundConstructorInvoker => null;
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 218(Func<ParameterInfo, Expression>?, int) Finder(Type nonNullableParameterType) 442private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointModelMetadata.cs (1)
46public override Func<object, object>? PropertyGetter { get; }
Microsoft.AspNetCore.Mvc.Core (124)
ApiBehaviorOptions.cs (2)
18private Func<ActionContext, IActionResult> _invalidModelStateResponseFactory = default!; 24public Func<ActionContext, IActionResult> InvalidModelStateResponseFactory
ApplicationModels\DefaultApplicationModelProvider.cs (3)
25private readonly Func<ActionContext, bool> _supportsAllRequests; 26private readonly Func<ActionContext, bool> _supportsNonGetRequests; 230var requestPredicate = bindPropertiesAttribute.SupportsGet ? _supportsAllRequests : _supportsNonGetRequests;
ApplicationParts\RelatedAssemblyAttribute.cs (1)
50Func<string, bool> fileExists,
BindAttribute.cs (3)
16private static readonly Func<ModelMetadata, bool> _default = (m) => true; 18private Func<ModelMetadata, bool>? _propertyFilter; 52public Func<ModelMetadata, bool> PropertyFilter
BindPropertyAttribute.cs (3)
22private static readonly Func<ActionContext, bool> _supportsAllRequests = (c) => true; 23private static readonly Func<ActionContext, bool> _supportsNonGetRequests = IsNonGetRequest; 81Func<ActionContext, bool> IRequestPredicateProvider.RequestPredicate
ControllerBase.cs (5)
2611params Expression<Func<TModel, object?>>[] includeExpressions) 2648Func<ModelMetadata, bool> propertyFilter) 2688params Expression<Func<TModel, object?>>[] includeExpressions) 2722Func<ModelMetadata, bool> propertyFilter) 2792Func<ModelMetadata, bool> propertyFilter)
Controllers\ControllerActivatorProvider.cs (2)
18private readonly Func<ControllerContext, object>? _controllerActivatorCreate; 40public Func<ControllerContext, object> CreateActivator(ControllerActionDescriptor descriptor)
Controllers\ControllerFactoryProvider.cs (3)
12private readonly Func<ControllerContext, object>? _factoryCreateController; 38public Func<ControllerContext, object> CreateControllerFactory(ControllerActionDescriptor descriptor) 56var controllerActivator = _activatorProvider.CreateActivator(descriptor);
Controllers\DefaultControllerPropertyActivator.cs (1)
13private static readonly Func<Type, PropertyActivator<ControllerContext>[]> _getPropertiesToActivate =
Controllers\IControllerActivatorProvider.cs (2)
12/// Creates a <see cref="Func{T, TResult}"/> that creates a controller. 16Func<ControllerContext, object> CreateActivator(ControllerActionDescriptor descriptor);
Controllers\IControllerFactoryProvider.cs (1)
16Func<ControllerContext, object> CreateControllerFactory(ControllerActionDescriptor descriptor);
Infrastructure\ActionSelectionTable.cs (1)
103Func<T, IEnumerable<string>?> getRouteKeys,
Infrastructure\ControllerActionInvokerCache.cs (1)
62var controllerFactory = _controllerFactoryProvider.CreateControllerFactory(actionDescriptor);
Infrastructure\ControllerActionInvokerCacheEntry.cs (2)
14Func<ControllerContext, object> controllerFactory, 32public Func<ControllerContext, object> ControllerFactory { get; }
Infrastructure\TypeActivatorCache.cs (1)
15private readonly Func<Type, ObjectFactory> _createFactory =
ModelBinding\Binders\ComplexObjectModelBinder.cs (1)
408var metadataProviderFilter = bindingContext.ModelMetadata.PropertyFilterProvider?.PropertyFilter;
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
232var metadataProviderFilter = bindingContext.ModelMetadata.PropertyFilterProvider?.PropertyFilter;
ModelBinding\DefaultModelBindingContext.cs (2)
137public override Func<ModelMetadata, bool>? PropertyFilter 331public Func<ModelMetadata, bool>? PropertyFilter;
ModelBinding\DefaultPropertyFilterProvider.cs (5)
19private static readonly Func<ModelMetadata, bool> _default = (m) => true; 30public virtual IEnumerable<Expression<Func<TModel, object?>>>? PropertyIncludeExpressions => null; 33public virtual Func<ModelMetadata, bool> PropertyFilter 47private static Func<ModelMetadata, bool> GetPropertyFilterFromExpression( 48IEnumerable<Expression<Func<TModel, object?>>> includeExpressions)
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (3)
177public Func<ModelMetadata, bool> PropertyFilter => CreatePropertyFilter(); 179private Func<ModelMetadata, bool> CreatePropertyFilter() 187foreach (var propertyFilter in propertyFilters)
ModelBinding\Metadata\DefaultMetadataDetails.cs (2)
62public Func<object, object?>? PropertyGetter { get; set; } 72public Func<object?[], object>? BoundConstructorInvoker { get; set; }
ModelBinding\Metadata\DefaultModelBindingMessageProvider.cs (18)
16private Func<string, string> _missingBindRequiredValueAccessor; 19private Func<string, string> _valueMustNotBeNullAccessor; 21private Func<string, string> _nonPropertyAttemptedValueIsInvalidAccessor; 22private Func<string, string> _unknownValueIsInvalidAccessor; 24private Func<string, string> _valueIsInvalidAccessor; 25private Func<string, string> _valueMustBeANumberAccessor; 69public override Func<string, string> MissingBindRequiredValueAccessor => _missingBindRequiredValueAccessor; 76public void SetMissingBindRequiredValueAccessor(Func<string, string> missingBindRequiredValueAccessor) 114public override Func<string, string> ValueMustNotBeNullAccessor => _valueMustNotBeNullAccessor; 121public void SetValueMustNotBeNullAccessor(Func<string, string> valueMustNotBeNullAccessor) 144public override Func<string, string> NonPropertyAttemptedValueIsInvalidAccessor => _nonPropertyAttemptedValueIsInvalidAccessor; 152Func<string, string> nonPropertyAttemptedValueIsInvalidAccessor) 160public override Func<string, string> UnknownValueIsInvalidAccessor => _unknownValueIsInvalidAccessor; 167public void SetUnknownValueIsInvalidAccessor(Func<string, string> unknownValueIsInvalidAccessor) 190public override Func<string, string> ValueIsInvalidAccessor => _valueIsInvalidAccessor; 197public void SetValueIsInvalidAccessor(Func<string, string> valueIsInvalidAccessor) 205public override Func<string, string> ValueMustBeANumberAccessor => _valueMustBeANumberAccessor; 212public void SetValueMustBeANumberAccessor(Func<string, string> valueMustBeANumberAccessor)
ModelBinding\Metadata\DefaultModelMetadata.cs (2)
548public override Func<object, object?>? PropertyGetter => _details.PropertyGetter; 554public override Func<object?[], object>? BoundConstructorInvoker => _details.BoundConstructorInvoker;
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (4)
21private readonly Func<ModelMetadataIdentity, ModelMetadataCacheEntry> _cacheEntryFactory; 253static Func<object?[], object> CreateObjectFactory(ConstructorInfo constructor) 258var factoryLamda = Expression.Lambda<Func<object?[], object>>(factoryExpressionBody, args); 369var getter = PropertyHelper.MakeNullSafeFastPropertyGetter(propertyHelper.Property);
ModelBinding\ModelBindingHelper.cs (9)
85params Expression<Func<TModel, object?>>[] includeExpressions) 91var propertyFilter = expression.Compile(); 131Func<ModelMetadata, bool> propertyFilter) 212Func<ModelMetadata, bool> propertyFilter) 327public static Expression<Func<ModelMetadata, bool>> GetPropertyFilterExpression<TModel>( 328Expression<Func<TModel, object?>>[] expressions) 346return Expression.Lambda<Func<ModelMetadata, bool>>(orWrapperExpression, firstExpression.Parameters); 349private static Expression<Func<ModelMetadata, bool>> GetPredicateExpression<TModel>( 350Expression<Func<TModel, object?>> expression)
ModelBinding\Validation\DefaultCollectionValidationStrategy.cs (4)
49private readonly ConcurrentDictionary<Type, Func<object, IEnumerator>> _genericGetEnumeratorCache = new ConcurrentDictionary<Type, Func<object, IEnumerator>>(); 67Func<object, IEnumerator> getEnumerator = _genericGetEnumeratorCache.GetOrAdd( 74Expression.Lambda<Func<object, IEnumerator>>(
Routing\AttributeRoute.cs (2)
19private readonly Func<ActionDescriptor[], IRouter> _handlerFactory; 26Func<ActionDescriptor[], IRouter> handlerFactory)
src\aspnetcore\src\Http\Routing\src\DataSourceDependentCache.cs (2)
16private readonly Func<IReadOnlyList<Endpoint>, T> _initializeCore; 27public DataSourceDependentCache(EndpointDataSource dataSource, Func<IReadOnlyList<Endpoint>, T> initialize)
src\aspnetcore\src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (2)
259Func<string, bool> rejectPredicate; 260Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
23typeof(Func<object, object>), // getAwaiterMethod 24typeof(Func<object, bool>), // isCompletedMethod 25typeof(Func<object, object>), // getResultMethod 282var getAwaiterFunc = Expression.Lambda<Func<object, object>>( 293var isCompletedFunc = Expression.Lambda<Func<object, bool>>( 300Func<object, object> getResultFunc; 308getResultFunc = Expression.Lambda<Func<object, object>>( 321getResultFunc = Expression.Lambda<Func<object, object>>(
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorAwaitable.cs (10)
19private readonly Func<object, object> _getAwaiterMethod; 20private readonly Func<object, bool> _isCompletedMethod; 21private readonly Func<object, object> _getResultMethod; 45Func<object, object> getAwaiterMethod, 46Func<object, bool> isCompletedMethod, 47Func<object, object> getResultMethod, 68private readonly Func<object, bool> _isCompletedMethod; 69private readonly Func<object, object> _getResultMethod; 75Func<object, bool> isCompletedMethod, 76Func<object, object> getResultMethod,
src\aspnetcore\src\Shared\PropertyActivator\PropertyActivator.cs (4)
14private readonly Func<TContext, object> _valueAccessor; 19Func<TContext, object> valueAccessor) 40Func<PropertyInfo, PropertyActivator<TContext>> createActivateInfo) 52Func<PropertyInfo, PropertyActivator<TContext>> createActivateInfo,
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (11)
46private Func<object, object?>? _valueGetter; 71public Func<object, object?> ValueGetter 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 190private static Func<object, object?> MakeFastPropertyGetter( 230typeof(Func<,>), 243private static Func<object, object?> MakeFastPropertyGetter( 256typeof(Func<object, object?>), 259return (Func<object, object?>)accessorDelegate; 344Func<TDeclaringType, TValue> getter, 361Func<TDeclaringType, TValue> getter,
src\aspnetcore\src\Shared\ResponseContentTypeHelper.cs (1)
30Func<string, Encoding?> getEncoding,
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
ProblemDetailsWrapperProviderFactory.cs (2)
25public WrapperProvider(Type wrappingType, Func<object?, object?> wrapDelegate) 33public Func<object?, object?> WrapDelegate { get; }
Microsoft.AspNetCore.Mvc.NewtonsoftJson (11)
BsonTempDataSerializer.cs (10)
26private static readonly ConcurrentDictionary<Type, Func<JArray, object>> _arrayConverters = 27new ConcurrentDictionary<Type, Func<JArray, object>>(); 28private static readonly ConcurrentDictionary<Type, Func<JObject, object>> _dictionaryConverters = 29new ConcurrentDictionary<Type, Func<JObject, object>>(); 67var arrayConverter = _arrayConverters.GetOrAdd(returnType, type => 69return (Func<JArray, object>)_convertArrayMethodInfo 71.CreateDelegate(typeof(Func<JArray, object>)); 94var dictionaryConverter = _dictionaryConverters.GetOrAdd(valueType, type => 96return (Func<JObject, object>)_convertDictionaryMethodInfo 98.CreateDelegate(typeof(Func<JObject, object>));
src\aspnetcore\src\Shared\ResponseContentTypeHelper.cs (1)
30Func<string, Encoding?> getEncoding,
Microsoft.AspNetCore.Mvc.Razor (15)
DefaultTagHelperFactory.cs (2)
21private readonly Func<Type, PropertyActivator<ViewContext>[]> _getPropertiesToActivate; 22private static readonly Func<PropertyInfo, PropertyActivator<ViewContext>> _createActivateInfo = CreateActivateInfo;
HelperResult.cs (3)
14private readonly Func<TextWriter, Task> _asyncAction; 23public HelperResult(Func<TextWriter, Task> asyncAction) 33public Func<TextWriter, Task> WriteAction => _asyncAction;
RazorPageBase.cs (1)
371protected void DefineSection(string name, Func<object?, Task> section)
RazorPagePropertyActivator.cs (7)
20private readonly Func<ViewDataDictionary, ViewDataDictionary> _nestedFactory; 80Func<ViewContext, object> valueAccessor; 139public Func<ViewContext, object> UrlHelperAccessor { get; init; } = default!; 141public Func<ViewContext, object> JsonHelperAccessor { get; init; } = default!; 143public Func<ViewContext, object> DiagnosticSourceAccessor { get; init; } = default!; 145public Func<ViewContext, object> HtmlEncoderAccessor { get; init; } = default!; 147public Func<ViewContext, object> ModelExpressionProviderAccessor { get; init; } = default!;
TagHelpers\TagHelperComponentPropertyActivator.cs (2)
19private readonly Func<Type, PropertyActivator<ViewContext>[]> _getPropertiesToActivate = GetPropertiesToActivate; 20private static readonly Func<PropertyInfo, PropertyActivator<ViewContext>> _createActivateInfo = CreateActivateInfo;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
ChecksumValidator.cs (1)
98Func<Stream, byte[]> hashData;
Microsoft.AspNetCore.Mvc.RazorPages (24)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (3)
17private readonly Func<ActionContext, bool> _supportsAllRequests; 18private readonly Func<ActionContext, bool> _supportsNonGetRequests; 123var requestPredicate = bindPropertiesAttribute.SupportsGet ? _supportsAllRequests : _supportsNonGetRequests;
DependencyInjection\PageConventionCollectionExtensions.cs (1)
25Func<PageApplicationModel, IFilterMetadata> factory)
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
19public Func<PageContext, object> CreateActivator(CompiledPageActionDescriptor actionDescriptor)
Infrastructure\DefaultPageModelFactoryProvider.cs (3)
11private static readonly Func<PropertyInfo, PropertyActivator<PageContext>> _createActivateInfo = 20public Func<PageContext, object>? CreateModelFactory(CompiledPageActionDescriptor descriptor) 29var modelActivator = _modelActivator.CreateActivator(descriptor);
Infrastructure\PageActionInvokerCache.cs (1)
85Func<PageContext, object>? modelFactory = null;
Infrastructure\PageActionInvokerCacheEntry.cs (2)
19Func<PageContext, object>? modelFactory, 49public Func<PageContext, object>? ModelFactory { get; }
Infrastructure\ServiceBasedPageModelActivatorProvider.cs (1)
14public Func<PageContext, object> CreateActivator(CompiledPageActionDescriptor descriptor)
IPageModelActivatorProvider.cs (1)
16Func<PageContext, object> CreateActivator(CompiledPageActionDescriptor descriptor);
IPageModelFactoryProvider.cs (1)
16Func<PageContext, object>? CreateModelFactory(CompiledPageActionDescriptor descriptor);
PageBase.cs (5)
1355params Expression<Func<TModel, object?>>[] includeExpressions) 1391Func<ModelMetadata, bool> propertyFilter) 1430params Expression<Func<TModel, object?>>[] includeExpressions) 1463Func<ModelMetadata, bool> propertyFilter) 1531Func<ModelMetadata, bool> propertyFilter)
PageModel.cs (5)
260params Expression<Func<TModel, object?>>[] includeExpressions) 296Func<ModelMetadata, bool> propertyFilter) 335params Expression<Func<TModel, object?>>[] includeExpressions) 368Func<ModelMetadata, bool> propertyFilter) 436Func<ModelMetadata, bool> propertyFilter)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
JavaScriptResources.cs (1)
31Func<string, Stream> getManifestResourceStream,
Microsoft.AspNetCore.Mvc.Testing (20)
DeferredHostBuilder.cs (3)
16private Func<string[], object>? _hostFactory; 89public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) where TContainerBuilder : notnull 113public void SetHostFactory(Func<string[], object> hostFactory)
src\44e1214b125d320f\HostFactoryResolver.cs (10)
41public static Func<string[], TWebHost>? ResolveWebHostFactory<TWebHost>(Assembly assembly) 46public static Func<string[], TWebHostBuilder>? ResolveWebHostBuilderFactory<TWebHostBuilder>(Assembly assembly) 51public static Func<string[], THostBuilder>? ResolveHostBuilderFactory<THostBuilder>(Assembly assembly) 62public static Func<string[], object>? ResolveHostFactory(Assembly assembly, 96private static Func<string[], T>? ResolveFactory<T>(Assembly assembly, string name) 123public static Func<string[], IServiceProvider?>? ResolveServiceProviderFactory(Assembly assembly, TimeSpan? waitTimeout = null) 126var webHostFactory = ResolveWebHostFactory<object>(assembly); 136var webHostBuilderFactory = ResolveWebHostBuilderFactory<object>(assembly); 147var hostBuilderFactory = ResolveHostBuilderFactory<object>(assembly); 158var hostFactory = ResolveHostFactory(assembly, waitTimeout: waitTimeout);
WebApplicationFactory.cs (7)
319var factory = HostFactoryResolver.ResolveHostFactory( 894private readonly Func<IWebHostBuilder, TestServer> _createServer; 895private readonly Func<IServiceProvider, TestServer> _createServerFromServiceProvider; 896private readonly Func<IHostBuilder, IHost> _createHost; 904Func<IWebHostBuilder, TestServer> createServer, 905Func<IServiceProvider, TestServer> createServerFromServiceProvider, 906Func<IHostBuilder, IHost> createHost,
Microsoft.AspNetCore.Mvc.ViewFeatures (135)
CachedExpressionCompiler.cs (31)
22public static Func<TModel, object> Process<TModel, TResult>( 23Expression<Func<TModel, TResult>> expression) 32private static Func<TModel, object> _identityFunc; 34private static readonly ConcurrentDictionary<MemberInfo, Func<TModel, object>> _simpleMemberAccessCache = 35new ConcurrentDictionary<MemberInfo, Func<TModel, object>>(); 37private static readonly ConcurrentDictionary<MemberExpressionCacheKey, Func<TModel, object>> _chainedMemberAccessCache = 38new ConcurrentDictionary<MemberExpressionCacheKey, Func<TModel, object>>(MemberExpressionCacheKeyComparer.Instance); 40private static readonly ConcurrentDictionary<MemberInfo, Func<object, TResult>> _constMemberAccessCache = 41new ConcurrentDictionary<MemberInfo, Func<object, TResult>>(); 43public static Func<TModel, object> Compile(Expression<Func<TModel, TResult>> expression) 98private static Func<TModel, object> CompileFromConstLookup( 106private static Func<TModel, object> CompileFromIdentityFunc( 107Expression<Func<TModel, TResult>> expression) 113var identityFuncCore = expression.Compile(); 120private static Func<TModel, object> CompileFromStaticMemberAccess( 121Expression<Func<TModel, TResult>> expression, 125if (_simpleMemberAccessCache.TryGetValue(memberExpression.Member, out var result)) 130var func = expression.Compile(); 137private static Func<TModel, object> CompileFromSimpleMemberAccess( 138Expression<Func<TModel, TResult>> expression, 143if (_simpleMemberAccessCache.TryGetValue(memberExpression.Member, out var result)) 152private static Func<TModel, object> CompileForChainedMemberAccess( 153Expression<Func<TModel, TResult>> expression, 159if (_chainedMemberAccessCache.TryGetValue(key, out var result)) 169private static Func<TModel, object> CompileCapturedConstant(MemberExpression memberExpression, ConstantExpression constantExpression) 172if (!_constMemberAccessCache.TryGetValue(memberExpression.Member, out var result)) 179var replacementExpression = Expression.Lambda<Func<object, TResult>>( 191private static Func<TModel, object> Rewrite( 192Expression<Func<TModel, TResult>> expression, 230var rewrittenExpression = Expression.Lambda<Func<TModel, object>>(body, expression.Parameters);
ExpressionHelper.cs (2)
215var lambda = Expression.Lambda<Func<object, object>>(converted, fakeParameter); 216Func<object, object> func;
ExpressionMetadataProvider.cs (4)
15Expression<Func<TModel, TResult>> expression, 78var cachedFunc = CachedExpressionCompiler.Process(expression); 84var func = expression.Compile(); 179Func<object, object> modelAccessor = (ignore) => viewDataInfo.Value;
Filters\SaveTempDataFilter.cs (1)
14private static readonly Func<object, Task> OnStartingCallback = (state) => OnStarting((HttpContext)state);
HtmlHelperOfT.cs (21)
92Expression<Func<TModel, bool>> expression, 107Expression<Func<TModel, TResult>> expression, 125Expression<Func<TModel, TResult>> expression, 141public string DisplayNameFor<TResult>(Expression<Func<TModel, TResult>> expression) 151Expression<Func<TModelItem, TResult>> expression) 163public string DisplayTextFor<TResult>(Expression<Func<TModel, TResult>> expression) 172Expression<Func<TModel, TResult>> expression, 189Expression<Func<TModel, TResult>> expression, 204public string IdFor<TResult>(Expression<Func<TModel, TResult>> expression) 213Expression<Func<TModel, TResult>> expression, 225Expression<Func<TModel, TResult>> expression, 238public string NameFor<TResult>(Expression<Func<TModel, TResult>> expression) 248Expression<Func<TModel, TResult>> expression, 263Expression<Func<TModel, TResult>> expression, 281Expression<Func<TModel, TResult>> expression, 294Expression<Func<TModel, TResult>> expression, 309private ModelExpression GetModelExpression<TResult>(Expression<Func<TModel, TResult>> expression) 319protected string GetExpressionName<TResult>(Expression<Func<TModel, TResult>> expression) 332protected ModelExplorer GetModelExplorer<TResult>(Expression<Func<TModel, TResult>> expression) 342Expression<Func<TModel, TResult>> expression, 359public string ValueFor<TResult>(Expression<Func<TModel, TResult>> expression, string format)
IModelExpressionProvider.cs (1)
24Expression<Func<TModel, TValue>> expression);
ModelExplorer.cs (8)
19private Func<object, object> _modelAccessor; 52Func<object, object> modelAccessor) 260public ModelExplorer GetExplorerForProperty(string name, Func<object, object> modelAccessor) 357/// <see cref="GetExplorerForExpression(Type, Func{object, object})"/> 365public ModelExplorer GetExplorerForExpression(Type modelType, Func<object, object> modelAccessor) 382/// <see cref="GetExplorerForExpression(ModelMetadata, Func{object, object})"/> 390public ModelExplorer GetExplorerForExpression(ModelMetadata metadata, Func<object, object> modelAccessor) 419var modelAccessor = new Func<object, object>((c) =>
ModelExpressionProvider.cs (2)
37public string GetExpressionText<TModel, TValue>(Expression<Func<TModel, TValue>> expression) 47Expression<Func<TModel, TValue>> expression)
ModelStateDictionaryExtensions.cs (5)
27Expression<Func<TModel, object>> expression, 54Expression<Func<TModel, object>> expression, 76Expression<Func<TModel, object>> expression, 99Expression<Func<TModel, object>> expression) 116Expression<Func<TModel, object>> expression)
Rendering\HtmlHelperDisplayExtensions.cs (5)
233Expression<Func<TModel, TResult>> expression) 272Expression<Func<TModel, TResult>> expression, 308Expression<Func<TModel, TResult>> expression, 349Expression<Func<TModel, TResult>> expression, 390Expression<Func<TModel, TResult>> expression,
Rendering\HtmlHelperDisplayNameExtensions.cs (1)
38Expression<Func<TModelItem, TResult>> expression)
Rendering\HtmlHelperEditorExtensions.cs (5)
230Expression<Func<TModel, TResult>> expression) 265Expression<Func<TModel, TResult>> expression, 301Expression<Func<TModel, TResult>> expression, 338Expression<Func<TModel, TResult>> expression, 379Expression<Func<TModel, TResult>> expression,
Rendering\HtmlHelperInputExtensions.cs (9)
118Expression<Func<TModel, bool>> expression) 196Expression<Func<TModel, TResult>> expression) 262Expression<Func<TModel, TResult>> expression) 403Expression<Func<TModel, TResult>> expression, 551Expression<Func<TModel, TResult>> expression) 582Expression<Func<TModel, TResult>> expression, 616Expression<Func<TModel, TResult>> expression, 762Expression<Func<TModel, TResult>> expression) 794Expression<Func<TModel, TResult>> expression,
Rendering\HtmlHelperLabelExtensions.cs (3)
51Expression<Func<TModel, TResult>> expression) 70Expression<Func<TModel, TResult>> expression, 94Expression<Func<TModel, TResult>> expression,
Rendering\HtmlHelperSelectExtensions.cs (4)
222Expression<Func<TModel, TResult>> expression, 261Expression<Func<TModel, TResult>> expression, 304Expression<Func<TModel, TResult>> expression, 404Expression<Func<TModel, TResult>> expression,
Rendering\HtmlHelperValidationExtensions.cs (4)
178Expression<Func<TModel, TResult>> expression) 206Expression<Func<TModel, TResult>> expression, 241Expression<Func<TModel, TResult>> expression, 275Expression<Func<TModel, TResult>> expression,
Rendering\HtmlHelperValueExtensions.cs (1)
51Expression<Func<TModel, TResult>> expression)
Rendering\IHtmlHelperOfT.cs (18)
44IHtmlContent CheckBoxFor(Expression<Func<TModel, bool>> expression, object htmlAttributes); 77Expression<Func<TModel, TResult>> expression, 88string DisplayNameFor<TResult>(Expression<Func<TModel, TResult>> expression); 99Expression<Func<TModelItem, TResult>> expression); 111string DisplayTextFor<TResult>(Expression<Func<TModel, TResult>> expression); 143Expression<Func<TModel, TResult>> expression, 177Expression<Func<TModel, TResult>> expression, 208Expression<Func<TModel, TResult>> expression, 217string IdFor<TResult>(Expression<Func<TModel, TResult>> expression); 231Expression<Func<TModel, TResult>> expression, 262Expression<Func<TModel, TResult>> expression, 274string NameFor<TResult>(Expression<Func<TModel, TResult>> expression); 294Expression<Func<TModel, TResult>> expression, 327Expression<Func<TModel, TResult>> expression, 359Expression<Func<TModel, TResult>> expression, 389Expression<Func<TModel, TResult>> expression, 417Expression<Func<TModel, TResult>> expression, 441Expression<Func<TModel, TResult>> expression,
TemplateRenderer.cs (6)
22private static readonly Dictionary<string, Func<IHtmlHelper, IHtmlContent>> _defaultDisplayActions = 23new Dictionary<string, Func<IHtmlHelper, IHtmlContent>>(StringComparer.OrdinalIgnoreCase) 37private static readonly Dictionary<string, Func<IHtmlHelper, IHtmlContent>> _defaultEditorActions = 38new Dictionary<string, Func<IHtmlHelper, IHtmlContent>>(StringComparer.OrdinalIgnoreCase) 130if (defaultActions.TryGetValue(viewName, out var defaultAction)) 140private Dictionary<string, Func<IHtmlHelper, IHtmlContent>> GetDefaultActions()
ViewComponents\DefaultViewComponentFactory.cs (1)
16private readonly Func<Type, PropertyActivator<ViewComponentContext>[]> _getPropertiesToActivate;
ViewDataDictionaryControllerPropertyActivator.cs (1)
16private readonly Func<Type, PropertyActivator<ControllerContext>[]> _getPropertiesToActivate;
ViewDataDictionaryFactory.cs (2)
33public static Func<ViewDataDictionary, ViewDataDictionary> CreateNestedFactory(Type modelType) 44Expression.Lambda<Func<ViewDataDictionary, ViewDataDictionary>>(
Microsoft.AspNetCore.OpenApi (32)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (2)
91var documentName_RouteOrQueryResolver = GeneratedRouteBuilderExtensionsCore.ResolveFromRouteOrQuery("documentName", options.RouteParameterNames); 234private static Func<HttpContext, StringValues> ResolveFromRouteOrQuery(string parameterName, IEnumerable<string>? routeParameterNames)
Extensions\JsonNodeSchemaExtensions.cs (2)
428internal static void MapPolymorphismOptionsToDiscriminator(this JsonNode schema, JsonSchemaExporterContext context, Func<JsonTypeInfo, string?> createSchemaReferenceId) 473internal static void ApplySchemaReferenceId(this JsonNode schema, JsonSchemaExporterContext context, Func<JsonTypeInfo, string?> createSchemaReferenceId)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (2)
56public static TBuilder WithOpenApi<TBuilder>(this TBuilder builder, Func<OpenApiOperation, OpenApiOperation> configureOperation) 65private static void AddAndConfigureOperationForEndpoint(EndpointBuilder endpointBuilder, Func<OpenApiOperation, OpenApiOperation>? configure = null)
Services\OpenApiOptions.cs (2)
48public Func<ApiDescription, bool> ShouldInclude { get; set; } 57public Func<JsonTypeInfo, string?> CreateSchemaReferenceId { get; set; } = CreateDefaultSchemaReferenceId;
Services\Schemas\OpenApiSchemaService.cs (1)
101var createSchemaReferenceId = optionsMonitor.Get(documentName).CreateSchemaReferenceId;
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
23typeof(Func<object, object>), // getAwaiterMethod 24typeof(Func<object, bool>), // isCompletedMethod 25typeof(Func<object, object>), // getResultMethod 282var getAwaiterFunc = Expression.Lambda<Func<object, object>>( 293var isCompletedFunc = Expression.Lambda<Func<object, bool>>( 300Func<object, object> getResultFunc; 308getResultFunc = Expression.Lambda<Func<object, object>>( 321getResultFunc = Expression.Lambda<Func<object, object>>(
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorAwaitable.cs (10)
19private readonly Func<object, object> _getAwaiterMethod; 20private readonly Func<object, bool> _isCompletedMethod; 21private readonly Func<object, object> _getResultMethod; 45Func<object, object> getAwaiterMethod, 46Func<object, bool> isCompletedMethod, 47Func<object, object> getResultMethod, 68private readonly Func<object, bool> _isCompletedMethod; 69private readonly Func<object, object> _getResultMethod; 75Func<object, bool> isCompletedMethod, 76Func<object, object> getResultMethod,
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (3)
47private readonly ConcurrentDictionary<Type, (Func<ParameterInfo, Expression>?, int)> _bindAsyncMethodCallCache = new(); 218(Func<ParameterInfo, Expression>?, int) Finder(Type nonNullableParameterType) 442private MethodInfo? GetStaticMethodFromHierarchy(Type type, string name, Type[] parameterTypes, Func<MethodInfo, bool> validateReturnType)
Microsoft.AspNetCore.OpenApi.SourceGenerators (1)
src\aspnetcore\src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (1)
13Func<TSource, TElement> sourceToElementTransform,
Microsoft.AspNetCore.OutputCaching (6)
DispatcherExtensions.cs (1)
12public async Task<TValue?> ScheduleAsync(TKey key, Func<TKey, Task<TValue?>> valueFactory)
OutputCachePolicyBuilder.cs (3)
78public OutputCachePolicyBuilder With(Func<OutputCacheContext, bool> predicate) 182public OutputCachePolicyBuilder SetCacheKeyPrefix(Func<HttpContext, string> keyPrefix) 227public OutputCachePolicyBuilder VaryByValue(Func<HttpContext, KeyValuePair<string, string>> varyBy)
Policies\PredicatePolicy.cs (2)
13private readonly Func<OutputCacheContext, ValueTask<bool>> _predicate; 21public PredicatePolicy(Func<OutputCacheContext, ValueTask<bool>> asyncPredicate, IOutputCachePolicy policy)
Microsoft.AspNetCore.Owin (45)
OwinEnvironment.cs (12)
21Func 240public FeatureMap(Type featureInterface, Func<object, object> getter) 251public FeatureMap(Type featureInterface, Func<object, object> getter, Func<object> defaultFactory) 262public FeatureMap(Type featureInterface, Func<object, object> getter, Action<object, object> setter) 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) 297private Func<object, object> Getter { get; set; } 355public FeatureMap(Func<TFeature, object> getter) 365public FeatureMap(Func<TFeature, object> getter, Func<object> defaultFactory) 375public FeatureMap(Func<TFeature, object> getter, Action<TFeature, object> setter) 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)
OwinExtensions.cs (13)
10using AddMiddleware = Action<Func< 11Func<IDictionary<string, object>, Task>, 12Func<IDictionary<string, object>, Task> 14using AppFunc = Func<IDictionary<string, object>, Task>; 15using CreateMiddleware = Func< 16Func<IDictionary<string, object>, Task>, 17Func<IDictionary<string, object>, Task> 36Func<RequestDelegate, RequestDelegate> middleware1 = next1 => 38AppFunc exitMiddleware = env => 42var app = middleware(exitMiddleware); 113var middleware = CreateMiddlewareFactory(exit => 123private static CreateMiddleware CreateMiddlewareFactory(Func<RequestDelegate, RequestDelegate> middleware, IServiceProvider services)
OwinFeatureCollection.cs (4)
182void IHttpResponseFeature.OnStarting(Func<object, Task> callback, object state) 194void IHttpResponseFeature.OnCompleted(Func<object, Task> callback, object state) 318var accept = (Func<WebSocketAcceptContext, Task<WebSocket>>)obj;
WebSockets\OwinWebSocketAcceptAdapter.cs (5)
9using AppFunc = Func<IDictionary<string, object>, Task>; 14Func // WebSocketFunc callback 21Func 114public static AppFunc AdaptWebSockets(AppFunc next)
WebSockets\WebSocketAcceptAdapter.cs (11)
9using AppFunc = Func<IDictionary<string, object>, Task>; 14Func // WebSocketFunc callback 21Func 34private readonly WebSocketAcceptAlt _accept; 35private AppFunc _callback; 43public WebSocketAcceptAdapter(IDictionary<string, object> env, WebSocketAcceptAlt accept) 49private void AcceptWebSocket(IDictionary<string, object> options, AppFunc callback) 61public static AppFunc AdaptWebSockets(AppFunc next) 66if (environment.TryGetValue(OwinConstants.WebSocket.AcceptAlt, out accept) && accept is WebSocketAcceptAlt) 68var adapter = new WebSocketAcceptAdapter(environment, (WebSocketAcceptAlt)accept);
Microsoft.AspNetCore.RateLimiting (9)
DefaultRateLimiterPolicy.cs (2)
11private readonly Func<HttpContext, RateLimitPartition<DefaultKeyType>> _partitioner; 14public DefaultRateLimiterPolicy(Func<HttpContext, RateLimitPartition<DefaultKeyType>> partitioner, Func<OnRejectedContext, CancellationToken, ValueTask>? onRejected)
RateLimiterOptions.cs (7)
19internal Dictionary<string, Func<IServiceProvider, DefaultRateLimiterPolicy>> UnactivatedPolicyMap { get; } 20= new Dictionary<string, Func<IServiceProvider, DefaultRateLimiterPolicy>>(StringComparer.Ordinal); 48public RateLimiterOptions AddPolicy<TPartitionKey>(string policyName, Func<HttpContext, RateLimitPartition<TPartitionKey>> partitioner) 76Func<IServiceProvider, DefaultRateLimiterPolicy> policyFunc = serviceProvider => 109internal static Func<HttpContext, RateLimitPartition<DefaultKeyType>> ConvertPartitioner<TPartitionKey>(string? policyName, Func<HttpContext, RateLimitPartition<TPartitionKey>> partitioner) 115return new RateLimitPartition<DefaultKeyType>(partitionKey, static key => ((Func<TPartitionKey, RateLimiter>)key.Factory!)((TPartitionKey)key.Key!));
Microsoft.AspNetCore.Razor.Utilities.Shared (165)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\DictionaryExtensions.cs (2)
47Func<TKey, TValue> func) 65Func<TKey, TValue> func)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\EnumerableExtensions.cs (26)
26public static ImmutableArray<TResult> SelectAsArray<T, TResult>(this IEnumerable<T> source, Func<T, TResult> selector) 409this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector) 437this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 465this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 492this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector) 520this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 548this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 568this IEnumerable<TElement> sequence, Func<TElement, TKey> keySelector, ref readonly SortHelper<TKey> sortHelper) 630public static ImmutableArray<TResult> SelectAndOrderAsArray<T, TResult>(this IEnumerable<T> sequence, Func<T, TResult> selector) 651this IEnumerable<T> sequence, Func<T, TResult> selector, IComparer<TResult> comparer) 672this IEnumerable<T> sequence, Func<T, TResult> selector, Comparison<TResult> comparison) 691public static ImmutableArray<TResult> SelectAndOrderDescendingAsArray<T, TResult>(this IEnumerable<T> sequence, Func<T, TResult> selector) 712this IEnumerable<T> sequence, Func<T, TResult> selector, IComparer<TResult> comparer) 733this IEnumerable<T> sequence, Func<T, TResult> selector, Comparison<TResult> comparison) 755this IEnumerable<TElement> sequence, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector) 778this IEnumerable<TElement> sequence, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, IComparer<TKey> comparer) 801this IEnumerable<TElement> sequence, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, Comparison<TKey> comparison) 823this IEnumerable<TElement> sequence, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector) 846this IEnumerable<TElement> sequence, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, IComparer<TKey> comparer) 869this IEnumerable<TElement> sequence, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, Comparison<TKey> comparison)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ImmutableArrayExtensions_Unsafe.cs (7)
91public void OrderBy<TKey>(Func<T, TKey> keySelector) 103public void OrderBy<TKey>(Func<T, TKey> keySelector, IComparer<TKey> comparer) 115public void OrderBy<TKey>(Func<T, TKey> keySelector, Comparison<TKey> comparison) 126public void OrderByDescending<TKey>(Func<T, TKey> keySelector) 138public void OrderByDescending<TKey>(Func<T, TKey> keySelector, IComparer<TKey> comparer) 150public void OrderByDescending<TKey>(Func<T, TKey> keySelector, Comparison<TKey> comparison) 170this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector, ref readonly SortHelper<TKey> sortHelper)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ImmutableArrayExtensions.cs (41)
73public static ImmutableArray<TResult> SelectAsArray<T, TResult>(this ImmutableArray<T> array, Func<T, TResult> selector) 137public static TResult[] SelectAsPlainArray<T, TResult>(this ImmutableArray<T> array, Func<T, TResult> selector) 254public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, ImmutableArray<TResult>> selector) 284public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 1133this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector) 1151this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1169this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1186this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector) 1204this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1222this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1232this ImmutableArray<TElement> array, Func<TElement, TKey> keySelector, ref readonly SortHelper<TKey> sortHelper) 1406this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector) 1426this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1446this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1465this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector) 1485this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1505this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1674this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector) 1702this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1730this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1757this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector) 1785this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1813this ImmutableArray<TElement>.Builder builder, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1831public static ImmutableArray<TResult> SelectAndOrderAsArray<T, TResult>(this ImmutableArray<T> array, Func<T, TResult> selector) 1852this ImmutableArray<T> array, Func<T, TResult> selector, IComparer<TResult> comparer) 1873this ImmutableArray<T> array, Func<T, TResult> selector, Comparison<TResult> comparison) 1892public static ImmutableArray<TResult> SelectAndOrderDescendingAsArray<T, TResult>(this ImmutableArray<T> array, Func<T, TResult> selector) 1913this ImmutableArray<T> array, Func<T, TResult> selector, IComparer<TResult> comparer) 1934this ImmutableArray<T> array, Func<T, TResult> selector, Comparison<TResult> comparison) 1956this ImmutableArray<TElement> array, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector) 1979this ImmutableArray<TElement> array, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, IComparer<TKey> comparer) 2002this ImmutableArray<TElement> array, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, Comparison<TKey> comparison) 2024this ImmutableArray<TElement> array, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector) 2047this ImmutableArray<TElement> array, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, IComparer<TKey> comparer) 2070this ImmutableArray<TElement> array, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, Comparison<TKey> comparison)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\InterlockedOperations.cs (1)
191public static T Initialize<TArg, T>(ref T target, ref int state, TArg arg, Func<TArg, T> factory)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\DefaultPool.cs (2)
25public static ObjectPool<T> Create<T, TArg>(TArg arg, Func<TArg, T> factory, Opt<int> poolSize = default) 41private sealed class PoolableObjectPolicy<T, TArg>(TArg arg, Func<TArg, T> factory) : IPooledObjectPolicy<T>
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\PooledArrayBuilder`1.cs (23)
728public readonly bool Any(Func<T, bool> predicate) 777public readonly bool All(Func<T, bool> predicate) 885public readonly T First(Func<T, bool> predicate) 961public readonly T? FirstOrDefault(Func<T, bool> predicate) 989public readonly T FirstOrDefault(Func<T, bool> predicate, T defaultValue) 1085public readonly T Last(Func<T, bool> predicate) 1163public readonly T? LastOrDefault(Func<T, bool> predicate) 1192public readonly T LastOrDefault(Func<T, bool> predicate, T defaultValue) 1305public readonly T Single(Func<T, bool> predicate) 1438public readonly T? SingleOrDefault(Func<T, bool> predicate) 1478public readonly T SingleOrDefault(Func<T, bool> predicate, T defaultValue) 1715public readonly ImmutableArray<T> ToImmutableOrderedBy<TKey>(Func<T, TKey> keySelector) 1723public readonly ImmutableArray<T> ToImmutableOrderedBy<TKey>(Func<T, TKey> keySelector, IComparer<TKey> comparer) 1731public readonly ImmutableArray<T> ToImmutableOrderedBy<TKey>(Func<T, TKey> keySelector, Comparison<TKey> comparison) 1739public readonly ImmutableArray<T> ToImmutableOrderedByDescending<TKey>(Func<T, TKey> keySelector) 1747public readonly ImmutableArray<T> ToImmutableOrderedByDescending<TKey>(Func<T, TKey> keySelector, IComparer<TKey> comparer) 1755public readonly ImmutableArray<T> ToImmutableOrderedByDescending<TKey>(Func<T, TKey> keySelector, Comparison<TKey> comparison) 1819public ImmutableArray<T> ToImmutableOrderedByAndClear<TKey>(Func<T, TKey> keySelector) 1827public ImmutableArray<T> ToImmutableOrderedByAndClear<TKey>(Func<T, TKey> keySelector, IComparer<TKey> comparer) 1835public ImmutableArray<T> ToImmutableOrderedByAndClear<TKey>(Func<T, TKey> keySelector, Comparison<TKey> comparison) 1843public ImmutableArray<T> ToImmutableOrderedByDescendingAndClear<TKey>(Func<T, TKey> keySelector) 1851public ImmutableArray<T> ToImmutableOrderedByDescendingAndClear<TKey>(Func<T, TKey> keySelector, IComparer<TKey> comparer) 1859public ImmutableArray<T> ToImmutableOrderedByDescendingAndClear<TKey>(Func<T, TKey> keySelector, Comparison<TKey> comparison)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\PooledObjects\PooledHashSet`1.cs (1)
179public readonly ImmutableArray<T> OrderByAsArray<TKey>(Func<T, TKey> keySelector)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ReadOnlyListExtensions.cs (37)
25public static ImmutableArray<TResult> SelectAsArray<T, TResult>(this IReadOnlyList<T> list, Func<T, TResult> selector) 149public static bool Any<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 204public static bool All<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 276public static T First<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 363public static T? FirstOrDefault<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 393public static T? FirstOrDefault<T>(this IReadOnlyList<T> list, Func<T, bool> predicate, T defaultValue) 499public static T Last<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 586public static T? LastOrDefault<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 646public static T LastOrDefault<T>(this IReadOnlyList<T> list, Func<T, bool> predicate, T defaultValue) 736public static T Single<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 880public static T? SingleOrDefault<T>(this IReadOnlyList<T> list, Func<T, bool> predicate) 964public static T SingleOrDefault<T>(this IReadOnlyList<T> list, Func<T, bool> predicate, T defaultValue) 1324this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector) 1347this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1370this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1392this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector) 1415this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector, IComparer<TKey> comparer) 1438this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector, Comparison<TKey> comparison) 1454this IReadOnlyList<TElement> list, Func<TElement, TKey> keySelector, ref readonly SortHelper<TKey> sortHelper) 1492public static ImmutableArray<TResult> SelectAndOrderAsArray<T, TResult>(this IReadOnlyList<T> list, Func<T, TResult> selector) 1513this IReadOnlyList<T> list, Func<T, TResult> selector, IComparer<TResult> comparer) 1534this IReadOnlyList<T> list, Func<T, TResult> selector, Comparison<TResult> comparison) 1553public static ImmutableArray<TResult> SelectAndOrderDescendingAsArray<T, TResult>(this IReadOnlyList<T> list, Func<T, TResult> selector) 1574this IReadOnlyList<T> list, Func<T, TResult> selector, IComparer<TResult> comparer) 1595this IReadOnlyList<T> list, Func<T, TResult> selector, Comparison<TResult> comparison) 1617this IReadOnlyList<TElement> list, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector) 1640this IReadOnlyList<TElement> list, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, IComparer<TKey> comparer) 1663this IReadOnlyList<TElement> list, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, Comparison<TKey> comparison) 1685this IReadOnlyList<TElement> list, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector) 1708this IReadOnlyList<TElement> list, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, IComparer<TKey> comparer) 1731this IReadOnlyList<TElement> list, Func<TElement, TResult> selector, Func<TResult, TKey> keySelector, Comparison<TKey> comparison)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Utilities\SortHelper`1.cs (3)
16public static readonly Func<T, T> IdentityFunc = x => x; 71public bool ComputeKeys<TElement>(ReadOnlySpan<TElement> items, Func<TElement, T> keySelector, Span<SortKey<T>> keys) 144public bool ComputeKeys<TElement>(IReadOnlyList<TElement> items, Func<TElement, T> keySelector, Span<SortKey<T>> keys)
Threading\LazyValue`2.cs (3)
44private readonly Func<TArg, T> _factory; 70public LazyValue(Func<TArg, T> factory) 95/// The implementation uses <see cref="InterlockedOperations.Initialize{TArg, T}(ref T, ref int, TArg, Func{TArg, T})"/>
Utilities\CleanableWeakCache`2.cs (1)
123public TValue GetOrAdd<TArg>(TKey key, TArg arg, Func<TArg, TValue> valueFactory)
Microsoft.AspNetCore.Rewrite (1)
src\aspnetcore\src\Shared\Reroute.cs (1)
16if (app.Properties.TryGetValue(UseRoutingKey, out var useRouting) && useRouting is Func<IApplicationBuilder, IApplicationBuilder> useRoutingFunc)
Microsoft.AspNetCore.Routing (18)
Builder\RoutingEndpointConventionBuilderExtensions.cs (1)
78public static TBuilder WithDisplayName<TBuilder>(this TBuilder builder, Func<EndpointBuilder, string> func) where TBuilder : IEndpointConventionBuilder
DataSourceDependentCache.cs (2)
16private readonly Func<IReadOnlyList<Endpoint>, T> _initializeCore; 27public DataSourceDependentCache(EndpointDataSource dataSource, Func<IReadOnlyList<Endpoint>, T> initialize)
DefaultLinkGenerator.cs (1)
36private readonly Func<RouteEndpoint, TemplateBinder> _createTemplateBinder;
DefaultLinkParser.cs (1)
23private readonly Func<RouteEndpoint, MatcherState> _createMatcher;
EndpointRoutingMiddleware.cs (2)
58if (value is not Func<RequestDelegate, RequestDelegate> postRoutingPipeline || !IsFrameworkPostRoutingMiddleware(postRoutingPipeline)) 77private static bool IsFrameworkPostRoutingMiddleware(Func<RequestDelegate, RequestDelegate> middleware)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (11)
46private Func<object, object?>? _valueGetter; 71public Func<object, object?> ValueGetter 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 190private static Func<object, object?> MakeFastPropertyGetter( 230typeof(Func<,>), 243private static Func<object, object?> MakeFastPropertyGetter( 256typeof(Func<object, object?>), 259return (Func<object, object?>)accessorDelegate; 344Func<TDeclaringType, TValue> getter, 361Func<TDeclaringType, TValue> getter,
Microsoft.AspNetCore.Routing.Abstractions (11)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (11)
46private Func<object, object?>? _valueGetter; 71public Func<object, object?> ValueGetter 159public static Func<object, object?> MakeFastPropertyGetter(PropertyInfo propertyInfo) 179public static Func<object, object?> MakeNullSafeFastPropertyGetter(PropertyInfo propertyInfo) 190private static Func<object, object?> MakeFastPropertyGetter( 230typeof(Func<,>), 243private static Func<object, object?> MakeFastPropertyGetter( 256typeof(Func<object, object?>), 259return (Func<object, object?>)accessorDelegate; 344Func<TDeclaringType, TValue> getter, 361Func<TDeclaringType, TValue> getter,
Microsoft.AspNetCore.Server.HttpSys (11)
RequestProcessing\RequestContext.FeatureCollection.cs (8)
76private List<Tuple<Func<object, Task>, object>>? _onStartingActions = new List<Tuple<Func<object, Task>, object>>(); 77private List<Tuple<Func<object, Task>, object>>? _onCompletedActions = new List<Tuple<Func<object, Task>, object>>(); 490void IHttpResponseFeature.OnStarting(Func<object, Task> callback, object state) 498_onStartingActions.Add(new Tuple<Func<object, Task>, object>(callback, state)); 501void IHttpResponseFeature.OnCompleted(Func<object, Task> callback, object state) 509_onCompletedActions.Add(new Tuple<Func<object, Task>, object>(callback, state));
StandardFeatureCollection.cs (3)
13private static readonly Func<RequestContext, object> _identityFunc = ReturnIdentity; 14private static readonly Dictionary<Type, Func<RequestContext, object?>> _featureFuncLookup = new() 76Func<RequestContext, object?>? lookupFunc;
Microsoft.AspNetCore.Server.IIS (15)
Core\IISHttpContext.cs (10)
51protected Stack<KeyValuePair<Func<object, Task>, object>>? _onStarting; 52protected Stack<KeyValuePair<Func<object, Task>, object>>? _onCompleted; 726public void OnStarting(Func<object, Task> callback, object state) 737_onStarting = new Stack<KeyValuePair<Func<object, Task>, object>>(); 739_onStarting.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 743public void OnCompleted(Func<object, Task> callback, object state) 749_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>(); 751_onCompleted.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 757Stack<KeyValuePair<Func<object, Task>, object>>? onStarting = null; 781Stack<KeyValuePair<Func<object, Task>, object>>? onCompleted = null;
Core\IISHttpContext.FeatureCollection.cs (2)
330void IHttpResponseFeature.OnStarting(Func<object, Task> callback, object state) 335void IHttpResponseFeature.OnCompleted(Func<object, Task> callback, object state)
src\aspnetcore\src\Shared\ServerInfrastructure\DuplexPipeStreamAdapter.cs (2)
20public DuplexPipeStreamAdapter(IDuplexPipe duplexPipe, Func<Stream, TStream> createStream) : 25public DuplexPipeStreamAdapter(IDuplexPipe duplexPipe, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, TStream> createStream) :
src\aspnetcore\src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
29private static readonly Func<object, Task> ClearUserDelegate = ClearUser;
Microsoft.AspNetCore.Server.IntegrationTesting (4)
TestMatrix.cs (4)
19private IList<Tuple<Func<TestVariant, bool>, string>> Skips { get; } = new List<Tuple<Func<TestVariant, bool>, string>>(); 86public TestMatrix Skip(string message, Func<TestVariant, bool> check) 88Skips.Add(new Tuple<Func<TestVariant, bool>, string>(check, message));
Microsoft.AspNetCore.Server.Kestrel.Core (66)
HttpsConfigurationService.cs (1)
28private Func<ListenOptions, ListenOptions>? _useHttpsWithDefaults;
Internal\AddressBinder.cs (5)
19public static Task BindAsync(ListenOptions[] listenOptions, AddressBindContext context, Func<ListenOptions, ListenOptions> useHttps, CancellationToken cancellationToken) 35private static IStrategy CreateStrategy(ListenOptions[] listenOptions, string[] addresses, bool preferAddresses, Func<ListenOptions, ListenOptions> useHttps) 190public OverrideWithAddressesStrategy(IReadOnlyCollection<string> addresses, Func<ListenOptions, ListenOptions> useHttps) 249private readonly Func<ListenOptions, ListenOptions> _useHttps; 251public AddressesStrategy(IReadOnlyCollection<string> addresses, Func<ListenOptions, ListenOptions> useHttps)
Internal\CertificatePathWatcher.cs (2)
16private readonly Func<string, IFileProvider?> _fileProviderFactory; 49internal CertificatePathWatcher(string contentRootPath, ILogger<CertificatePathWatcher> logger, Func<string, IFileProvider?> fileProviderFactory)
Internal\ConnectionDispatcher.cs (2)
13private readonly Func<T, Task> _connectionDelegate; 17public ConnectionDispatcher(ServiceContext serviceContext, Func<T, Task> connectionDelegate, TransportConnectionManager transportConnectionManager)
Internal\Http\HttpHeaders.cs (1)
277public static void ValidateHeaderValueCharacters(string headerName, StringValues headerValues, Func<string, Encoding?> encodingSelector)
Internal\Http\HttpProtocol.cs (10)
43private Stack<KeyValuePair<Func<object, Task>, object>>? _onStarting; 44private Stack<KeyValuePair<Func<object, Task>, object>>? _onCompleted; 805public void OnStarting(Func<object, Task> callback, object state) 814_onStarting = new Stack<KeyValuePair<Func<object, Task>, object>>(); 816_onStarting.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 819public void OnCompleted(Func<object, Task> callback, object state) 823_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>(); 825_onCompleted.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 838static async Task ProcessEvents(HttpProtocol protocol, Stack<KeyValuePair<Func<object, Task>, object>> events) 866static async Task ProcessEvents(HttpProtocol protocol, Stack<KeyValuePair<Func<object, Task>, object>> events)
Internal\Http\HttpProtocol.FeatureCollection.cs (2)
249void IHttpResponseFeature.OnStarting(Func<object, Task> callback, object state) 254void IHttpResponseFeature.OnCompleted(Func<object, Task> callback, object state)
Internal\Http\HttpRequestHeaders.cs (2)
22public Func<string, Encoding?> EncodingSelector { get; set; } 24public HttpRequestHeaders(bool reuseHeaderValues = true, Func<string, Encoding?>? encodingSelector = null)
Internal\Http\HttpResponseHeaders.cs (4)
21public Func<string, Encoding?> EncodingSelector { get; set; } 23public HttpResponseHeaders(Func<string, Encoding?>? encodingSelector = null) 46var encodingSelector = EncodingSelector; 75Func<string, Encoding?> encodingSelector)
Internal\Http\HttpResponseTrailers.cs (2)
14public Func<string, Encoding?> EncodingSelector { get; set; } 16public HttpResponseTrailers(Func<string, Encoding?>? encodingSelector = null)
Internal\Http3\Http3HeadersEnumerator.cs (1)
27public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
Internal\Infrastructure\HttpUtilities.cs (2)
116public static string GetRequestHeaderString(this ReadOnlySpan<byte> span, string name, Func<string, Encoding?> encodingSelector, bool checkForNewlineChars) 155private static string GetRequestHeaderStringWithoutDefaultEncodingCore(this ReadOnlySpan<byte> span, string name, Func<string, Encoding?> encodingSelector)
Internal\Infrastructure\KestrelConnection.cs (6)
15private Stack<KeyValuePair<Func<object, Task>, object>>? _onCompleted; 75void IConnectionCompleteFeature.OnCompleted(Func<object, Task> callback, object state) 84_onCompleted = new Stack<KeyValuePair<Func<object, Task>, object>>(); 86_onCompleted.Push(new KeyValuePair<Func<object, Task>, object>(callback, state)); 107private Task CompleteAsyncMayAwait(Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 128private async Task CompleteAsyncAwaited(Task currentTask, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted)
Internal\Infrastructure\KestrelConnectionOfT.cs (2)
13private readonly Func<T, Task> _connectionDelegate; 19Func<T, Task> connectionDelegate,
Internal\Infrastructure\TransportManager.cs (1)
97private void StartAcceptLoop<T>(IConnectionListener<T> connectionListener, Func<T, Task> connectionDelegate, EndpointConfig? endpointConfig) where T : BaseConnectionContext
KestrelServerOptions.cs (5)
41internal static readonly Func<string, Encoding?> DefaultHeaderEncodingSelector = _ => null; 46private Func<string, Encoding?> _requestHeaderEncodingSelector = DefaultHeaderEncodingSelector; 48private Func<string, Encoding?> _responseHeaderEncodingSelector = DefaultHeaderEncodingSelector; 158public Func<string, Encoding?> RequestHeaderEncodingSelector 168public Func<string, Encoding?> ResponseHeaderEncodingSelector
ListenOptions.cs (8)
21private readonly List<Func<ConnectionDelegate, ConnectionDelegate>> _middleware = new List<Func<ConnectionDelegate, ConnectionDelegate>>(); 22private readonly List<Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate>> _multiplexedMiddleware = new List<Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate>>(); 174public IConnectionBuilder Use(Func<ConnectionDelegate, ConnectionDelegate> middleware) 180IMultiplexedConnectionBuilder IMultiplexedConnectionBuilder.Use(Func<MultiplexedConnectionDelegate, MultiplexedConnectionDelegate> middleware) 199var component = _middleware[i]; 215var component = _multiplexedMiddleware[i];
Middleware\ConnectionLimitMiddleware.cs (3)
13private readonly Func<T, Task> _next; 18public ConnectionLimitMiddleware(Func<T, Task> next, long connectionLimit, KestrelTrace trace, KestrelMetrics metrics) 24internal ConnectionLimitMiddleware(Func<T, Task> next, ResourceCounter concurrentConnectionCounter, KestrelTrace trace, KestrelMetrics metrics)
Middleware\HttpsConnectionMiddleware.cs (2)
36private readonly Func<Stream, SslStream> _sslStreamFactory; 46private readonly Func<TlsHandshakeCallbackContext, ValueTask<SslServerAuthenticationOptions>>? _tlsCallbackOptions;
src\aspnetcore\src\Servers\Kestrel\shared\Http2HeadersEnumerator.cs (1)
40public Func<string, Encoding?> EncodingSelector { get; set; } = KestrelServerOptions.DefaultHeaderEncodingSelector;
src\aspnetcore\src\Shared\ServerInfrastructure\DuplexPipeStreamAdapter.cs (2)
20public DuplexPipeStreamAdapter(IDuplexPipe duplexPipe, Func<Stream, TStream> createStream) : 25public DuplexPipeStreamAdapter(IDuplexPipe duplexPipe, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, TStream> createStream) :
src\aspnetcore\src\Shared\ServerInfrastructure\SslDuplexPipe.cs (1)
19public SslDuplexPipe(IDuplexPipe transport, StreamPipeReaderOptions readerOptions, StreamPipeWriterOptions writerOptions, Func<Stream, SslStream> factory) :
TlsHandshakeCallbackOptions.cs (1)
19public Func<TlsHandshakeCallbackContext, ValueTask<SslServerAuthenticationOptions>> OnConnection { get; set; } = default!;
Microsoft.AspNetCore.Server.Kestrel.Transport.DirectTls (1)
DirectTlsTransportOptions.cs (1)
135internal Func<EndPoint, Socket> CreateBoundListenSocket { get; set; } = CreateDefaultBoundListenSocket;
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
NamedPipeTransportOptions.cs (1)
80public Func<CreateNamedPipeServerStreamContext, NamedPipeServerStream> CreateNamedPipeServerStream { get; set; } = CreateDefaultNamedPipeServerStream;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (3)
src\aspnetcore\src\Servers\Kestrel\shared\ConnectionCompletion.cs (3)
12public static Task FireOnCompletedAsync(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>>? onCompleted) 22private static Task CompleteAsyncMayAwait(ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted) 43private static async Task CompleteAsyncAwaited(Task currentTask, ILogger logger, Stack<KeyValuePair<Func<object, Task>, object>> onCompleted)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
SocketTransportOptions.cs (1)
111public Func<EndPoint, Socket> CreateBoundListenSocket { get; set; } = CreateDefaultBoundListenSocket;
Microsoft.AspNetCore.SignalR.Client.Core (24)
HubConnection.cs (12)
131public event Func<Exception?, Task>? Closed; 151public event Func<Exception?, Task>? Reconnecting; 171public event Func<string?, Task>? Reconnected; 180public event Func<AuthenticationRefreshedContext, Task>? AuthenticationRefreshed; 189public event Func<AuthenticationRefreshFailedContext, Task>? AuthenticationRefreshFailed; 630var failedCallbacks = AuthenticationRefreshFailed; 651var refreshedCallbacks = AuthenticationRefreshed; 665Func<T, Task> handlers, 670foreach (Func<T, Task> handler in handlers.GetInvocationList()) 2094var closed = Closed; 2265var reconnecting = Reconnecting; 2285var reconnected = Reconnected;
HubConnectionExtensions.cs (4)
211public static IDisposable On(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], Task> handler) 215var currentHandler = (Func<object?[], Task>)state; 242public static IDisposable On<T1>(this HubConnection hubConnection, string methodName, Func<T1, Task> handler)
HubConnectionExtensions.OnResult.cs (8)
18private static IDisposable On<TResult>(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], TResult> handler) 22var currentHandler = (Func<object?[], TResult>)state; 37public static IDisposable On<TResult>(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], Task<TResult>> handler) 41var currentHandler = (Func<object?[], Task<TResult>>)state; 88public static IDisposable On<T1, TResult>(this HubConnection hubConnection, string methodName, Func<T1, TResult> handler) 268public static IDisposable On<T1, TResult>(this HubConnection hubConnection, string methodName, Func<T1, Task<TResult>> handler)
Microsoft.AspNetCore.SignalR.Core (38)
HubConnectionHandler.cs (2)
153Func<AuthenticationRefreshContext, Task<bool>>? previousOnAuthenticationRefresh = null; 154Func<AuthenticationRefreshContext, Task<bool>>? authenticationRefreshCallback = null;
IHubFilter.cs (2)
17ValueTask<object?> InvokeMethodAsync(HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object?>> next) => next(invocationContext); 25Task OnConnectedAsync(HubLifetimeContext context, Func<HubLifetimeContext, Task> next) => next(context);
Internal\ChannelBasedSemaphore.cs (3)
43public ValueTask RunAsync<TState>(Func<TState, Task<bool>> callback, TState state) 54private async ValueTask RunSlowAsync<TState>(Func<TState, Task<bool>> callback, TState state) 60private async Task RunTask<TState>(Func<TState, Task<bool>> callback, TState state)
Internal\DefaultHubDispatcher.cs (4)
31private readonly Func<HubInvocationContext, ValueTask<object?>>? _invokeMiddleware; 32private readonly Func<HubLifetimeContext, Task>? _onConnectedMiddleware; 71var nextFilter = _invokeMiddleware; 74var connectedFilter = _onConnectedMiddleware;
Internal\HubFilterFactory.cs (2)
22public async ValueTask<object?> InvokeMethodAsync(HubInvocationContext invocationContext, Func<HubInvocationContext, ValueTask<object?>> next) 39public async Task OnConnectedAsync(HubLifetimeContext context, Func<HubLifetimeContext, Task> next)
Internal\TypedClientBuilder.cs (5)
17private static readonly Lazy<Func<IClientProxy, T>> _builder = new Lazy<Func<IClientProxy, T>>(GenerateClientBuilder); 36private static Func<IClientProxy, T> GenerateClientBuilder() 46return (Func<IClientProxy, T>)factoryMethod!.CreateDelegate(typeof(Func<IClientProxy, T>));
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
23typeof(Func<object, object>), // getAwaiterMethod 24typeof(Func<object, bool>), // isCompletedMethod 25typeof(Func<object, object>), // getResultMethod 282var getAwaiterFunc = Expression.Lambda<Func<object, object>>( 293var isCompletedFunc = Expression.Lambda<Func<object, bool>>( 300Func<object, object> getResultFunc; 308getResultFunc = Expression.Lambda<Func<object, object>>( 321getResultFunc = Expression.Lambda<Func<object, object>>(
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutorAwaitable.cs (10)
19private readonly Func<object, object> _getAwaiterMethod; 20private readonly Func<object, bool> _isCompletedMethod; 21private readonly Func<object, object> _getResultMethod; 45Func<object, object> getAwaiterMethod, 46Func<object, bool> isCompletedMethod, 47Func<object, object> getResultMethod, 68private readonly Func<object, bool> _isCompletedMethod; 69private readonly Func<object, object> _getResultMethod; 75Func<object, bool> isCompletedMethod, 76Func<object, object> getResultMethod,
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
RedisOptions.cs (2)
27public Func<TextWriter, Task<IConnectionMultiplexer>>? ConnectionFactory { get; set; } 32var factory = ConnectionFactory;
Microsoft.AspNetCore.StaticFiles (2)
StaticFileOptions.cs (2)
16internal static readonly Func<StaticFileResponseContext, Task> _defaultOnPrepareResponseAsync = _ => Task.CompletedTask; 78public Func<StaticFileResponseContext, Task> OnPrepareResponseAsync { get; set; }
Microsoft.AspNetCore.TestHost (15)
HttpContextBuilder.cs (2)
28private Func<PipeWriter, Task>? _sendRequestStream; 68internal void SendRequestStream(Func<PipeWriter, Task> sendRequestStream)
ResponseFeature.cs (2)
74public void OnStarting(Func<object, Task> callback, object state) 89public void OnCompleted(Func<object, Task> callback, object state)
src\44e1214b125d320f\HostFactoryResolver.cs (10)
41public static Func<string[], TWebHost>? ResolveWebHostFactory<TWebHost>(Assembly assembly) 46public static Func<string[], TWebHostBuilder>? ResolveWebHostBuilderFactory<TWebHostBuilder>(Assembly assembly) 51public static Func<string[], THostBuilder>? ResolveHostBuilderFactory<THostBuilder>(Assembly assembly) 62public static Func<string[], object>? ResolveHostFactory(Assembly assembly, 96private static Func<string[], T>? ResolveFactory<T>(Assembly assembly, string name) 123public static Func<string[], IServiceProvider?>? ResolveServiceProviderFactory(Assembly assembly, TimeSpan? waitTimeout = null) 126var webHostFactory = ResolveWebHostFactory<object>(assembly); 136var webHostBuilderFactory = ResolveWebHostBuilderFactory<object>(assembly); 147var hostBuilderFactory = ResolveHostBuilderFactory<object>(assembly); 158var hostFactory = ResolveHostFactory(assembly, waitTimeout: waitTimeout);
WebHostBuilderFactory.cs (1)
23var factory = HostFactoryResolver.ResolveWebHostBuilderFactory<IWebHostBuilder>(assembly);
Microsoft.AspNetCore.Testing (2)
ServiceFakesHostExtensions.cs (2)
24private static readonly Func<Uri, bool> _defaultAddressFilter = static _ => true; 35public static HttpClient CreateClient(this IHost host, HttpMessageHandler? handler = null, Func<Uri, bool>? addressFilter = null)
Microsoft.Build (131)
BackEnd\Components\Communications\INodeProvider.cs (1)
71IList<NodeInfo> CreateNodes(int nextNodeId, INodePacketFactory packetFactory, Func<NodeInfo, NodeConfiguration> configurationFactory, int numberOfNodesToCreate);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
187public IList<NodeInfo> CreateNodes(int nextNodeId, INodePacketFactory factory, Func<NodeInfo, NodeConfiguration> configurationFactory, int numberOfNodesToCreate)
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
79public IList<NodeInfo> CreateNodes(int nextNodeId, INodePacketFactory factory, Func<NodeInfo, NodeConfiguration> configurationFactory, int numberOfNodesToCreate)
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
186public IList<NodeInfo> CreateNodes(int nextNodeId, INodePacketFactory packetFactory, Func<NodeInfo, NodeConfiguration> configurationFactory, int numberOfNodesToCreate)
BackEnd\Components\Scheduler\Scheduler.cs (2)
642Func<int, int> grantCores = (availableCores) => 1050private void AssignUnscheduledRequestsToInProcNode(List<ScheduleResponse> responses, HashSet<int> idleNodes, Func<SchedulableRequest, bool> shouldBeScheduled)
BackEnd\Shared\BuildRequestConfiguration.cs (2)
887private Func<string, bool> shouldSkipStaticGraphIsolationOnReference; 902Func<string, bool> GetReferenceFilter()
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
920private static readonly ConcurrentDictionary<Type, Func<ITaskItem, ITaskItem>> s_taskItemOfTFactories = new(); 928Func<ITaskItem, ITaskItem> factory = s_taskItemOfTFactories.GetOrAdd(genericArgument, static t => 946return Expression.Lambda<Func<ITaskItem, ITaskItem>>(
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
439Func<string, string?> getPropertyValue = p =>
BuildCheck\Infrastructure\CheckScopeClassifier.cs (1)
22public static Func<EvaluationCheckScope, bool> IsScopingReady => (scope) => (scope is EvaluationCheckScope.ProjectFileOnly or EvaluationCheckScope.All) || IsScopingInitialized;
BuildCheck\Infrastructure\ConfigurationProvider.cs (1)
278Func<CheckConfiguration, T?> propertyGetter) where T : struct
Collections\ConvertingEnumerable.cs (4)
28private readonly Func<TFrom, TTo> _converter; 33internal ConvertingEnumerable(IEnumerable<TFrom> backingEnumerable, Func<TFrom, TTo> converter) 71private readonly Func<TFrom2, TTo2> _converter; 76internal ConvertingEnumerator(IEnumerator<TFrom2> backingEnumerator, Func<TFrom2, TTo2> converter)
Collections\CopyOnReadEnumerable.cs (2)
34private readonly Func<TSource, TResult> _selector; 42public CopyOnReadEnumerable(IEnumerable<TSource> backingEnumerable, object syncRoot, Func<TSource, TResult> selector)
Collections\IItemDictionary.cs (1)
46IEnumerable<TResult> GetCopyOnReadEnumerable<TResult>(Func<T, TResult> selector);
Collections\ItemDictionary.cs (1)
156public IEnumerable<TResult> GetCopyOnReadEnumerable<TResult>(Func<T, TResult> selector)
Collections\PropertyDictionary.cs (3)
210public IEnumerable<TResult> GetCopyOnReadEnumerable<TResult>(Func<T, TResult> selector) 603internal IEnumerable<TResult> Filter<TResult>(Func<T, bool> filter, Func<T, TResult> selector)
Collections\ReadOnlyConvertingDictionary.cs (2)
30private readonly Func<V, N> _converter; 35internal ReadOnlyConvertingDictionary(IDictionary<K, V> backing, Func<V, N> converter)
Construction\ProjectElementContainer.cs (1)
774Func<ProjectElement, ProjectElement> nextSibling,
Construction\ProjectRootElement.cs (1)
1714private void ReloadFrom(Func<bool, XmlDocumentWithLocation> documentProducer, bool throwIfUnsavedChanges, bool? preserveFormatting)
Evaluation\ConditionEvaluator.cs (1)
152public Stack<GenericExpressionNode> GetOrAdd(string condition, Func<string, Stack<GenericExpressionNode>> addFunc)
Evaluation\ItemSpec.cs (2)
577private readonly Func<string, string> _normalize; 585_normalize = options == MatchOnMetadataOptions.PathLike ? (Func<string, string>)(p => FileUtilities.NormalizePathForComparisonNoThrow(p, Environment.CurrentDirectory)) : p => p;
Graph\ProjectGraph.cs (1)
527Func<ProjectGraphNode, string> nodeIdProvider,
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (3)
27Func<TCached, T> convertElement) 109private readonly Func<TCached, T> _getElementInstance; 114Func<TCached, T> getElementInstance)
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (2)
18private readonly Func<TCached, T> _getInstance; 23Func<TCached, T> getInstance)
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (6)
23private readonly Func<TCached, T?> _getInstance; 28Func<TCached, T?> getInstance, 29Func<T, string?> getItemType) 83public IEnumerable<TResult> GetCopyOnReadEnumerable<TResult>(Func<T, TResult> selector) 147private readonly Func<TCached, T?> _getInstance; 149public ListConverter(string itemType, ICollection<TCached> list, Func<TCached, T?> getInstance)
Instance\ImmutableProjectCollections\ImmutableLinkedMultiDictionaryConverter.cs (4)
15private readonly Func<K, IEnumerable<VCached>> _getCachedValues; 16private readonly Func<VCached, V> _getInstance; 18public ImmutableLinkedMultiDictionaryConverter(Func<K, IEnumerable<VCached>> getCachedValues, Func<VCached, V> getInstance)
Instance\ImmutableProjectCollections\ImmutableProjectPropertyCollectionConverter.cs (1)
27Func<ProjectProperty, ProjectPropertyInstance> convertElement)
Instance\ImmutableProjectCollections\LazyStringValuedList.cs (2)
22private readonly Func<ProjectLink, List<string>> _getStringValues; 25public LazyStringValuedList(ProjectLink immutableProject, Func<ProjectLink, List<string>> getStringValues)
Instance\ProjectInstance.cs (1)
1001Func<ProjectItem, ProjectItemInstance> convertCachedItemToInstance =
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
315Func<string, ProjectPropertyInstance> getProperty, 628Func<string, ProjectPropertyInstance> getProperty)
Logging\BinaryLogger\BinaryLogger.cs (1)
340internal Func<string, string> PathParameterExpander { private get; set; } = ExpandPathParameter;
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
343private BinaryLogRecordKind PreprocessRecordsTillNextEvent(Func<BinaryLogRecordKind, bool> isPreprocessRecord)
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\5057ed6cf5d6323b\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\5057ed6cf5d6323b\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\5057ed6cf5d6323b\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\9f0d3f3da306d8cf\IEnumerableExtensions.cs (14)
219public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 262public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 340private static readonly Func<object, bool> s_notNullTest = x => x != null; 350return source.Where((Func<T?, bool>)s_notNullTest)!; 369public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 399public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 431public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 455public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 481public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 496public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 702public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 802internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 853public static readonly Func<T, T> Identity = t => t; 854public static readonly Func<T, bool> True = t => true;
src\9f0d3f3da306d8cf\ImmutableArrayExtensions.cs (18)
142public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 211public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 268public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 288public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 331public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 355public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 379public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 538public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 549private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 1111public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1130public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\ArrayBuilder.cs (7)
443public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 546internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 594public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 731public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 749public bool Any(Func<T, bool> predicate) 773public bool All(Func<T, bool> predicate) 803public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\ObjectPool`1.cs (1)
124internal ObjectPool(Func<ObjectPool<T>, T> factory, int size)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.pooledobjects\5.0.0-1.25277.114\contentFiles\cs\netstandard2.0\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
Microsoft.Build.Framework (22)
BuildCheck\EnumerableExtensions.cs (1)
114Func<TValue, TKey> extractKey,
BuildEnvironmentHelper.cs (3)
495Func<string, string> getEnvironmentVariable = null, 527private static Func<string, string> s_getEnvironmentVariable = GetEnvironmentVariable; 653var existsCheck = mode == BuildEnvironmentMode.VisualStudio ? new Func<string, bool>(_ => true) : FileSystems.Default.FileExists;
Collections\CopyOnWriteDictionary.cs (1)
219public IEnumerable<KeyValuePair<string, V>> Where(Func<KeyValuePair<string, V>, bool> predicate)
Collections\RefArrayBuilder.cs (10)
384public readonly bool Any(Func<T, bool> predicate) 434public readonly bool All(Func<T, bool> predicate) 501public readonly T First(Func<T, bool> predicate) 566public readonly T? FirstOrDefault(Func<T, bool> predicate) 579public readonly T FirstOrDefault(Func<T, bool> predicate, T defaultValue) 643public readonly T Last(Func<T, bool> predicate) 708public readonly T? LastOrDefault(Func<T, bool> predicate) 721public readonly T LastOrDefault(Func<T, bool> predicate, T defaultValue) 771private readonly T? TryGetFirst(Func<T, bool> predicate, out bool found) 817private readonly T? TryGetLast(Func<T, bool> predicate, out bool found)
FileClassifier.cs (2)
258public void RegisterFrameworkLocations(Func<string, string?> getPropertyValue) 272public void RegisterKnownImmutableLocations(Func<string, string?> getPropertyValue)
TaskClassRegistration.cs (2)
28private readonly Func<TaskEnvironment, ITask> _createInstance; 42internal TaskClassRegistration(Func<TaskEnvironment, ITask> createInstance, LoadedType loadedType)
TaskClassRegistry.cs (1)
102internal static void Register<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.PublicProperties)] TTask>(Func<TaskEnvironment, TTask> factory)
TaskParameterEventArgs.cs (2)
108internal static Func<TaskParameterEventArgs, string> MessageGetter = args => 125internal static Func<int, IDictionary<string, string>> DictionaryFactory = capacity => new Dictionary<string, string>(capacity);
Microsoft.Build.Tasks.CodeAnalysis (3)
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (2)
20internal static T RunWithUtf8Output<T>(Func<TextWriter, T> func) 41internal static T RunWithUtf8Output<T>(bool utf8Output, TextWriter textWriter, Func<TextWriter, T> func)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Microsoft.Build.Tasks.Core (1)
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersFromConfig.cs (1)
67private void FindDirectories(List<AssemblyFolderItem> assemblyTargets, Func<AssemblyFolderItem, bool> platformFilter)
Microsoft.Build.Tasks.Git (4)
GitDataReader\CollectionExtensions.cs (2)
16Func<TItem, TValue> selector, 17Func<TValue, int> compareItemToSearchValue)
GitDataReader\GitConfig.Reader.cs (2)
60private readonly Func<string, TextReader> _fileOpener; 63internal Reader(string gitDirectory, string commonDirectory, GitEnvironment environment, Func<string, TextReader>? fileOpener = null)
Microsoft.Build.Utilities.Core (2)
src\msbuild\src\Shared\AssemblyFolders\AssemblyFoldersFromConfig.cs (1)
67private void FindDirectories(List<AssemblyFolderItem> assemblyTargets, Func<AssemblyFolderItem, bool> platformFilter)
Task.cs (1)
250Func<TaskEnvironment, TTask> factory)
Microsoft.CodeAnalysis (414)
Binding\BindingDiagnosticBag.cs (4)
223internal bool AddDiagnostics<TData>(CompoundUseSiteInfo<TAssemblySymbol> useSiteInfo, Func<TData, Location> getLocation, TData data) 259internal bool Add<TData>(CompoundUseSiteInfo<TAssemblySymbol> useSiteInfo, Func<TData, Location> getLocation, TData data) 282internal bool Add<TData>(UseSiteInfo<TAssemblySymbol> info, Func<TData, Location> getLocation, TData data) 296internal bool ReportUseSiteDiagnostic<TData>(DiagnosticInfo? info, Func<TData, Location> getLocation, TData data)
CodeGen\CompilationTestData.cs (2)
43public Func<ISymWriterMetadataProvider, SymUnmanagedWriter>? SymWriterFactory; 58public ILBuilder GetIL(Func<IMethodSymbolInternal, bool> predicate)
CodeGen\ILBuilder.cs (1)
1230private bool AllBlocks(Func<BasicBlock, bool> predicate)
Collections\CachingDictionary.cs (4)
33private readonly Func<TKey, ImmutableArray<TElement>> _getElementsOfKey; 34private readonly Func<IEqualityComparer<TKey>, SegmentedHashSet<TKey>> _getKeys; 56Func<TKey, ImmutableArray<TElement>> getElementsOfKey, 57Func<IEqualityComparer<TKey>, SegmentedHashSet<TKey>> getKeys,
Collections\CachingFactory.cs (8)
45private readonly Func<TKey, TValue> _valueFactory; 46private readonly Func<TKey, int> _keyHash; 50Func<TKey, TValue> valueFactory, 51Func<TKey, int> keyHash, 131private readonly Func<TKey, TValue> _valueFactory; 140public CachingIdentityFactory(int size, Func<TKey, TValue> valueFactory) : 146public CachingIdentityFactory(int size, Func<TKey, TValue> valueFactory, ObjectPool<CachingIdentityFactory<TKey, TValue>> pool) : 196public static ObjectPool<CachingIdentityFactory<TKey, TValue>> CreatePool(int size, Func<TKey, TValue> valueFactory)
Collections\HashSetExtensions.cs (1)
37internal static bool Any<T>(this HashSet<T> hashSet, Func<T, bool> predicate)
Collections\UnionCollection.cs (1)
49public static ICollection<T> Create<TOrig>(ImmutableArray<TOrig> collections, Func<TOrig, ICollection<T>> selector)
Compilation.EmitStream.cs (1)
145Func<string, Stream> streamConstructor = path => fileSystem.CreateFileStream(path, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);
Compilation\Compilation.cs (11)
3091Func<ISymbol, bool> isAddedSymbol, 3118Func<ISymbol, bool> isAddedSymbol, 3135Func<ISymbol, bool> isAddedSymbol, 3182Func<ISymbol, bool> isAddedSymbol, 3258Func<ISymWriterMetadataProvider, SymUnmanagedWriter>? testSymWriterFactory, 3539Func<ISymWriterMetadataProvider, SymUnmanagedWriter>? testSymWriterFactory, 3667private static readonly Func<SyntaxTree, SmallConcurrentSetOfInts> s_createSetCallback = t => new SmallConcurrentSetOfInts(); 3808public abstract bool ContainsSymbolsWithName(Func<string, bool> predicate, SymbolFilter filter = SymbolFilter.TypeAndMember, CancellationToken cancellationToken = default(CancellationToken)); 3813public abstract IEnumerable<ISymbol> GetSymbolsWithName(Func<string, bool> predicate, SymbolFilter filter = SymbolFilter.TypeAndMember, CancellationToken cancellationToken = default(CancellationToken)); 3818/// This may be faster than <see cref="ContainsSymbolsWithName(Func{string, bool}, 3826/// faster than <see cref="GetSymbolsWithName(Func{string, bool}, SymbolFilter,
Compilation\SemanticModel.cs (1)
897internal virtual Func<SyntaxNode, bool>? GetSyntaxNodesToAnalyzeFilter(SyntaxNode declaredNode, ISymbol declaredSymbol) => null;
DiagnosticAnalyzer\AdditionalTextValueProvider.cs (1)
23public AdditionalTextValueProvider(Func<AdditionalText, TValue> computeValue, IEqualityComparer<AdditionalText>? additionalTextComparer = null)
DiagnosticAnalyzer\AnalysisResultBuilder.cs (5)
188public void ApplySuppressionsAndStoreAnalysisResult(AnalysisScope analysisScope, AnalyzerDriver driver, Compilation compilation, Func<DiagnosticAnalyzer, AnalyzerActionCounts> getAnalyzerActionCounts, CancellationToken cancellationToken) 331Func<Diagnostic, TKey?> getKeyFunc, 512Func<Diagnostic, bool> shouldInclude = analysisScope.ShouldInclude; 535Func<Diagnostic, bool> shouldInclude, 577Func<Diagnostic, bool> shouldInclude,
DiagnosticAnalyzer\AnalysisValueProvider.cs (2)
16private readonly Func<TKey, TValue> _computeValue; 25public AnalysisValueProvider(Func<TKey, TValue> computeValue, IEqualityComparer<TKey> keyComparer)
DiagnosticAnalyzer\AnalyzerDriver.cs (8)
35private static readonly Func<DiagnosticAnalyzer, bool> s_IsCompilerAnalyzerFunc = IsCompilerAnalyzer; 374protected AnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, AnalyzerManager analyzerManager, SeverityFilter severityFilter, Func<SyntaxTrivia, bool> isComment) 837Func<Exception, bool>? nullFilter = null; 848Func<Exception, bool>? analyzerExceptionFilter, 2432private readonly Func<SyntaxNode, TLanguageKindEnum> _getKind; 2443internal AnalyzerDriver(ImmutableArray<DiagnosticAnalyzer> analyzers, Func<SyntaxNode, TLanguageKindEnum> getKind, AnalyzerManager analyzerManager, SeverityFilter severityFilter, Func<SyntaxTrivia, bool> isComment) 2962Func<SyntaxNode, bool>? additionalFilter = semanticModel.GetSyntaxNodesToAnalyzeFilter(declaredNode, declaredSymbol);
DiagnosticAnalyzer\AnalyzerExecutor.cs (26)
38private readonly Func<Exception, bool>? _analyzerExceptionFilter; 40private readonly Func<DiagnosticAnalyzer, bool> _isCompilerAnalyzer; 41private readonly Func<DiagnosticAnalyzer, object?> _getAnalyzerGate; 42private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 43private readonly Func<DiagnosticAnalyzer, bool> _shouldSkipAnalysisOnGeneratedCode; 65private Func<IOperation, ControlFlowGraph>? _lazyGetControlFlowGraph; 69private Func<IOperation, ControlFlowGraph> GetControlFlowGraph 118Func<Exception, bool>? analyzerExceptionFilter, 119Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 121Func<DiagnosticAnalyzer, AnalyzerConfigOptionsProvider>? getAnalyzerConfigOptionsProvider, 123Func<DiagnosticAnalyzer, bool> shouldSkipAnalysisOnGeneratedCode, 127Func<DiagnosticAnalyzer, object?> getAnalyzerGate, 128Func<SyntaxTree, SemanticModel> getSemanticModel, 152Func<Exception, bool>? analyzerExceptionFilter, 153Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 155Func<DiagnosticAnalyzer, AnalyzerConfigOptionsProvider>? getAnalyzerConfigOptionsProvider, 157Func<DiagnosticAnalyzer, bool> shouldSkipAnalysisOnGeneratedCode, 161Func<DiagnosticAnalyzer, object?> getAnalyzerGate, 162Func<SyntaxTree, SemanticModel> getSemanticModel, 376out Func<SuppressionDescriptor, bool> isSupportedSuppression); 855Func<SyntaxNode, TLanguageKindEnum> getKind, 905var filter = executionData.SemanticModel.GetSyntaxNodesToAnalyzeFilter(block, executionData.DeclaredSymbol); 1134Func<SyntaxNode, TLanguageKindEnum> getKind, 1174Func<SyntaxNode, TLanguageKindEnum> getKind, 1399Func<Exception, bool>? analyzerExceptionFilter, 1420static bool exceptionFilter(Exception ex, Func<Exception, bool>? analyzerExceptionFilter, CancellationToken cancellationToken)
DiagnosticAnalyzer\AnalyzerFileReference.cs (4)
190internal void AddAnalyzers(ImmutableArray<DiagnosticAnalyzer>.Builder builder, string language, Func<DiagnosticAnalyzer, bool>? shouldInclude = null) 376private readonly Func<object?, TExtension?>? _coerceFunction; 381internal Extensions(AnalyzerFileReference reference, Type attributeType, AttributeLanguagesFunc languagesFunc, bool allowNetFramework, Func<object?, TExtension?>? coerceFunction = null) 513internal void AddExtensions(ImmutableArray<TExtension>.Builder builder, string language, Func<TExtension, bool>? shouldInclude = null)
DiagnosticAnalyzer\AnalyzerManager.cs (8)
274internal bool IsSupportedDiagnostic(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 302Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 308Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = 310Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = 344Func<DiagnosticAnalyzer, bool> isCompilerAnalyzer, 346Func<DiagnosticDescriptor, bool> isEnabledWithAnalyzerConfigOptions, 347Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors, 348Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors,
DiagnosticAnalyzer\CachingSemanticModelProvider.cs (1)
63private readonly Func<SyntaxTree, SemanticModel> _createSemanticModel;
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (3)
732Func<DiagnosticAnalyzer, AnalyzerActionCounts> getAnalyzerActionCounts = analyzer => analyzerActionCounts[analyzer]; 1237Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = analyzer => 1249Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = suppressor =>
DiagnosticAnalyzer\CompilationWithAnalyzersOptions.cs (7)
16private readonly Func<Exception, bool>? _analyzerExceptionFilter; 34public Func<Exception, bool>? AnalyzerExceptionFilter => _analyzerExceptionFilter; 56internal readonly Func<DiagnosticAnalyzer, AnalyzerConfigOptionsProvider>? GetAnalyzerConfigOptionsProvider; 107Func<Exception, bool>? analyzerExceptionFilter) 112/// <inheritdoc cref="CompilationWithAnalyzersOptions.CompilationWithAnalyzersOptions(AnalyzerOptions?, Action{Exception, DiagnosticAnalyzer, Diagnostic}?, bool, bool, bool, Func{Exception, bool}?)"/> 123Func<Exception, bool>? analyzerExceptionFilter, 124Func<DiagnosticAnalyzer, AnalyzerConfigOptionsProvider>? getAnalyzerConfigOptionsProvider)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
62Func<Location, bool> locationFilter,
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (19)
590public CompilationAnalysisContext(Compilation compilation, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 729public SemanticModelAnalysisContext(SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 822public SymbolAnalysisContext(ISymbol symbol, Compilation compilation, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1189public CodeBlockAnalysisContext(SyntaxNode codeBlock, ISymbol owningSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1250private readonly Func<IOperation, ControlFlowGraph>? _getControlFlowGraph; 1315Func<IOperation, ControlFlowGraph>? getControlFlowGraph, 1393private readonly Func<IOperation, ControlFlowGraph>? _getControlFlowGraph; 1448Func<Diagnostic, bool> isSupportedDiagnostic, 1462Func<IOperation, ControlFlowGraph>? getControlFlowGraph, 1557public SyntaxTreeAnalysisContext(SyntaxTree tree, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1727public SyntaxNodeAnalysisContext(SyntaxNode node, ISymbol? containingSymbol, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1733public SyntaxNodeAnalysisContext(SyntaxNode node, SemanticModel semanticModel, AnalyzerOptions options, Action<Diagnostic> reportDiagnostic, Func<Diagnostic, bool> isSupportedDiagnostic, CancellationToken cancellationToken) 1787private readonly Func<IOperation, ControlFlowGraph>? _getControlFlowGraph; 1839Func<Diagnostic, bool> isSupportedDiagnostic, 1852Func<IOperation, ControlFlowGraph>? getControlFlowGraph, 1895private readonly Func<SuppressionDescriptor, bool> _isSupportedSuppressionDescriptor; 1896private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 1930Func<SuppressionDescriptor, bool> isSupportedSuppressionDescriptor, 1931Func<SyntaxTree, SemanticModel> getSemanticModel,
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (1)
171internal static ControlFlowGraph GetControlFlowGraph(IOperation operation, Func<IOperation, ControlFlowGraph>? getControlFlowGraph, CancellationToken cancellationToken)
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (1)
341Func<IOperation, ControlFlowGraph> getControlFlowGraph,
DiagnosticAnalyzer\SourceTextValueProvider.cs (1)
24public SourceTextValueProvider(Func<SourceText, TValue> computeValue, IEqualityComparer<SourceText>? sourceTextComparer = null)
DiagnosticAnalyzer\SyntaxTreeValueProvider.cs (1)
23public SyntaxTreeValueProvider(Func<SyntaxTree, TValue> computeValue, IEqualityComparer<SyntaxTree>? syntaxTreeComparer = null)
DiaSymReader\SymUnmanagedFactory.cs (4)
79private static readonly Lazy<Func<string, string>> s_lazyGetEnvironmentVariable = new Lazy<Func<string, string>>(() => 88return (Func<string, string>)method.CreateDelegate(typeof(Func<string, string>));
Emit\DebugDocumentsBuilder.cs (1)
58internal Cci.DebugSourceDocument GetOrAddDebugDocument(string path, string basePath, Func<string, Cci.DebugSourceDocument> factory)
Emit\EditAndContinue\EmitBaseline.cs (11)
84public static EmitBaseline CreateInitialBaseline(ModuleMetadata module, Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider) 91Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 92Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider, 141Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 142Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider, 269internal readonly Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> DebugInformationProvider; 278internal readonly Func<MethodDefinitionHandle, StandaloneSignatureHandle> LocalSignatureProvider; 317Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 318Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider, 416Func<MethodDefinitionHandle, EditAndContinueMethodDebugInformation> debugInformationProvider, 417Func<MethodDefinitionHandle, StandaloneSignatureHandle> localSignatureProvider)
Emit\EditAndContinue\EncMappedMethod.cs (4)
10internal readonly struct EncMappedMethod(IMethodSymbolInternal previousMethod, Func<SyntaxNode, SyntaxNode?>? syntaxMap, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdit) 13public readonly Func<SyntaxNode, SyntaxNode?>? SyntaxMap = syntaxMap; 14public readonly Func<SyntaxNode, RuntimeRudeEdit?>? RuntimeRudeEdit = runtimeRudeEdit;
Emit\EditAndContinue\SymbolChanges.cs (4)
49private readonly Func<ISymbol, bool> _isAddedSymbol; 51protected SymbolChanges(DefinitionMap definitionMap, IEnumerable<SemanticEdit> edits, Func<ISymbol, bool> isAddedSymbol) 283public SymbolChange GetChangeForPossibleReAddedMember(ITypeDefinitionMember item, Func<ITypeDefinitionMember, bool> definitionExistsInAnyPreviousGeneration) 289SymbolChange fixChangeIfMemberIsReAdded(ITypeDefinitionMember item, SymbolChange change, Func<ITypeDefinitionMember, bool> definitionExistsInAnyPreviousGeneration)
Emit\EmitOptions.cs (1)
123internal Func<ImmutableArray<byte>, string>? TestOnly_DataToHexViaXxHash128 { get; init; }
Emit\SemanticEdit.cs (7)
47public Func<SyntaxNode, SyntaxNode?>? SyntaxMap { get; } 53public Func<SyntaxNode, RuntimeRudeEdit?>? RuntimeRudeEdit { get; } 65public SemanticEdit(SemanticEditKind kind, ISymbol? oldSymbol, ISymbol? newSymbol, Func<SyntaxNode, SyntaxNode?>? syntaxMap, bool preserveLocalVariables) 74public SemanticEdit(SemanticEditKind kind, ISymbol? oldSymbol, ISymbol? newSymbol, Func<SyntaxNode, SyntaxNode?>? syntaxMap, bool preserveLocalVariables, MethodInstrumentation instrumentation) 104public SemanticEdit(SemanticEditKind kind, ISymbol? oldSymbol, ISymbol? newSymbol, Func<SyntaxNode, SyntaxNode?>? syntaxMap = null, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdit = null, MethodInstrumentation instrumentation = default) 215internal static SemanticEdit Create(SemanticEditKind kind, ISymbolInternal oldSymbol, ISymbolInternal newSymbol, Func<SyntaxNode, SyntaxNode>? syntaxMap = null)
FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
InternalUtilities\ConcurrentLruCache.cs (1)
224public V GetOrAdd<T>(K key, T arg, Func<T, V> creator)
InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
InternalUtilities\SpanUtilities.cs (1)
24public static bool All<TElement>(this ReadOnlySpan<TElement> span, Func<TElement, bool> predicate)
InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
MetadataReader\MetadataHelpers.cs (1)
619ReadOnlyMemory<char> nameMemory, ImmutableArray<T> splitSystemString, Func<ReadOnlyMemory<char>, T> convert)
MetadataReference\AssemblyMetadata.cs (2)
54private readonly Func<string, ModuleMetadata>? _moduleFactoryOpt; 98internal AssemblyMetadata(ModuleMetadata manifestModule, Func<string, ModuleMetadata> moduleFactory)
NativePdbWriter\PdbWriter.cs (2)
31private readonly Func<ISymWriterMetadataProvider, SymUnmanagedWriter> _symWriterFactory; 43public PdbWriter(string fileName, Func<ISymWriterMetadataProvider, SymUnmanagedWriter> symWriterFactory, HashAlgorithmName hashAlgorithmNameOpt)
Operations\ControlFlowGraphBuilder.cs (3)
1998private void VisitAndPushArray<T>(ImmutableArray<T> array, Func<T, IOperation>? unwrapper = 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 3966Func<IOperation, IOperation>? visitResource = null)
PEWriter\CustomDebugInfoWriter.cs (1)
166Func<ILocalDefinition, bool> filter,
PEWriter\ExtendedPEBuilder.cs (1)
43Func<IEnumerable<Blob>, BlobContentId>? deterministicIdProvider,
PEWriter\MetadataWriter.cs (2)
1881public PortablePdbBuilder GetPortablePdbBuilder(ImmutableArray<int> typeSystemRowCounts, MethodDefinitionHandle debugEntryPoint, Func<IEnumerable<Blob>, BlobContentId> deterministicIdProviderOpt) 2126private void AddCustomAttributesToTable<T>(IEnumerable<T> parentList, Func<T, EntityHandle> getDefinitionHandle)
PEWriter\PeWriter.cs (2)
192var peIdProvider = isDeterministic ? 207var portablePdbIdProvider = (context.Module.PdbChecksumAlgorithm.Name != null) ?
SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
SourceGeneration\GeneratorDriver.cs (2)
60public GeneratorDriver RunGenerators(Compilation compilation, Func<GeneratorFilterContext, bool>? generatorFilter, CancellationToken cancellationToken = default) 231internal GeneratorDriverState RunGeneratorsCore(Compilation compilation, DiagnosticBag? diagnosticsBag, Func<GeneratorFilterContext, bool>? generatorFilter = null, CancellationToken cancellationToken = default)
SourceGeneration\GeneratorTimerExtensions.cs (4)
30public static RunTimer CreateSingleGeneratorRunTimer(this CodeAnalysisEventSource eventSource, ISourceGenerator generator, Func<TimeSpan, TimeSpan> adjustRunTime) 49private readonly Func<TimeSpan, TimeSpan>? _adjustRunTime; 60public RunTimer(Func<TimeSpan, TimeSpan>? adjustRunTime) 66public RunTimer(Action<TimeSpan> callback, Func<TimeSpan, TimeSpan>? adjustRunTime = null)
SourceGeneration\Nodes\InputNode.cs (3)
24private readonly Func<DriverStateTable.Builder, ImmutableArray<T>> _getInput; 30public InputNode(Func<DriverStateTable.Builder, ImmutableArray<T>> getInput, IEqualityComparer<T>? inputComparer = null) 36Func<DriverStateTable.Builder, ImmutableArray<T>> getInput,
SourceGeneration\Nodes\ValueSourceExtensions.cs (1)
119public static IncrementalValuesProvider<TSource> Where<TSource>(this IncrementalValuesProvider<TSource> source, Func<TSource, bool> predicate) => source.SelectMany((item, _) => predicate(item) ? ImmutableArray.Create(item) : ImmutableArray<TSource>.Empty);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
Syntax\ChildSyntaxList.Enumerator.cs (2)
22private Func<GreenNode, bool>? _descendIntoChildrenGreen; 35internal void InitializeFrom(SyntaxNode node, Func<GreenNode, bool>? descendIntoChildrenGreen)
Syntax\GreenNode.cs (3)
920public static GreenNode? CreateList<TFrom>(IEnumerable<TFrom>? enumerable, Func<TFrom, GreenNode> select) 929public static GreenNode? CreateList<TFrom>(List<TFrom> list, Func<TFrom, GreenNode> select) 951public static GreenNode? CreateList<TFrom>(IReadOnlyList<TFrom> list, Func<TFrom, GreenNode> select)
Syntax\InternalSyntax\SyntaxDiagnosticInfoList.cs (1)
25internal bool Any(Func<DiagnosticInfo, bool> predicate)
Syntax\SeparatedSyntaxList.cs (3)
260public int IndexOf(Func<TNode, bool> predicate) 299public int LastIndexOf(Func<TNode, bool> predicate) 317internal bool Any(Func<TNode, bool> predicate)
Syntax\SeparatedSyntaxListExtensions.cs (1)
11internal static int Count<TNode>(this SeparatedSyntaxList<TNode> list, Func<TNode, bool> predicate)
Syntax\SyntaxList`1.cs (3)
410internal bool All(Func<TNode, bool> predicate) 522public int IndexOf(Func<TNode, bool> predicate) 567public int LastIndexOf(Func<TNode, bool> predicate)
Syntax\SyntaxNavigator.cs (39)
31private static readonly Func<SyntaxTrivia, bool>?[] s_stepIntoFunctions = new Func<SyntaxTrivia, bool>?[] 43private static Func<SyntaxTrivia, bool>? GetStepIntoFunction( 52private static Func<SyntaxToken, bool> GetPredicateFunction(bool includeZeroWidth) 57private static bool Matches(Func<SyntaxToken, bool>? predicate, SyntaxToken token) 82internal SyntaxToken GetPreviousToken(in SyntaxToken current, Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto) 87internal SyntaxToken GetNextToken(in SyntaxToken current, Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto) 95internal SyntaxToken GetFirstToken(SyntaxNode current, Func<SyntaxToken, bool>? predicate, Func<SyntaxTrivia, bool>? stepInto) 141internal SyntaxToken GetLastToken(SyntaxNode current, Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto) 187Func<SyntaxToken, bool>? predicate, 188Func<SyntaxTrivia, bool> stepInto) 208Func<SyntaxToken, bool> predicate, 209Func<SyntaxTrivia, bool> stepInto) 227Func<SyntaxToken, bool> predicate, 228Func<SyntaxTrivia, bool>? stepInto, 245Func<SyntaxToken, bool>? predicate, 246Func<SyntaxTrivia, bool>? stepInto) 279Func<SyntaxToken, bool> predicate, 280Func<SyntaxTrivia, bool>? stepInto) 313Func<SyntaxToken, bool>? predicate, 314Func<SyntaxTrivia, bool>? stepInto) 345Func<SyntaxToken, bool> predicate, 346Func<SyntaxTrivia, bool>? stepInto) 378Func<SyntaxToken, bool>? predicate, 379Func<SyntaxTrivia, bool>? stepInto, 407Func<SyntaxToken, bool> predicate, 408Func<SyntaxTrivia, bool>? stepInto, 432Func<SyntaxToken, bool>? predicate, 433Func<SyntaxTrivia, bool>? stepInto) 482Func<SyntaxToken, bool> predicate, 483Func<SyntaxTrivia, bool>? stepInto) 530internal SyntaxToken GetNextToken(in SyntaxToken current, Func<SyntaxToken, bool>? predicate, bool searchInsideCurrentTokenTrailingTrivia, Func<SyntaxTrivia, bool>? stepInto) 583internal SyntaxToken GetPreviousToken(in SyntaxToken current, Func<SyntaxToken, bool> predicate, bool searchInsideCurrentTokenLeadingTrivia, 584Func<SyntaxTrivia, bool>? stepInto)
Syntax\SyntaxNode.cs (22)
838public TNode? FirstAncestorOrSelf<TNode>(Func<TNode, bool>? predicate = null, bool ascendOutOfTrivia = true) 877public IEnumerable<SyntaxNode> DescendantNodes(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 888public IEnumerable<SyntaxNode> DescendantNodes(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 898public IEnumerable<SyntaxNode> DescendantNodesAndSelf(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 909public IEnumerable<SyntaxNode> DescendantNodesAndSelf(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 919public IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokens(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 930public IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokens(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 940public IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokensAndSelf(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 951public IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokensAndSelf(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1048public IEnumerable<SyntaxToken> DescendantTokens(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1056public IEnumerable<SyntaxToken> DescendantTokens(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1104public SyntaxTrivia FindTrivia(int position, Func<SyntaxTrivia, bool>? stepInto) 1114internal static SyntaxTrivia FindTriviaByOffset(SyntaxNode node, int textOffset, Func<SyntaxTrivia, bool>? stepInto = null) 1185public IEnumerable<SyntaxTrivia> DescendantTrivia(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1193public IEnumerable<SyntaxTrivia> DescendantTrivia(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1202Func<GreenNode, bool>? descendIntoChildrenGreen, 1203Func<SyntaxNode, bool>? descendIntoChildrenRed, 1214Func<GreenNode, bool>? descendIntoChildrenGreen, 1215Func<SyntaxNode, bool>? descendIntoChildrenRed, 1283internal IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokensAndSelf(Func<GreenNode, bool> descendIntoChildrenGreen, bool descendIntoTrivia) 1539private SyntaxToken FindToken(int position, Func<SyntaxTrivia, bool> findInsideTrivia) 1552protected virtual SyntaxToken FindTokenCore(int position, Func<SyntaxTrivia, bool> stepInto)
Syntax\SyntaxNode.Iterators.cs (24)
16private IEnumerable<SyntaxNode> DescendantNodesImpl(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren, bool descendIntoTrivia, bool includeSelf) 23private IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokensImpl(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren, bool descendIntoTrivia, bool includeSelf) 30Func<GreenNode, bool>? descendIntoChildrenGreen, 31Func<SyntaxNode, bool>? descendIntoChildrenRed, 42Func<GreenNode, bool>? descendIntoChildrenGreen, 43Func<SyntaxNode, bool>? descendIntoChildrenRed, 69private readonly Func<GreenNode, bool>? _descendIntoChildrenGreen; 76private readonly Func<SyntaxNode, bool>? _descendIntoChildrenRed; 83Func<GreenNode, bool>? descendIntoChildrenGreen, 84Func<SyntaxNode, bool>? descendIntoChildrenRed) 238Func<GreenNode, bool>? descendIntoChildrenGreen, 239Func<SyntaxNode, bool>? descendIntoChildrenRed) 333Func<GreenNode, bool>? descendIntoChildrenGreen, 334Func<SyntaxNode, bool>? descendIntoChildrenRed) 431private IEnumerable<SyntaxNode> DescendantNodesOnly(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren, bool includeSelf) 456private bool ShouldYieldSelf(bool includeSelf, in TextSpan span, Func<GreenNode, bool>? descendIntoChildrenGreen) 461Func<GreenNode, bool>? descendIntoChildrenGreen, 462Func<SyntaxNode, bool>? descendIntoChildrenRed, 494Func<GreenNode, bool>? descendIntoChildrenGreen, 495Func<SyntaxNode, bool>? descendIntoChildrenRed, 586Func<GreenNode, bool>? descendIntoChildrenGreen, 587Func<SyntaxNode, bool>? descendIntoChildrenRed) 627Func<GreenNode, bool>? descendIntoChildrenGreen, 628Func<SyntaxNode, bool>? descendIntoChildrenRed)
Syntax\SyntaxNodeOrToken.cs (4)
842internal IList<TDirective> GetDirectives<TDirective>(Func<TDirective, bool>? filter = null) 849private static void GetDirectives<TDirective>(in SyntaxNodeOrToken node, Func<TDirective, bool>? filter, out IList<TDirective> directives) 869private static void GetDirectives<TDirective>(SyntaxNode node, Func<TDirective, bool>? filter, ref List<TDirective>? directives) 878private static void GetDirectivesInTrivia<TDirective>(in SyntaxTrivia trivia, Func<TDirective, bool>? filter, ref List<TDirective>? directives)
Syntax\SyntaxToken.cs (7)
24private static readonly Func<DiagnosticInfo, Diagnostic> s_createDiagnosticWithoutLocation = Diagnostic.Create; 26internal static readonly Func<SyntaxToken, bool> NonZeroWidth = t => t.Width > 0; 27internal static readonly Func<SyntaxToken, bool> Any = t => true; 599internal SyntaxToken GetNextToken(Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto = null) 630internal SyntaxToken GetPreviousToken(Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto = null)
Syntax\SyntaxTrivia.cs (1)
26internal static readonly Func<SyntaxTrivia, bool> Any = t => true;
Microsoft.CodeAnalysis.Analyzers (438)
src\7a47995420f988d7\AbstractRemoveUnnecessaryImportsService.cs (2)
22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25Document document, Func<SyntaxNode, bool> predicate, CancellationToken cancellationToken)
src\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (1)
16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
19protected readonly Func<TypeInferenceInfo, bool> IsUsableTypeFunc; 24private static readonly Func<TypeInferenceInfo, bool> s_isNotNull = t => t.InferredType != null;
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
37using var _ = PooledDelegates.GetPooledFunction(valueFactory, factoryArgument, out var boundFunction); 55using var _a = PooledDelegates.GetPooledFunction(addValueFactory, factoryArgument, out var pooledAddValueFactory);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 47private readonly Func<T, int> _getHashCode = getHashCode;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (7)
122Func<object, Task> taskBody = static async o => 287Func<object, Task> taskBody = static async o => 395private readonly Func<object, Task> _taskBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 584IEnumerable<TSource> source, Func<object, Task> taskBody, 610IAsyncEnumerable<TSource> source, Func<object, Task> taskBody, 637T fromExclusive, T toExclusive, Func<object, Task> taskBody,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
29public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
130private static int CalculateDepthOfInheritance(INamedTypeSymbol namedType, Func<INamedTypeSymbol, bool> isExcludedFromInheritanceCount)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (3)
15private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 18Func<INamedTypeSymbol, bool>? isExcludedFromInheritanceCountFunc = null) 32public Func<INamedTypeSymbol, bool> IsExcludedFromInheritanceCountFunc { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (2)
115private readonly Func<INamedTypeSymbol, bool> _isDisallowedCatchType; 121public DisallowGeneralCatchUnlessRethrowWalker(Func<INamedTypeSymbol, bool> isDisallowedCatchType, bool checkAnonymousFunctions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
131public static TOperation? GetAncestor<TOperation>(this IOperation root, OperationKind ancestorKind, Func<TOperation, bool>? predicate = null) 166public static IOperation? GetAncestor(this IOperation root, ImmutableArray<OperationKind> ancestorKinds, Func<IOperation, bool>? predicate = null)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\SourceTextExtensions.cs (1)
25public static T Parse<T>(this SourceText text, Func<StreamReader, T> parser)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (2)
458Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, 473static bool TryParse(string s, (Compilation compilation, Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out SymbolNamesWithValueOption<TValue> option)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
83Func<string, NameParts> getSymbolNamePartsFunc)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (2)
24Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
203internal bool IsTaskOfType([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol, bool> typeArgumentPredicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
17public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 20public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (2)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 80Func<SyntaxEditor, Task> editAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
235Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
501Func<SyntaxTrivia, bool> isEndOfLineTrivia, 521Func<SyntaxToken, bool> isComma, 549Func<SyntaxToken, bool> isAccessibilityModifier)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
195Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 196Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
29Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 52Func<TType, TNode> selector, 96Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 153Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
31private static readonly Func<ISymbol, bool> s_LocalNameFilter = s => 76Func<ISymbol, bool>? filter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
35Func<ISymbol, bool> filter, IEnumerable<string> usedNames, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
35protected static readonly Func<SyntaxNode, bool> s_containsAnnotations = n => n.ContainsAnnotations; 36protected static readonly Func<SyntaxNodeOrToken, bool> s_hasSimplifierAnnotation = n => n.HasAnnotation(Simplifier.Annotation); 40protected abstract ImmutableArray<NodeOrTokenToReduce> GetNodesAndTokensToReduce(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 283Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpan)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
20Func<SyntaxNode, bool>? expandInsideNode, 27Func<SyntaxNode, bool>? expandInsideNode,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (6)
43Func<string, bool>? canUse = null, 63Func<string, bool>? canUse = null, 86Func<string, bool>? canUse = null, 134public static string GenerateUniqueName(string baseName, Func<string, bool> canUse) 140public static string GenerateUniqueName(string baseName, string extension, Func<string, bool> canUse) 160public static string GenerateUniqueName(IEnumerable<string> baseNames, Func<string, bool> canUse)
Microsoft.CodeAnalysis.AnalyzerUtilities (502)
src\66dd3055a1c91c38\PointsToAnalysis.CorePointsToAnalysisDataDomain.cs (3)
22private readonly Func<ITypeSymbol?, bool> _isDisposable; 27Func<ITypeSymbol?, bool> isDisposable) 58Func<PointsToAbstractValue, ImmutableHashSet<AnalysisEntity>> getChildAnalysisEntities,
src\66dd3055a1c91c38\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
445Func<ITypeSymbol?, bool> isDisposable,
src\683181b2796de991\ParameterValidationAnalysisContext.cs (2)
35Func<ParameterValidationAnalysisContext, ParameterValidationAnalysisResult?> tryGetOrComputeAnalysisResult, 59Func<ParameterValidationAnalysisContext, ParameterValidationAnalysisResult?> tryGetOrComputeAnalysisResult)
src\a03b2aad21e28a8a\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (2)
598Func<PropertySetAbstractValue, HazardousUsageEvaluationResult> evaluationFunction, 599Func<AbstractLocation, PropertySetAbstractValue>? locationToAbstractValueMapping = null)
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
37using var _ = PooledDelegates.GetPooledFunction(valueFactory, factoryArgument, out var boundFunction); 55using var _a = PooledDelegates.GetPooledFunction(addValueFactory, factoryArgument, out var pooledAddValueFactory);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 47private readonly Func<T, int> _getHashCode = getHashCode;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (7)
122Func<object, Task> taskBody = static async o => 287Func<object, Task> taskBody = static async o => 395private readonly Func<object, Task> _taskBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 584IEnumerable<TSource> source, Func<object, Task> taskBody, 610IAsyncEnumerable<TSource> source, Func<object, Task> taskBody, 637T fromExclusive, T toExclusive, Func<object, Task> taskBody,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
29public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
130private static int CalculateDepthOfInheritance(INamedTypeSymbol namedType, Func<INamedTypeSymbol, bool> isExcludedFromInheritanceCount)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (3)
15private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 18Func<INamedTypeSymbol, bool>? isExcludedFromInheritanceCountFunc = null) 32public Func<INamedTypeSymbol, bool> IsExcludedFromInheritanceCountFunc { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (2)
115private readonly Func<INamedTypeSymbol, bool> _isDisallowedCatchType; 121public DisallowGeneralCatchUnlessRethrowWalker(Func<INamedTypeSymbol, bool> isDisallowedCatchType, bool checkAnonymousFunctions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
131public static TOperation? GetAncestor<TOperation>(this IOperation root, OperationKind ancestorKind, Func<TOperation, bool>? predicate = null) 166public static IOperation? GetAncestor(this IOperation root, ImmutableArray<OperationKind> ancestorKinds, Func<IOperation, bool>? predicate = null)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\SourceTextExtensions.cs (1)
25public static T Parse<T>(this SourceText text, Func<StreamReader, T> parser)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (2)
458Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, 473static bool TryParse(string s, (Compilation compilation, Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out SymbolNamesWithValueOption<TValue> option)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
83Func<string, NameParts> getSymbolNamePartsFunc)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (2)
24Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
203internal bool IsTaskOfType([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol, bool> typeArgumentPredicate)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\BranchWithInfo.cs (1)
17private static readonly Func<ControlFlowRegion, IEnumerable<ControlFlowRegion>> s_getTransitiveNestedRegions = GetTransitiveNestedRegions;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (5)
77Func<AnalysisEntity, CopyAbstractValue> getDefaultCopyValue) 138Func<AnalysisEntity, CopyAbstractValue?> tryGetAddressSharedCopyValue, 151Func<AnalysisEntity, CopyAbstractValue?> tryGetAddressSharedCopyValue, 449Func<AnalysisEntity, bool>? predicate = null; 522private void ApplyMissingCurrentAnalysisDataCore(CopyAnalysisData mergedData, Func<AnalysisEntity, bool>? predicate)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CoreCopyAnalysisDataDomain.cs (2)
19private readonly Func<AnalysisEntity, CopyAbstractValue> _getDefaultCopyValue; 21public CoreCopyAnalysisDataDomain(AbstractValueDomain<CopyAbstractValue> valueDomain, Func<AnalysisEntity, CopyAbstractValue> getDefaultCopyValue)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisContext.cs (2)
32Func<CopyAnalysisContext, CopyAnalysisResult?> tryGetOrComputeAnalysisResult, 52Func<CopyAnalysisContext, CopyAnalysisResult?> tryGetOrComputeAnalysisResult,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (2)
192internal void AssertValidCopyAnalysisData(Func<AnalysisEntity, CopyAbstractValue?>? tryGetDefaultCopyValue = null, bool initializingParameters = false) 201Func<AnalysisEntity, CopyAbstractValue?>? tryGetDefaultCopyValue = null,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\SetCopyAbstractValuePredicateKind.cs (1)
12/// Predicate kind for <see cref="CopyDataFlowOperationVisitor.SetAbstractValue(CopyAnalysisData, AnalysisEntity, CopyAbstractValue, System.Func{AnalysisEntity, CopyAbstractValue}, SetCopyAbstractValuePredicateKind?, bool)"/>
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.cs (1)
95Func<ITypeSymbol, bool> isDisposableTypeNotRequiringToBeDisposed,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisContext.cs (5)
36Func<DisposeAnalysisContext, DisposeAnalysisResult?> tryGetOrComputeAnalysisResult, 44Func<ITypeSymbol, bool> isDisposableTypeNotRequiringToBeDisposed) 75Func<DisposeAnalysisContext, DisposeAnalysisResult?> tryGetOrComputeAnalysisResult, 80Func<ITypeSymbol, bool> isDisposableTypeNotRequiringToBeDisposed) 112internal Func<ITypeSymbol, bool> IsDisposableTypeNotRequiringToBeDisposed { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
112public static Func<ITypeSymbol?, bool> GetIsDisposableDelegate(Compilation compilation)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateAnalysis.cs (5)
61Func<GlobalFlowStateAnalysisContext, GlobalFlowStateValueSetFlowOperationVisitor> createOperationVisitor, 71Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null) 91Func<GlobalFlowStateAnalysisContext, GlobalFlowStateValueSetFlowOperationVisitor> createOperationVisitor, 101Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null) 128Func<GlobalFlowStateAnalysisContext, GlobalFlowStateValueSetFlowOperationVisitor> createOperationVisitor)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateAnalysisContext.cs (2)
36Func<GlobalFlowStateAnalysisContext, GlobalFlowStateAnalysisResult?> tryGetOrComputeAnalysisResult, 64Func<GlobalFlowStateAnalysisContext, GlobalFlowStateAnalysisResult?> tryGetOrComputeAnalysisResult,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.cs (3)
87var isDisposable = DisposeAnalysisHelper.GetIsDisposableDelegate(analysisContext.ControlFlowGraph.OriginalOperation.SemanticModel!.Compilation); 94internal static bool ShouldBeTracked([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol?, bool> isDisposable) 98internal static bool ShouldBeTracked(AnalysisEntity analysisEntity, PointsToAnalysisKind pointsToAnalysisKind, Func<ITypeSymbol?, bool> isDisposable)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToAnalysisDomain.cs (3)
18public PointsToAnalysisDomain(DefaultPointsToValueGenerator defaultPointsToValueGenerator, Func<ITypeSymbol?, bool> isDisposable) 26Func<PointsToAbstractValue, ImmutableHashSet<AnalysisEntity>> getChildAnalysisEntities, 28Func<ITypeSymbol?, bool> isDisposable)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisContext.cs (2)
34Func<PointsToAnalysisContext, PointsToAnalysisResult?> tryGetOrComputeAnalysisResult, 60Func<PointsToAnalysisContext, PointsToAnalysisResult?> tryGetOrComputeAnalysisResult,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (6)
20private readonly Func<ITypeSymbol?, bool> _isDisposable; 22internal PointsToAnalysisData(Func<ITypeSymbol?, bool> isDisposable) 27internal PointsToAnalysisData(IDictionary<AnalysisEntity, PointsToAbstractValue> fromData, Func<ITypeSymbol?, bool> isDisposable) 41Func<ITypeSymbol?, bool> isDisposable) 122internal static void AssertValidPointsToAnalysisData(IDictionary<AnalysisEntity, PointsToAbstractValue> map, Func<ITypeSymbol?, bool> isDisposable) 139Func<ITypeSymbol?, bool> isDisposable)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisContext.cs (2)
38Func<PropertySetAnalysisContext, PropertySetAnalysisResult?> tryGetOrComputeAnalysisResult, 81Func<PropertySetAnalysisContext, PropertySetAnalysisResult?> tryGetOrComputeAnalysisResult,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetCallbacks.cs (1)
52Func<object?, bool> badLiteralValuePredicate)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysisContext.cs (2)
34Func<TaintedDataAnalysisContext, TaintedDataAnalysisResult?> tryGetOrComputeAnalysisResult, 76Func<TaintedDataAnalysisContext, TaintedDataAnalysisResult?> tryGetOrComputeAnalysisResult,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.cs (2)
57Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null) 91Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysisContext.cs (5)
34Func<ValueContentAnalysisContext, ValueContentAnalysisResult?> tryGetOrComputeAnalysisResult, 36Func<IOperation, ValueContentAbstractValue>? getValueForAdditionalSupportedValueTypeOperation, 50public Func<IOperation, ValueContentAbstractValue>? GetValueForAdditionalSupportedValueTypeOperation { get; } 62Func<ValueContentAnalysisContext, ValueContentAnalysisResult?> tryGetOrComputeAnalysisResult, 64Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractDataFlowAnalysisContext.cs (2)
41Func<TAnalysisContext, TAnalysisResult?> tryGetOrComputeAnalysisResult, 89public Func<TAnalysisContext, TAnalysisResult?> TryGetOrComputeAnalysisResult { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (3)
433private ImmutableHashSet<AnalysisEntity> GetChildAnalysisEntities(PointsToAbstractValue? instanceLocation, Func<AnalysisEntity, bool>? predicate) 453private ImmutableHashSet<AnalysisEntity> GetChildAnalysisEntities(Func<AnalysisEntity, bool> predicate) 738Func<AnalysisEntity, bool>? predicate = null;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (8)
35private readonly Func<IOperation, PointsToAbstractValue>? _getPointsToAbstractValue; 37private readonly Func<IFlowCaptureOperation, bool> _getIsLValueFlowCapture; 40private readonly Func<IOperation, AnalysisEntity?>? _interproceduralGetAnalysisEntityForFlowCapture; 41private readonly Func<ISymbol, ImmutableStack<IOperation>?> _getInterproceduralCallStackForOwningSymbol; 46Func<IOperation, PointsToAbstractValue>? getPointsToAbstractValue, 48Func<IFlowCaptureOperation, bool> getIsLValueFlowCapture, 54Func<IOperation, AnalysisEntity?>? interproceduralGetAnalysisEntityForFlowCapture, 55Func<ISymbol, ImmutableStack<IOperation>?> getInterproceduralCallStackForOwningSymbol)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityMapAbstractDomain.cs (6)
18private static readonly Func<AnalysisEntity, bool> s_defaultIsTrackedEntity = new(_ => true); 19private static readonly Func<PointsToAbstractValue, bool> s_defaultIsTrackedPointsToValue = new(_ => true); 21private readonly Func<AnalysisEntity, bool> _isTrackedEntity; 22private readonly Func<PointsToAbstractValue, bool> _isTrackedPointsToValue; 26Func<AnalysisEntity, bool> isTrackedEntity, 27Func<PointsToAbstractValue, bool> isTrackedPointsToValue)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
167protected Func<TAnalysisContext, TAnalysisResult?> TryGetOrComputeAnalysisResult 2104Func<TKey, bool>? predicate)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisData.cs (8)
38Func<IOperation, TAbstractAnalysisValue> getCachedAbstractValueFromCaller, 39Func<IMethodSymbol, ControlFlowGraph?> getInterproceduralControlFlowGraph, 40Func<IOperation, AnalysisEntity?> getAnalysisEntityForFlowCapture, 41Func<ISymbol, ImmutableStack<IOperation>?> getInterproceduralCallStackForOwningSymbol) 65public Func<IOperation, TAbstractAnalysisValue> GetCachedAbstractValueFromCaller { get; } 66public Func<IMethodSymbol, ControlFlowGraph?> GetInterproceduralControlFlowGraph { get; } 67public Func<IOperation, AnalysisEntity?> GetAnalysisEntityForFlowCapture { get; } 68public Func<ISymbol, ImmutableStack<IOperation>?> GetInterproceduralCallStackForOwningSymbol { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisPredicate.cs (7)
14private readonly Func<IMethodSymbol, bool>? _skipAnalysisForInvokedMethodPredicate; 15private readonly Func<IMethodSymbol, bool>? _skipAnalysisForInvokedLambdaOrLocalFunctionPredicate; 16private readonly Func<IDataFlowAnalysisContext, bool>? _skipAnalysisForInvokedContextPredicate; 19Func<IMethodSymbol, bool>? skipAnalysisForInvokedMethodPredicate, 20Func<IMethodSymbol, bool>? skipAnalysisForInvokedLambdaOrLocalFunctionPredicate, 21Func<IDataFlowAnalysisContext, bool>? skipAnalysisForInvokedContextPredicate) 37var predicate = isLambdaOrLocalFunction ?
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\SingleThreadedConcurrentDictionary.cs (1)
40public TValue? GetOrAdd(TKey key, Func<TKey, TValue?> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
17public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 20public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
Microsoft.CodeAnalysis.CodeStyle (391)
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
106private static readonly Func<Guid, ConcurrentDictionary<string, string?>> s_createCache =
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
88Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 394Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
37using var _ = PooledDelegates.GetPooledFunction(valueFactory, factoryArgument, out var boundFunction); 55using var _a = PooledDelegates.GetPooledFunction(addValueFactory, factoryArgument, out var pooledAddValueFactory);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 47private readonly Func<T, int> _getHashCode = getHashCode;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (7)
122Func<object, Task> taskBody = static async o => 287Func<object, Task> taskBody = static async o => 395private readonly Func<object, Task> _taskBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 584IEnumerable<TSource> source, Func<object, Task> taskBody, 610IAsyncEnumerable<TSource> source, Func<object, Task> taskBody, 637T fromExclusive, T toExclusive, Func<object, Task> taskBody,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
17public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 20public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
Microsoft.CodeAnalysis.CodeStyle.Fixes (46)
src\7a47995420f988d7\AbstractRemoveUnnecessaryImportsService.cs (2)
22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25Document document, Func<SyntaxNode, bool> predicate, CancellationToken cancellationToken)
src\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (1)
16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
19protected readonly Func<TypeInferenceInfo, bool> IsUsableTypeFunc; 24private static readonly Func<TypeInferenceInfo, bool> s_isNotNull = t => t.InferredType != null;
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
345var cascadingFix = AddParameterService.HasCascadingDeclarations(methodToUpdate)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\CodeFixData.cs (4)
13Func<CancellationToken, Task<Solution>> createChangedSolutionNonCascading, 14Func<CancellationToken, Task<Solution>>? createChangedSolutionCascading) 25public Func<CancellationToken, Task<Solution>> CreateChangedSolutionNonCascading { get; } = createChangedSolutionNonCascading ?? throw new ArgumentNullException(nameof(createChangedSolutionNonCascading)); 30public Func<CancellationToken, Task<Solution>>? CreateChangedSolutionCascading { get; } = createChangedSolutionCascading;
src\roslyn\src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
301static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Document>> action, string equivalenceKey)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
22Func<ITypeSymbol, bool> includeMemberType,
src\roslyn\src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (2)
120private readonly Func<CancellationToken, Task<Solution>> _createChangedSolutionAsync; 137Func<CancellationToken, Task<Solution>> createChangedSolutionAsync,
src\roslyn\src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (3)
102private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 104private ProjectOptionsChangeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 110public static ProjectOptionsChangeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (2)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 80Func<SyntaxEditor, Task> editAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
235Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
501Func<SyntaxTrivia, bool> isEndOfLineTrivia, 521Func<SyntaxToken, bool> isComma, 549Func<SyntaxToken, bool> isAccessibilityModifier)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
195Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 196Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
29Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 52Func<TType, TNode> selector, 96Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 153Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
31private static readonly Func<ISymbol, bool> s_LocalNameFilter = s => 76Func<ISymbol, bool>? filter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
35Func<ISymbol, bool> filter, IEnumerable<string> usedNames, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
35protected static readonly Func<SyntaxNode, bool> s_containsAnnotations = n => n.ContainsAnnotations; 36protected static readonly Func<SyntaxNodeOrToken, bool> s_hasSimplifierAnnotation = n => n.HasAnnotation(Simplifier.Annotation); 40protected abstract ImmutableArray<NodeOrTokenToReduce> GetNodesAndTokensToReduce(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 283Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpan)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
20Func<SyntaxNode, bool>? expandInsideNode, 27Func<SyntaxNode, bool>? expandInsideNode,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (6)
43Func<string, bool>? canUse = null, 63Func<string, bool>? canUse = null, 86Func<string, bool>? canUse = null, 134public static string GenerateUniqueName(string baseName, Func<string, bool> canUse) 140public static string GenerateUniqueName(string baseName, string extension, Func<string, bool> canUse) 160public static string GenerateUniqueName(IEnumerable<string> baseNames, Func<string, bool> canUse)
Microsoft.CodeAnalysis.CSharp (151)
Binder\Binder_Expressions.cs (1)
10998private static readonly Func<PropertySymbol, bool> s_isIndexedPropertyWithNonOptionalArguments = property =>
Binder\Binder_Symbols.cs (3)
1628private static readonly Func<Symbol, MethodSymbol> s_toMethodSymbolFunc = s => (MethodSymbol)s; 1629private static readonly Func<Symbol, PropertySymbol> s_toPropertySymbolFunc = s => (PropertySymbol)s; 2846private static bool CheckFeatureAvailability<TData>(SyntaxTree tree, MessageID feature, DiagnosticBag? diagnostics, TData data, Func<TData, Location> getLocation, bool forceWarning = false)
Binder\Binder_Unsafe.cs (4)
40private void ReportDiagnosticsIfUnsafeMemberAccess<T>(DiagnosticBag diagnostics, Symbol symbol, T arg, Func<T, Location?> location) 97static void checkTypeArgumentWithConstructorConstraint(Binder @this, TypeParameterSymbol typeParameter, NamedTypeSymbol typeArgument, Symbol targetSymbol, T arg, Func<T, Location?> location, DiagnosticBag diagnostics) 111private void ReportDiagnosticsIfUnsafeMemberAccess<T>(DiagnosticBag diagnostics, Symbol symbol, CallerUnsafeMode callerUnsafeMode, T arg, Func<T, Location?> location, bool forConstructorConstraint, ReadOnlySpan<object> additionalArgs = default) 244Func<T, Location?> location,
Binder\BindingDiagnosticBag.cs (1)
108internal bool ReportUseSite<TData>(Symbol? symbol, Func<TData, Location> getLocation, TData data)
Binder\DecisionDagBuilder_CheckOrReachability.cs (10)
504static void analyzePattern(ArrayBuilder<BoundPattern> currentCases, BoundPattern pattern, Func<BoundPattern, BoundPattern>? wrapIntoParentAndPattern, ref readonly ReachabilityAnalysisContext context) 512static void analyzeBinary(ArrayBuilder<BoundPattern> currentCases, BoundBinaryPattern binaryPattern, Func<BoundPattern, BoundPattern>? wrapIntoParentAndPattern, ref readonly ReachabilityAnalysisContext context) 554Func<BoundPattern, BoundPattern> newWrapIntoParentAndPattern = (BoundPattern newPattern) => 698private Func<BoundPattern, BoundPattern>? _makeEvaluationSequenceOperand; 1186var saveMakeEvaluationSequenceOperand = _makeEvaluationSequenceOperand; 1222var saveMakeEvaluationSequenceOperand = _makeEvaluationSequenceOperand; 1310var saveMakeEvaluationSequenceOperand = _makeEvaluationSequenceOperand; 1371var saveMakeEvaluationSequenceOperand = _makeEvaluationSequenceOperand; 1377Func<BoundPattern, BoundPattern> makeListPattern = (BoundPattern newPattern) => 1398Func<BoundPattern, BoundPattern>? makeListPatternWithSlice = null;
Binder\DecisionDagBuilder.cs (8)
3381public abstract string Dump(Func<BoundDagTest, string> dump); 3389public override string Dump(Func<BoundDagTest, string> dump) => "TRUE"; 3413public override string Dump(Func<BoundDagTest, string> dump) => "FALSE"; 3509public override string Dump(Func<BoundDagTest, string> dump) => dump(this.Test); 4178public override string Dump(Func<BoundDagTest, string> dump) => $"VALUES({Values})"; 4220public override string Dump(Func<BoundDagTest, string> dump) => $"Not ({Negated.Dump(dump)})"; 4870public override string Dump(Func<BoundDagTest, string> dump) 5036public override string Dump(Func<BoundDagTest, string> dump)
Binder\Semantics\Conversions\UserDefinedExplicitConversions.cs (2)
413System.Func<UserDefinedConversionAnalysis, bool> isValid = conv => IsEncompassedBy(sourceExpression, source, conv.FromType, ref inLambdaUseSiteInfo); 467System.Func<UserDefinedConversionAnalysis, bool> isValid = conv => IsEncompassedBy(conv.ToType, target, ref inLambdaUseSiteInfo);
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (9)
436private static int? MostSpecificConversionOperator(Func<UserDefinedConversionAnalysis, bool> constraint, ImmutableArray<UserDefinedConversionAnalysis> u) 547private static BestIndex UniqueIndex<T>(ImmutableArray<T> items, Func<T, bool> predicate) 693Func<T, TypeSymbol> extract, 701Func<T, bool> valid, 702Func<T, TypeSymbol> extract, 755Func<T, TypeSymbol> extract, 763Func<T, bool> valid, 764Func<T, TypeSymbol> extract, 806private static int? UniqueBestValidIndex<T>(ImmutableArray<T> items, Func<T, bool> valid, Func<T, T, BetterResult> better)
Compilation\CSharpCompilation.cs (10)
3135private static void AppendLoadDirectiveDiagnostics(DiagnosticBag builder, SyntaxAndDeclarationManager syntaxAndDeclarations, SyntaxTree syntaxTree, Func<IEnumerable<Diagnostic>, IEnumerable<Diagnostic>>? locationFilterOpt = null) 3964Func<ISymbol, bool> isAddedSymbol, 4792public override bool ContainsSymbolsWithName(Func<string, bool> predicate, SymbolFilter filter = SymbolFilter.TypeAndMember, CancellationToken cancellationToken = default) 4810public override IEnumerable<ISymbol> GetSymbolsWithName(Func<string, bool> predicate, SymbolFilter filter = SymbolFilter.TypeAndMember, CancellationToken cancellationToken = default) 4828/// This will be faster than <see cref="ContainsSymbolsWithName(Func{string, bool}, SymbolFilter, CancellationToken)"/> 4848/// faster than <see cref="GetSymbolsWithName(Func{string, bool}, SymbolFilter, 4967Func<SyntaxNode, SyntaxKind> getKind = node => node.Kind(); 4968Func<SyntaxTrivia, bool> isComment = trivia => trivia.Kind() == SyntaxKind.SingleLineCommentTrivia || trivia.Kind() == SyntaxKind.MultiLineCommentTrivia; 5237private readonly Func<string, bool> _predicate; 5240CSharpCompilation compilation, SymbolFilter filter, Func<string, bool> predicate, CancellationToken cancellationToken)
Compilation\CSharpSemanticModel.cs (1)
5319internal abstract override Func<SyntaxNode, bool> GetSyntaxNodesToAnalyzeFilter(SyntaxNode declaredNode, ISymbol declaredSymbol);
Compilation\MemberSemanticModel.cs (1)
2412internal sealed override Func<SyntaxNode, bool> GetSyntaxNodesToAnalyzeFilter(SyntaxNode declaredNode, ISymbol declaredSymbol)
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
515internal sealed override Func<SyntaxNode, bool> GetSyntaxNodesToAnalyzeFilter(SyntaxNode declaredNode, ISymbol declaredSymbol)
Compilation\SyntaxTreeSemanticModel.cs (5)
38private Func<CSharpSyntaxNode, MemberSemanticModel> _createMemberModelFunction; 42private static readonly Func<CSharpSyntaxNode, bool> s_isMemberDeclarationFunction = IsMemberDeclaration; 1056var createMemberModelFunction = _createMemberModelFunction ?? 1062internal MemberSemanticModel GetOrAddModel(CSharpSyntaxNode node, Func<CSharpSyntaxNode, MemberSemanticModel> createMemberModelFunction) 2471internal override Func<SyntaxNode, bool> GetSyntaxNodesToAnalyzeFilter(SyntaxNode declaredNode, ISymbol declaredSymbol)
CSharpExtensions.cs (3)
372internal static IList<DirectiveTriviaSyntax> GetDirectives(this SyntaxNode node, Func<DirectiveTriviaSyntax, bool>? filter = null) 380public static DirectiveTriviaSyntax? GetFirstDirective(this SyntaxNode node, Func<DirectiveTriviaSyntax, bool>? predicate = null) 388public static DirectiveTriviaSyntax? GetLastDirective(this SyntaxNode node, Func<DirectiveTriviaSyntax, bool>? predicate = null)
Declarations\DeclarationTable.cs (3)
261Func<string, bool> predicate, 283Func<string, bool> predicate, 285Func<SingleTypeDeclaration, bool> typePredicate,
Emitter\EditAndContinue\CSharpSymbolChanges.cs (1)
14public CSharpSymbolChanges(DefinitionMap definitionMap, IEnumerable<SemanticEdit> edits, Func<ISymbol, bool> isAddedSymbol)
Emitter\EditAndContinue\EmitHelpers.cs (1)
26Func<ISymbol, bool> isAddedSymbol,
Errors\MessageID.cs (2)
426Func<TData, Location> getLocation, 441Func<TData, Location> getLocation,
FlowAnalysis\NullableWalker.cs (11)
267private PooledDictionary<BoundExpression, Func<TypeWithAnnotations, TypeWithState>>? _targetTypedAnalysisCompletionOpt; 274private PooledDictionary<BoundExpression, Func<TypeWithAnnotations, TypeWithState>> TargetTypedAnalysisCompletion 275=> _targetTypedAnalysisCompletionOpt ??= PooledDictionary<BoundExpression, Func<TypeWithAnnotations, TypeWithState>>.GetInstance(); 4163var completion = VisitOptionalImplicitConversion(elementExpr, targetElementType, 4724InitializerCompletionAfterUpdatedSymbol? visitMemberAssignment(BoundAssignmentOperator node, int containingSlot, Symbol symbol, bool delayCompletionForType, Func<TypeWithAnnotations, TypeWithState>? conversionCompletion = null) 4757InitializerCompletionAfterUpdatedSymbol? visitMemberAssignmentAsContinuation(BoundAssignmentOperator node, Func<TypeWithAnnotations, TypeWithState> conversionCompletion) 7904if (IsTargetTypedExpression(argumentNoConversion) && _targetTypedAnalysisCompletionOpt?.TryGetValue(argumentNoConversion, out var completion) is true) 9298private (TypeWithState resultType, Func<TypeWithAnnotations, TypeWithState>? completion) VisitOptionalImplicitConversion( 9312(TypeWithState resultType, Func<TypeWithAnnotations, TypeWithState>? completion) visitConversion( 9349Func<TypeWithAnnotations, TypeWithState> visitConversionAsContinuation(BoundExpression expr, bool useLegacyWarnings, bool trackMembers, AssignmentKind assignmentKind, BoundExpression operand, Conversion conversion, TypeWithState operandType) 9838if (TargetTypedAnalysisCompletion.TryGetValue(conversionOperand, out Func<TypeWithAnnotations, TypeWithState>? completion))
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
1492Func<BoundStatement, BoundStatement> rewriteBody)
Lowering\LocalRewriter\LocalRewriter.cs (1)
420static bool hasReturnTypeOrParameter(MethodSymbol localFunction, Func<TypeWithAnnotations, bool> predicate) =>
Parser\DocumentationCommentParser.cs (2)
374Func<DocumentationCommentParser, bool> isNotExpectedFunction, 375Func<DocumentationCommentParser, bool> abortFunction,
Parser\LanguageParser.cs (17)
207internal TNode ParseWithStackGuard<TNode>(Func<LanguageParser, TNode> parseFunc, Func<LanguageParser, TNode> createEmptyNodeFunc) where TNode : CSharpSyntaxNode 4472Func<LanguageParser, bool> isNotExpectedFunction, 4493Func<LanguageParser, bool> isNotExpectedFunction, 4494Func<LanguageParser, bool> abortFunction, 4514Func<LanguageParser, bool> isNotExpectedFunction, 4539Func<LanguageParser, bool> isNotExpectedFunction, 4540Func<LanguageParser, bool> abortFunction, 4562Func<LanguageParser, bool> isNotExpectedFunction, 4589Func<LanguageParser, bool> isNotExpectedFunction, 4590Func<LanguageParser, bool> abortFunction, 4822Func<LanguageParser, ParameterSyntax> parseElement = forExtensionOrUnion 14442Func<LanguageParser, bool> isPossibleElement, 14443Func<LanguageParser, TNode> parseElement, 14464Func<LanguageParser, bool> isPossibleElement, 14465Func<LanguageParser, TNode> parseElement, 14466Func<TNode, bool>? immediatelyAbort,
Parser\LexerCache.cs (1)
234Func<TArg, SyntaxToken> createTokenFunction,
Symbols\AnonymousTypes\AnonymousTypeDescriptor.cs (1)
40internal static string ComputeKey<T>(ImmutableArray<T> fields, Func<T, string> getName)
Symbols\ArrayTypeSymbol.cs (1)
407internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\DynamicTypeSymbol.cs (1)
227internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
400public FunctionPointerMethodSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\FunctionPointers\FunctionPointerTypeSymbol.cs (1)
173internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\FunctionTypeSymbol.cs (1)
179internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\NamedTypeSymbol.cs (4)
1012protected static Func<Symbol, bool> IsInstanceFieldOrEvent = symbol => 1272internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform) 1477internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsNullFunction = type => !type.HasType; 1479internal static readonly Func<TypeWithAnnotations, bool> TypeWithAnnotationsIsErrorType = type => type.HasType && type.Type.IsErrorType();
Symbols\NativeIntegerTypeSymbol.cs (1)
257internal static bool EqualsHelper<TSymbol>(TSymbol symbol, Symbol? other, TypeCompareKind comparison, Func<TSymbol, Symbol> getUnderlyingSymbol)
Symbols\ObsoleteAttributeHelpers.cs (2)
59private static ThreeState GetObsoleteContextState(Symbol symbol, bool forceComplete, Func<Symbol, ThreeState> getStateFromSymbol) 130static ObsoleteDiagnosticKind getDiagnosticKind(Symbol containingMember, bool forceComplete, Func<Symbol, ThreeState> getStateFromSymbol)
Symbols\PointerTypeSymbol.cs (1)
269internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\Retargeting\RetargetingSymbolTranslator.cs (7)
34private readonly Func<Symbol, RetargetingMethodSymbol> _createRetargetingMethod; 35private readonly Func<Symbol, RetargetingNamespaceSymbol> _createRetargetingNamespace; 36private readonly Func<Symbol, RetargetingTypeParameterSymbol> _createRetargetingTypeParameter; 37private readonly Func<Symbol, RetargetingNamedTypeSymbol> _createRetargetingNamedType; 38private readonly Func<Symbol, FieldSymbol> _createRetargetingField; 39private readonly Func<Symbol, RetargetingPropertySymbol> _createRetargetingProperty; 40private readonly Func<Symbol, RetargetingEventSymbol> _createRetargetingEvent;
Symbols\Source\SourceAssemblySymbol.cs (1)
217private string? GetWellKnownAttributeDataStringField(Func<CommonAssemblyWellKnownAttributeData, string> fieldGetter, string? missingValue = null, QuickAttributes? attributeMatchesOpt = null)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1570Func<TArg, Location> overridingMemberLocation,
Symbols\Source\SourceMemberContainerSymbol.cs (2)
2124bool hasBaseTypeOrInterface(Func<NamedTypeSymbol, bool> predicate) 3276private static bool All<T>(SyntaxList<T> list, Func<T, bool> predicate) where T : CSharpSyntaxNode
Symbols\Source\SourceNamespaceSymbol.cs (1)
121private static readonly Func<SingleNamespaceDeclaration, SyntaxReference> s_declaringSyntaxReferencesSelector = d =>
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
268Func<MethodSymbol, ImmutableArray<ParameterSymbol>> getParameters) :
Symbols\Synthesized\SynthesizedEmbeddedMemorySafetyRulesAttributeSymbol.cs (1)
92private ArrayBuilder<T> GetMemberBuilder<T>(Func<Symbol, T> selector)
Symbols\Synthesized\SynthesizedEmbeddedNullableAttributeSymbol.cs (1)
118Func<MethodSymbol, ImmutableArray<ParameterSymbol>> getParameters,
Symbols\TypeMap.cs (1)
23public static readonly Func<TypeWithAnnotations, TypeSymbol> AsTypeSymbol = t => t.Type;
Symbols\TypeParameterSymbol.cs (1)
692internal override TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform)
Symbols\TypeSymbol.cs (2)
637internal abstract TypeSymbol SetNullabilityForReferenceTypes(Func<TypeWithAnnotations, TypeWithAnnotations> transform); 644private static readonly Func<TypeWithAnnotations, TypeWithAnnotations> s_setUnknownNullability =
Syntax\CompilationUnitSyntax.cs (2)
22internal IList<ReferenceDirectiveTriviaSyntax> GetReferenceDirectives(Func<ReferenceDirectiveTriviaSyntax, bool>? filter) 53private bool HasFirstTokenDirective(Func<SyntaxNode, bool> predicate)
Syntax\CSharpSyntaxNode.cs (6)
220internal IList<DirectiveTriviaSyntax> GetDirectives(Func<DirectiveTriviaSyntax, bool>? filter = null) 228public DirectiveTriviaSyntax? GetFirstDirective(Func<DirectiveTriviaSyntax, bool>? predicate = null) 268public DirectiveTriviaSyntax? GetLastDirective(Func<DirectiveTriviaSyntax, bool>? predicate = null) 332internal SyntaxToken GetFirstToken(Func<SyntaxToken, bool>? predicate, Func<SyntaxTrivia, bool>? stepInto = null) 424public new SyntaxTrivia FindTrivia(int position, Func<SyntaxTrivia, bool> stepInto)
Syntax\DirectiveTriviaSyntax.cs (3)
69public DirectiveTriviaSyntax? GetNextDirective(Func<DirectiveTriviaSyntax, bool>? predicate = null) 100public DirectiveTriviaSyntax? GetPreviousDirective(Func<DirectiveTriviaSyntax, bool>? predicate = null) 359private static readonly Func<SyntaxToken, bool> s_hasDirectivesFunction = t => t.ContainsDirectives;
Syntax\SyntaxEquivalence.cs (5)
19internal static bool AreEquivalent(SyntaxTree? before, SyntaxTree? after, Func<SyntaxKind, bool>? ignoreChildNode, bool topLevel) 34public static bool AreEquivalent(SyntaxNode? before, SyntaxNode? after, Func<SyntaxKind, bool>? ignoreChildNode, bool topLevel) 56private static bool AreTokensEquivalent(GreenNode? before, GreenNode? after, Func<SyntaxKind, bool>? ignoreChildNode) 105private static bool AreEquivalentRecursive(GreenNode? before, GreenNode? after, Func<SyntaxKind, bool>? ignoreChildNode, bool topLevel) 254private static bool AreNullableDirectivesEquivalent(GreenNode before, GreenNode after, Func<SyntaxKind, bool>? ignoreChildNode)
Syntax\SyntaxFactory.cs (3)
2016public static bool AreEquivalent(SyntaxNode? oldNode, SyntaxNode? newNode, Func<SyntaxKind, bool>? ignoreChildNode = null) 2066public static bool AreEquivalent<TNode>(SyntaxList<TNode> oldList, SyntaxList<TNode> newList, Func<SyntaxKind, bool>? ignoreChildNode = null) 2097public static bool AreEquivalent<TNode>(SeparatedSyntaxList<TNode> oldList, SeparatedSyntaxList<TNode> newList, Func<SyntaxKind, bool>? ignoreChildNode = null)
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (1)
166Func<SyntaxNode, ImmutableArray<Diagnostic>> computeDiagnostics)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
754Func<TArrayCreationExpressionSyntax, TypeSyntax> getType, 755Func<TArrayCreationExpressionSyntax, InitializerExpressionSyntax?> getInitializer,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
24Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
669public static IEnumerable<SyntaxNode> GetAncestorsOrThis(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (4)
87private static readonly Func<SyntaxKind, bool> s_isDot = k => k is SyntaxKind.DotToken; 88private static readonly Func<SyntaxKind, bool> s_isDotOrArrow = k => k is SyntaxKind.DotToken or SyntaxKind.MinusGreaterThanToken; 89private static readonly Func<SyntaxKind, bool> s_isDotOrArrowOrColonColon = 106this SyntaxTree syntaxTree, int position, Func<SyntaxKind, bool> predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (2)
14Func<string, int> map, 46internal static string ToEditorConfigFlagList(int flags, Func<int, string> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Helpers\RemoveUnnecessaryImports\CSharpUnnecessaryImportsProvider.cs (1)
25Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
926Func<ExpressionSyntax, TConditionalOrSwitchExpression?> getConditionalOrSwitchExpression, 927Func<TConditionalOrSwitchExpression, ImmutableArray<ExpressionSyntax>> getArmExpressions,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (18)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
421Func<IOperation, T?> captureAssignedSymbol) 1133Func<T, bool> firstCondition, Func<T, bool> secondCondition)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
105Func<string, bool> isUnique,
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryNullableWarningSuppressionsCodeFixProvider.cs (1)
84Func<PostfixUnaryExpressionSyntax, SyntaxAnnotation?>? getAnnotation)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (5)
40Func<TParentExpression, InitializerExpressionSyntax?> getInitializer, 866ExpressionSyntax expression, Func<ExpressionSyntax, ExpressionSyntax>? indent) 873ExpressionSyntax expression, Func<ExpressionSyntax, ExpressionSyntax>? indent) 889AssignmentExpressionSyntax assignment, Func<ExpressionSyntax, ExpressionSyntax> indent) 895InvocationExpressionSyntax invocation, Func<ExpressionSyntax, ExpressionSyntax> indent)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
342Func<TListSyntax, IEnumerable<SyntaxNode>> getElements)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
85public static int IndexOf<T>(IReadOnlyList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
174Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 175Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
740private static TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, Func<SyntaxTokenList, SyntaxTokenList> computeNewModifiersList)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
253Func<T, bool> isNegative, Func<T, T> negate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
39Func<SyntaxNode, bool>? predicate,
Microsoft.CodeAnalysis.CSharp.Features (100)
ChangeSignature\CSharpChangeSignatureService.cs (1)
686Func<AddedParameter, T> createNewParameterMethod) where T : SyntaxNode
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
26private static readonly Func<DirectiveTriviaSyntax, bool> s_isNullableDirectiveTriviaPredicate =
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (5)
61var replacementFunc = GetReplacementFunc(node, model); 72private static Func<SyntaxNode, SyntaxNode>? GetReplacementFunc(SyntaxNode? node, SemanticModel model) 94private static Func<SyntaxNode, SyntaxNode>? CombineLogicalAndOperands(BinaryExpressionSyntax logicalAnd, SemanticModel model) 162private static Func<SyntaxNode, SyntaxNode>? CombineWhenClauseCondition(PatternSyntax switchPattern, ExpressionSyntax condition, SemanticModel model) 613var replacementFunc = GetReplacementFunc(currentNode, semanticModel);
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (12)
289Func<TSyntaxNode, SyntaxNode?> typeSyntaxGetter, 290Func<TSyntaxNode, SyntaxTokenList?> modifierGetter, 291Func<DeclarationModifiers, ImmutableArray<SymbolKindOrTypeKind>> possibleDeclarationComputer, 323Func<TSyntaxNode, SyntaxNode?> typeSyntaxGetter, 324Func<TSyntaxNode, SyntaxTokenList> modifierGetter, 325Func<DeclarationModifiers, ImmutableArray<SymbolKindOrTypeKind>> possibleDeclarationComputer, 334Func<TSyntaxNode, SyntaxNode?> typeSyntaxGetter, 335Func<TSyntaxNode, SyntaxTokenList> modifierGetter, 336Func<DeclarationModifiers, ImmutableArray<SymbolKindOrTypeKind>> possibleDeclarationComputer, 359Func<DeclarationModifiers, ImmutableArray<SymbolKindOrTypeKind>> possibleDeclarationComputer, 424var possibleDeclarationComputer = token.IsKind(SyntaxKind.CommaToken) 425? (Func<DeclarationModifiers, ImmutableArray<SymbolKindOrTypeKind>>)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
376Func<ITypeSymbol, bool> typeCheckMethod, 411Func<ITypeSymbol, bool> typeCheckMethod, 789Func<ExpressionSyntax, StatementSyntax> leafExpressionCreationMethod,
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
422Func<TListSyntax, IEnumerable<SyntaxNode>> getElements)
ConvertToRawString\ConvertToRawStringHelpers.cs (1)
46public static bool AllEscapesAre(VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
EditAndContinue\BreakpointSpans.cs (8)
475internal static IEnumerable<SyntaxToken> GetActiveTokensForImplicitConstructorInitializer(ConstructorDeclarationSyntax constructor, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 481internal static IEnumerable<SyntaxToken> GetActiveTokensForExplicitConstructorInitializer(ConstructorInitializerSyntax constructorInitializer, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 490internal static IEnumerable<SyntaxToken> GetActiveTokensForImplicitPrimaryConstructorInitializer(TypeDeclarationSyntax typeDeclaration, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 509internal static IEnumerable<SyntaxToken> GetActiveTokensForExplicitPrimaryConstructorInitializer(PrimaryConstructorBaseTypeSyntax baseTypeSyntax, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 517internal static IEnumerable<SyntaxToken> GetActiveTokensForCopyConstructor(RecordDeclarationSyntax recordDeclaration, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 531internal static IEnumerable<SyntaxToken> GetActiveTokensForRecordParameter(ParameterSyntax parameter, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 548internal static IEnumerable<SyntaxToken> GetActiveTokensForAutoPropertyAccessor(AccessorDeclarationSyntax accessor, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 874VariableDeclaratorSyntax variableDeclarator, SyntaxTokenList modifiers, SyntaxToken semicolon, Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
986protected override SyntaxNode? GetSymbolDeclarationSyntax(ISymbol symbol, Func<ImmutableArray<SyntaxReference>, SyntaxReference?> selector, CancellationToken cancellationToken) 1450internal override Func<SyntaxNode, bool> IsLambda 1453internal override Func<SyntaxNode, bool> IsNotLambda 1456internal override Func<SyntaxNode, IEnumerable<SyntaxToken>> DescendantTokensIgnoringLambdaBodies
EditAndContinue\DeclarationBody\CopyConstructorDeclarationBody.cs (2)
50public override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 53public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\ExplicitAutoPropertyAccessorDeclarationBody.cs (2)
32public override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 35public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\FieldWithInitializerDeclarationBody.cs (2)
50public override IEnumerable<SyntaxToken> GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 56public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithExplicitInitializerDeclarationBody.cs (2)
43public override IEnumerable<SyntaxToken> GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 46public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithImplicitInitializerDeclarationBody.cs (2)
37public override IEnumerable<SyntaxToken> GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 40public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\PrimaryConstructorWithExplicitInitializerDeclarationBody.cs (2)
36public override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 39public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\PrimaryConstructorWithImplicitInitializerDeclarationBody.cs (2)
36public override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 39public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\PropertyOrIndexerAccessorWithExplicitBodyDeclarationBody.cs (2)
42public sealed override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 45public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\PropertyOrIndexerWithExplicitBodyDeclarationBody.cs (2)
37public sealed override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 40public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\RecordParameterDeclarationBody.cs (2)
29public override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 32public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DeclarationBody\TopLevelCodeDeclarationBody.cs (2)
40public override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 43public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\SyntaxComparer.cs (1)
713Func<SyntaxKind, bool>? ignoreChildFunction;
ExtractMethod\Extensions.cs (1)
120private static bool PartOfConstantInitializerExpression<T>(this SyntaxNode node, Func<T, SyntaxTokenList> modifiersGetter) where T : SyntaxNode
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
139static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Solution>> createSolution)
Organizing\CSharpOrganizingService.Rewriter.cs (1)
19private readonly Func<SyntaxNode, IEnumerable<ISyntaxOrganizer>> _nodeToOrganizersGetter = treeOrganizer.GetNodeToOrganizers(organizers.ToList());
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (1)
36private static readonly ImmutableArray<Func<SyntaxToken, IComparable>> s_comparers =
SignatureHelp\SignatureHelpUtilities.cs (16)
19private static readonly Func<BaseArgumentListSyntax, SyntaxToken> s_getBaseArgumentListOpenToken = list => list.GetOpenToken(); 20private static readonly Func<TypeArgumentListSyntax, SyntaxToken> s_getTypeArgumentListOpenToken = list => list.LessThanToken; 21private static readonly Func<InitializerExpressionSyntax, SyntaxToken> s_getInitializerExpressionOpenToken = e => e.OpenBraceToken; 22private static readonly Func<AttributeArgumentListSyntax, SyntaxToken> s_getAttributeArgumentListOpenToken = list => list.OpenParenToken; 24private static readonly Func<BaseArgumentListSyntax, SyntaxToken> s_getBaseArgumentListCloseToken = list => list.GetCloseToken(); 25private static readonly Func<TypeArgumentListSyntax, SyntaxToken> s_getTypeArgumentListCloseToken = list => list.GreaterThanToken; 26private static readonly Func<InitializerExpressionSyntax, SyntaxToken> s_getInitializerExpressionCloseToken = e => e.CloseBraceToken; 27private static readonly Func<AttributeArgumentListSyntax, SyntaxToken> s_getAttributeArgumentListCloseToken = list => list.CloseParenToken; 29private static readonly Func<BaseArgumentListSyntax, SyntaxNodeOrTokenList> s_getBaseArgumentListArgumentsWithSeparators = 31private static readonly Func<TypeArgumentListSyntax, SyntaxNodeOrTokenList> s_getTypeArgumentListArgumentsWithSeparators = 33private static readonly Func<InitializerExpressionSyntax, SyntaxNodeOrTokenList> s_getInitializerExpressionArgumentsWithSeparators = 35private static readonly Func<AttributeArgumentListSyntax, SyntaxNodeOrTokenList> s_getAttributeArgumentListArgumentsWithSeparators = 38private static readonly Func<BaseArgumentListSyntax, IEnumerable<string?>> s_getBaseArgumentListNames = 40private static readonly Func<TypeArgumentListSyntax, IEnumerable<string?>> s_getTypeArgumentListNames = 42private static readonly Func<InitializerExpressionSyntax, IEnumerable<string?>> s_getInitializerExpressionNames = 44private static readonly Func<AttributeArgumentListSyntax, IEnumerable<string?>> s_getAttributeArgumentListNames =
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (4)
27private static readonly Func<TupleExpressionSyntax, SyntaxToken> s_getOpenToken = e => e.OpenParenToken; 28private static readonly Func<TupleExpressionSyntax, SyntaxToken> s_getCloseToken = e => e.CloseParenToken; 29private static readonly Func<TupleExpressionSyntax, SyntaxNodeOrTokenList> s_getArgumentsWithSeparators = e => e.Arguments.GetWithSeparators(); 30private static readonly Func<TupleExpressionSyntax, IEnumerable<string>> s_getArgumentNames = e => e.Arguments.Select(a => a.NameColon?.Name.Identifier.ValueText ?? string.Empty);
Snippets\CSharpSnippetHelpers.cs (2)
18public static int GetTargetCaretPositionInBlock<TTargetNode>(TTargetNode caretTarget, Func<TTargetNode, BlockSyntax> getBlock, SourceText sourceText) 46Document document, TTargetNode targetNode, Func<TTargetNode, BlockSyntax> getBlock, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\UnnecessaryNullableWarningSuppressionsUtilities.cs (1)
166Func<SyntaxNode, ImmutableArray<Diagnostic>> computeDiagnostics)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
754Func<TArrayCreationExpressionSyntax, TypeSyntax> getType, 755Func<TArrayCreationExpressionSyntax, InitializerExpressionSyntax?> getInitializer,
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
421Func<IOperation, T?> captureAssignedSymbol) 1133Func<T, bool> firstCondition, Func<T, bool> secondCondition)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateParameterizedMemberService.cs (1)
105Func<string, bool> isUnique,
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryNullableWarningSuppressionsCodeFixProvider.cs (1)
84Func<PostfixUnaryExpressionSyntax, SyntaxAnnotation?>? getAnnotation)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (5)
40Func<TParentExpression, InitializerExpressionSyntax?> getInitializer, 866ExpressionSyntax expression, Func<ExpressionSyntax, ExpressionSyntax>? indent) 873ExpressionSyntax expression, Func<ExpressionSyntax, ExpressionSyntax>? indent) 889AssignmentExpressionSyntax assignment, Func<ExpressionSyntax, ExpressionSyntax> indent) 895InvocationExpressionSyntax invocation, Func<ExpressionSyntax, ExpressionSyntax> indent)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
342Func<TListSyntax, IEnumerable<SyntaxNode>> getElements)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSimpleUsingStatement\UseSimpleUsingStatementCodeFixProvider.cs (1)
85public static int IndexOf<T>(IReadOnlyList<T> list, Func<T, bool> predicate)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.CodeQuality.Analyzers\Maintainability\CSharpUseCrossPlatformIntrinsicsFixer.cs (1)
56protected override SyntaxNode ReplaceWithUnaryOperator(SyntaxNode currentNode, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode?> unaryOpFunc)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler.CSharp\Lightup\AwaitExpressionInfoWrapper.cs (1)
11private static Func<AwaitExpressionInfo, IMethodSymbol?>? s_RuntimeAwaitMethodAccessor;
Microsoft.CodeAnalysis.CSharp.Workspaces (28)
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (1)
24private static readonly Func<ITypeSymbol, bool> s_shouldInclude = t => t.TypeKind != TypeKind.Error && t.GetArity() > 0;
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2173private SyntaxNode Isolate(SyntaxNode declaration, Func<SyntaxNode, SyntaxNode> editor)
ExternalAccess\Pythia\Api\PythiaSyntaxExtensions.cs (1)
22public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode> childGetter) where TParent : SyntaxNode
Simplification\CSharpSimplificationService.cs (3)
52public override SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken) 77public override SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken) 177protected override ImmutableArray<NodeOrTokenToReduce> GetNodesAndTokensToReduce(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans)
Simplification\CSharpSimplificationService.Expander.cs (2)
47private readonly Func<SyntaxNode, bool> _expandInsideNode; 54Func<SyntaxNode, bool> expandInsideNode,
Simplification\CSharpSimplificationService.NodesAndTokensToReduceComputer.cs (3)
21private readonly Func<SyntaxNodeOrToken, bool> _isNodeOrTokenOutsideSimplifySpans; 29public static ImmutableArray<NodeOrTokenToReduce> Compute(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans) 36private NodesAndTokensToReduceComputer(Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
24Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
669public static IEnumerable<SyntaxNode> GetAncestorsOrThis(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (4)
87private static readonly Func<SyntaxKind, bool> s_isDot = k => k is SyntaxKind.DotToken; 88private static readonly Func<SyntaxKind, bool> s_isDotOrArrow = k => k is SyntaxKind.DotToken or SyntaxKind.MinusGreaterThanToken; 89private static readonly Func<SyntaxKind, bool> s_isDotOrArrowOrColonColon = 106this SyntaxTree syntaxTree, int position, Func<SyntaxKind, bool> predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (2)
14Func<string, int> map, 46internal static string ToEditorConfigFlagList(int flags, Func<int, string> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Helpers\RemoveUnnecessaryImports\CSharpUnnecessaryImportsProvider.cs (1)
25Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
926Func<ExpressionSyntax, TConditionalOrSwitchExpression?> getConditionalOrSwitchExpression, 927Func<TConditionalOrSwitchExpression, ImmutableArray<ExpressionSyntax>> getArmExpressions,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
174Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 175Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
740private static TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, Func<SyntaxTokenList, SyntaxTokenList> computeNewModifiersList)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
253Func<T, bool> isNegative, Func<T, T> negate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
39Func<SyntaxNode, bool>? predicate,
Microsoft.CodeAnalysis.Extensions.Package (111)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 47private readonly Func<T, int> _getHashCode = getHashCode;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Api\HotReloadMSBuildWorkspace.cs (1)
32public HotReloadMSBuildWorkspace(ILogger logger, Func<string, (ImmutableArray<MSB.Execution.ProjectInstance> instances, MSB.Evaluation.Project? project)> getBuildProjects)
Api\HotReloadMSBuildWorkspace.ProjectFileInfoProvider.cs (1)
18Func<string, (ImmutableArray<MSB.Execution.ProjectInstance> instances, MSB.Evaluation.Project? project)> getBuildProjects,
Microsoft.CodeAnalysis.Features (144)
AddImport\SymbolReferenceFinder.cs (2)
555SearchScope searchScope, string name, ITypeSymbol? type, Func<IMethodSymbol, bool>? predicate, CancellationToken cancellationToken) 575IMethodSymbol? method, ITypeSymbol? receiver, Func<IMethodSymbol, bool>? predicate)
ChangeSignature\AbstractChangeSignatureService.cs (1)
683Func<AddedParameter, T> createNewParameterMethod) where T : SyntaxNode
CodeFixes\Service\CodeFixService.cs (2)
777Func<Diagnostic, bool> hasFix, 778Func<ImmutableArray<Diagnostic>, Task<ImmutableArray<CodeFix>>> getFixes,
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (1)
340private static readonly Func<DocumentId, ConcurrentBag<(CodeAction, Document)>> s_getValue =
CodeLens\CodeLensReferencesService.cs (2)
44Func<CodeLensFindReferencesProgress, Task<T>> onResults, Func<CodeLensFindReferencesProgress, Task<T>> onCapped,
Common\AbstractProjectExtensionProvider.cs (4)
80public static ImmutableArray<TExtension> GetExtensions(TextDocument document, Func<TExportAttribute, ExtensionInfo>? getExtensionInfoForFiltering) 88public static ImmutableArray<TExtension> FilterExtensions(TextDocument document, ImmutableArray<TExtension> extensions, Func<TExportAttribute, ExtensionInfo> getExtensionInfoForFiltering) 92static bool ShouldIncludeExtension(TExtension extension, (TextDocument, Func<TExportAttribute, ExtensionInfo>) args) 114static ExtensionInfo? GetOrCreateExtensionInfo(TExtension extension, Func<TExportAttribute, ExtensionInfo> getExtensionInfoForFiltering)
Common\TaggedText.cs (1)
91Func<ISymbol?, string?>? getNavigationHint = null,
Completion\CommonCompletionUtilities.cs (6)
28Func<char, bool> isWordStartCharacter, Func<char, bool> isWordCharacter) 34Func<char, bool> isWordStartCharacter, Func<char, bool> isWordCharacter, bool alwaysExtendEndSpan = false) 60public static bool IsStartingNewWord(SourceText text, int characterPosition, Func<char, bool> isWordStartCharacter, Func<char, bool> isWordCharacter)
Completion\CompletionService.ProviderManager.cs (1)
160using var _ = PooledDelegates.GetPooledFunction(static (p, n) => p.Name == n, item.ProviderName, out Func<CompletionProvider, bool> isNameMatchingProviderPredicate);
Completion\Providers\AbstractSymbolCompletionProvider.cs (2)
150Func<SymbolAndSelectionInfo, TSyntaxContext> contextLookup, 260Func<SymbolAndSelectionInfo, TSyntaxContext> contextLookup,
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer_Constraints.cs (3)
39Func<ITypeSymbol, IEnumerable<ITypeSymbol>> getInheritanceTypes) 69Func<ITypeSymbol, IEnumerable<ITypeSymbol>> getInheritanceTypes) 105ITypeSymbol type, TypeKind typeKind, Func<ITypeSymbol, IEnumerable<ITypeSymbol>> getInheritanceTypes)
Completion\Providers\RecommendedKeyword.cs (2)
15Func<CancellationToken, ImmutableArray<SymbolDisplayPart>> descriptionFactory, 22public Func<CancellationToken, ImmutableArray<SymbolDisplayPart>> DescriptionFactory { get; } = descriptionFactory;
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (1)
123(AnalyzerOptions sharedOptions, Func<DiagnosticAnalyzer, AnalyzerConfigOptionsProvider>? analyzerSpecificOptionsFactory) GetOptions()
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (15)
433internal abstract Func<SyntaxNode, bool> IsLambda { get; } 434internal abstract Func<SyntaxNode, bool> IsNotLambda { get; } 435internal abstract Func<SyntaxNode, IEnumerable<SyntaxToken>> DescendantTokensIgnoringLambdaBodies { get; } 456var isLambda = IsLambda; 1278out var runtimeRudeEdits, 1305var matchingNodes = 2012Func<SyntaxNode, bool> nodeSelector, 2013Func<TSyntaxNode, OneOrMany<SyntaxNode>> getTypedNodes, 2081Func<TSyntaxNode, OneOrMany<SyntaxNode>> getTypedNodes, 2187private static List<SyntaxNode?>? GetAncestors(SyntaxNode? root, SyntaxNode node, Func<SyntaxNode, bool> nodeSelector) 5482private static Func<SyntaxNode, SyntaxNode?> CreateSyntaxMapForEquivalentNodes(MemberBody oldBody, MemberBody newBody) 5490private static Func<SyntaxNode, SyntaxNode?> CreateSyntaxMap(DeclarationBodyMap bodyMap) 5776private bool AnyMemberInitializerBody(INamedTypeSymbol type, Func<MemberBody, bool> predicate, bool isStatic, CancellationToken cancellationToken) 5844out Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdits, 6414protected abstract SyntaxNode? GetSymbolDeclarationSyntax(ISymbol symbol, Func<ImmutableArray<SyntaxReference>, SyntaxReference?> selector, CancellationToken cancellationToken);
EditAndContinue\AbstractSimpleMemberBody.cs (2)
31public sealed override IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens) 34public override IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens)
EditAndContinue\DebuggingSession.cs (2)
34private readonly Func<Project, CompilationOutputs> _compilationOutputsProvider; 134Func<Project, CompilationOutputs> compilationOutputsProvider,
EditAndContinue\DeclarationBody.cs (1)
40public IEnumerable<SyntaxNode> GetDescendantNodes(Func<SyntaxNode, bool> descendIntoChildren)
EditAndContinue\EditAndContinueService.cs (2)
56private Func<Project, CompilationOutputs> _compilationOutputsProvider = GetCompilationOutputs; 271public void SetOutputProvider(Func<Project, CompilationOutputs> value)
EditAndContinue\EditSession.cs (6)
939var mergedUpdateEditSyntaxMaps = new Dictionary<SymbolKey, (Func<SyntaxNode, SyntaxNode?>? matchingNodes, Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdits)>(symbolKeyComparer); 947Func<SyntaxNode, SyntaxNode?>? mergedMatchingNodes; 948Func<SyntaxNode, RuntimeRudeEdit?>? mergedRuntimeRudeEdits; 1416var isAddedSymbolPredicate = capabilities.HasFlag(EditAndContinueCapabilities.GenericAddMethodToExistingType) ? 1417static _ => false : (Func<ISymbol, bool>)projectChanges.AddedSymbols.Contains;
EditAndContinue\MemberBody.cs (2)
41public abstract IEnumerable<SyntaxToken>? GetActiveTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens); 49public abstract IEnumerable<SyntaxToken> GetUserCodeTokens(Func<SyntaxNode, IEnumerable<SyntaxToken>> getDescendantTokens);
EditAndContinue\RunningProjectOptions.cs (1)
28Func<TInfo, (string projectPath, string targetFramework, bool restartAutomatically)> translator)
EditAndContinue\SemanticEditInfo.cs (4)
20public readonly Func<SyntaxNode, SyntaxNode?>? MatchingNodes; 21public readonly Func<SyntaxNode, RuntimeRudeEdit?>? RuntimeRudeEdits; 25Func<SyntaxNode, SyntaxNode?>? matchingNodes = null, 26Func<SyntaxNode, RuntimeRudeEdit?>? runtimeRudeEdits = null)
EmbeddedLanguages\StackFrame\StackFrameLexer.cs (1)
175public bool ScanCurrentCharAsTokenIfMatch(Func<StackFrameKind, bool> isMatch, out StackFrameToken token)
EncapsulateField\EncapsulateFieldResult.cs (1)
12internal sealed class EncapsulateFieldResult(string name, Glyph glyph, Func<CancellationToken, Task<Solution>> getSolutionAsync)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
286private static void ClearQueueWorker<TKey, TValue>(SemaphoreSlim gate, Dictionary<TKey, TValue> map, Func<TValue, IDisposable> disposerSelector)
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (2)
38Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, 56Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound,
ExtractMethod\AbstractSyntaxTriviaService.cs (1)
123Func<SyntaxTrivia, bool> conditionToLeftAtCallSite)
ExtractMethod\ExtractMethodResult.cs (2)
30Func<CancellationToken, Task<(Document document, SyntaxToken? invocationNameToken)>>? getDocumentAsync) 45Func<CancellationToken, Task<(Document document, SyntaxToken? invocationNameToken)>> getDocumentAsync)
GenerateType\AbstractGenerateTypeService.cs (2)
220var canUse = state.TypeToGenerateInOpt == null 221? (Func<string, bool>)null
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
491private static bool IsAnyThrowInvocation(IOperation statement, IParameterSymbol? parameter, ReadOnlySpan<string> possibleTypeNames, Func<string, bool> methodNamePredicate)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
85private readonly Func<ISymbol?, string?> _getNavigationHint;
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
75Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound,
NavigateTo\AbstractNavigateToSearchService.cs (2)
37Solution solution, Document? activeDocument, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound) 69private static IEnumerable<T> Prioritize<T>(IEnumerable<T> items, Func<T, bool> isPriority)
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (1)
26Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound,
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (2)
30Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, 153Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound,
NavigateTo\INavigateToSearchService.cs (4)
22Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, 42Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, 69Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, 87Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound,
NavigateTo\NavigateToSearcher.cs (3)
350Func<INavigateToSearchService, ImmutableArray<Project>, Func<ImmutableArray<INavigateToSearchResult>, Task>, Func<Task>, Task> processProjectAsync, 533public Task SearchDocumentAsync(Document document, string searchPattern, IImmutableSet<string> kinds, Func<ImmutableArray<INavigateToSearchResult>, Task> onResultsFound, CancellationToken cancellationToken) 536public 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)
Navigation\IDefinitionLocationService.cs (1)
47Document document, int position, Func<CancellationToken, Task<IEnumerable<(Document document, TextSpan sourceSpan)>?>> getNavigableItems, CancellationToken cancellationToken)
Navigation\NavigableItemFactory.SymbolLocationNavigableItem.cs (1)
31/// <seealso cref="InterlockedOperations.Initialize{T, U}(ref StrongBox{T}, Func{U, T}, U)"/>
NavigationBar\AbstractNavigationBarItemService.cs (2)
44Solution solution, ISymbol symbol, SyntaxTree tree, Func<SyntaxReference, TextSpan> computeFullSpan) 51Func<SyntaxReference, TextSpan> computeFullSpan,
Organizing\AbstractOrganizingService.cs (1)
31protected Func<SyntaxNode, IEnumerable<ISyntaxOrganizer>> GetNodeToOrganizers(IEnumerable<ISyntaxOrganizer> organizers)
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (1)
268Func<SyntaxNode, SyntaxNode> wrapConvertedSyntax,
Shared\Extensions\DocumentExtensions.cs (1)
55Func<Document, Task<ImmutableArray<T>>> getItemsWorker)
Shared\Extensions\ISymbolExtensions_2.cs (1)
234public static Func<CancellationToken, IEnumerable<TaggedText>> GetDocumentationPartsFactory(
Shared\Extensions\ISymbolExtensions_Sorting.cs (1)
155Func<TSymbol, string[]> getParameterTypeNames)
SignatureHelp\AbstractSignatureHelpProvider.cs (4)
136Func<CancellationToken, IEnumerable<TaggedText>> documentationFactory, 153Func<CancellationToken, IEnumerable<TaggedText>>? documentationFactory, 170Func<CancellationToken, IEnumerable<TaggedText>>? documentationFactory, 176Func<ISymbol?, string?>? getNavigationHint = null)
SignatureHelp\AbstractSignatureHelpProvider.SymbolKeySignatureHelpItem.cs (1)
16Func<CancellationToken, IEnumerable<TaggedText>>? documentationFactory,
SignatureHelp\CommonSignatureHelpUtilities.cs (11)
26Func<TArgumentList, SyntaxToken> getOpenToken, 27Func<TArgumentList, SyntaxToken> getCloseToken, 28Func<TArgumentList, SyntaxNodeOrTokenList> getArgumentsWithSeparators, 29Func<TArgumentList, IEnumerable<string?>> getArgumentNames) 50Func<TArgumentList, SyntaxToken> getOpenToken, 51Func<TArgumentList, SyntaxToken> getCloseToken, 52Func<TArgumentList, SyntaxNodeOrTokenList> getArgumentsWithSeparators, 74Func<TArgumentList, SyntaxToken> getCloseToken) 83Func<TArgumentList, SyntaxToken> getCloseToken) 107Func<SyntaxToken, bool> isTriggerToken, 124Func<SyntaxToken, bool> isTriggerToken,
SignatureHelp\SignatureHelpItem.cs (4)
36public Func<CancellationToken, IEnumerable<TaggedText>> DocumentationFactory { get; } 38private static readonly Func<CancellationToken, IEnumerable<TaggedText>> s_emptyDocumentationFactory = _ => []; 42Func<CancellationToken, IEnumerable<TaggedText>>? documentationFactory, 66Func<CancellationToken, IEnumerable<SymbolDisplayPart>> documentationFactory,
SignatureHelp\SignatureHelpParameter.cs (7)
23Func<CancellationToken, IEnumerable<TaggedText>>? documentationFactory, 38public Func<CancellationToken, IEnumerable<TaggedText>> DocumentationFactory { get; } = documentationFactory ?? s_emptyDocumentationFactory; 68private static readonly Func<CancellationToken, IEnumerable<TaggedText>> s_emptyDocumentationFactory = _ => []; 91Func<CancellationToken, IEnumerable<TaggedText>>? documentationFactory, 106public Func<CancellationToken, IEnumerable<TaggedText>> DocumentationFactory { get; } = documentationFactory ?? s_emptyDocumentationFactory; 136private static readonly Func<CancellationToken, IEnumerable<TaggedText>> s_emptyDocumentationFactory = _ => []; 142Func<CancellationToken, IEnumerable<SymbolDisplayPart>>? documentationFactory,
SolutionExplorer\ISolutionExplorerSymbolTreeItemProvider.cs (1)
39Func<TArgumentList, SeparatedSyntaxList<TArgument>> getArguments,
SplitOrMergeIfStatements\AbstractMergeIfStatementsCodeRefactoringProvider.cs (1)
25Func<CancellationToken, Task<Document>> createChangedDocument, MergeDirection direction, string ifKeywordText);
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (1)
22protected abstract CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText);
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
48protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, MergeDirection direction, string ifKeywordText)
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
47protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText)
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
36protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, MergeDirection direction, string ifKeywordText)
SplitOrMergeIfStatements\Nested\AbstractSplitIntoNestedIfStatementsCodeRefactoringProvider.cs (1)
34protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText)
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
106private static readonly Func<Guid, ConcurrentDictionary<string, string?>> s_createCache =
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
88Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 394Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (1)
345var cascadingFix = AddParameterService.HasCascadingDeclarations(methodToUpdate)
src\roslyn\src\Analyzers\Core\CodeFixes\AddParameter\CodeFixData.cs (4)
13Func<CancellationToken, Task<Solution>> createChangedSolutionNonCascading, 14Func<CancellationToken, Task<Solution>>? createChangedSolutionCascading) 25public Func<CancellationToken, Task<Solution>> CreateChangedSolutionNonCascading { get; } = createChangedSolutionNonCascading ?? throw new ArgumentNullException(nameof(createChangedSolutionNonCascading)); 30public Func<CancellationToken, Task<Solution>>? CreateChangedSolutionCascading { get; } = createChangedSolutionCascading;
src\roslyn\src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
301static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Document>> action, string equivalenceKey)
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementHelpers.cs (1)
22Func<ITypeSymbol, bool> includeMemberType,
src\roslyn\src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (2)
120private readonly Func<CancellationToken, Task<Solution>> _createChangedSolutionAsync; 137Func<CancellationToken, Task<Solution>> createChangedSolutionAsync,
Wrapping\WrapItemsAction.cs (1)
54ImmutableArray<T> items, ImmutableArray<string> mostRecentlyUsedKeys, Func<T, string> getKey)
Microsoft.CodeAnalysis.NetAnalyzers (158)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PassSystemUriObjectsInsteadOfStrings.cs (2)
66private readonly Func<SyntaxNode, SyntaxNode?> _expressionGetter; 71Func<SyntaxNode, SyntaxNode?> expressionGetter)
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClasses.cs (1)
71var instantiatingAttributeChecker = new List<(Func<INamedTypeSymbol, bool> isAttributeTarget, Func<AttributeData, Compilation, INamedTypeSymbol?> findTypeOrDefault)>
Microsoft.CodeQuality.Analyzers\Maintainability\UseCrossPlatformIntrinsicsFixer.cs (1)
67protected abstract SyntaxNode ReplaceWithUnaryOperator(SyntaxNode currentNode, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode?> unaryOpFunc);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\FlowAnalysis\GlobalFlowStateDictionaryAnalysis.cs (2)
40Func<GlobalFlowStateDictionaryAnalysisContext, GlobalFlowStateDictionaryFlowOperationVisitor> createOperationVisitor, 91Func<GlobalFlowStateDictionaryAnalysisContext, GlobalFlowStateDictionaryFlowOperationVisitor> createOperationVisitor)
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\FlowAnalysis\GlobalFlowStateDictionaryAnalysisContext.cs (1)
38Func<GlobalFlowStateDictionaryAnalysisContext, GlobalFlowStateDictionaryAnalysisResult?> tryGetOrComputeAnalysisResult,
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.Collector.cs (2)
37private Func<ISymbol, bool>? _checkVisibility; 74public static Collector GetInstance(INamedTypeSymbol voidType, Func<ISymbol, bool> visibilityChecker)
Microsoft.NetCore.Analyzers\Runtime\AttributeStringLiteralsShouldParseCorrectly.cs (2)
255public Func<string, bool> IsValidValue { get; } 260public ValueValidator(ImmutableArray<string> acceptedTokens, string typeName, Func<string, bool> isValidValue, params string[] ignoredNames)
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocations.cs (2)
74private static void AnalyzeOperation(OperationAnalysisContext context, IMethodSymbol arrayEmptyMethodSymbol, INamedTypeSymbol? linqExpressionType, Func<SyntaxNode, bool> isAttributeSyntax, Func<SyntaxNode, bool> isCollectionExpressionSyntax)
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.Fixer.cs (1)
41Func<CancellationToken, Task<Document>> createChangedDocument;
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.Fixer.cs (1)
149private SyntaxNode ConvertOperandToArgument(in RequiredSymbols symbols, SyntaxGenerator generator, IOperation operand, Func<SyntaxNode, SyntaxNode> current)
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.Fixer.cs (5)
119public abstract SyntaxNode CreateReplacementExpression(IOperation violation, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode> current); 178public override SyntaxNode CreateReplacementExpression(IOperation violation, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode> current) 202public override SyntaxNode CreateReplacementExpression(IOperation violation, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode> current) 244public override SyntaxNode CreateReplacementExpression(IOperation violation, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode> current) 268public override SyntaxNode CreateReplacementExpression(IOperation violation, SyntaxGenerator generator, Func<SyntaxNode, SyntaxNode> current)
Microsoft.NetCore.Analyzers\Security\DoNotAlwaysSkipTokenValidationInDelegates.cs (1)
71Func<IMethodSymbol, bool> isCorrectFunction;
Microsoft.NetCore.Analyzers\Security\Helpers\InsecureObjectGraphResult.cs (1)
81public string GetDisplayString(Func<TypedConstant, string> typedConstantToString)
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessingInApiDesign.cs (2)
477Func<IPropertySymbol?, bool> isTargetPropertyFunc, 478Func<IOperation, bool> isIntendedValueFunc,
src\0437c1690f5501bd\CopyAnalysis.CopyDataFlowOperationVisitor.cs (5)
77Func<AnalysisEntity, CopyAbstractValue> getDefaultCopyValue) 138Func<AnalysisEntity, CopyAbstractValue?> tryGetAddressSharedCopyValue, 151Func<AnalysisEntity, CopyAbstractValue?> tryGetAddressSharedCopyValue, 449Func<AnalysisEntity, bool>? predicate = null; 522private void ApplyMissingCurrentAnalysisDataCore(CopyAnalysisData mergedData, Func<AnalysisEntity, bool>? predicate)
src\0437c1690f5501bd\CopyAnalysis.CoreCopyAnalysisDataDomain.cs (2)
18private readonly Func<AnalysisEntity, CopyAbstractValue> _getDefaultCopyValue; 20public CoreCopyAnalysisDataDomain(AbstractValueDomain<CopyAbstractValue> valueDomain, Func<AnalysisEntity, CopyAbstractValue> getDefaultCopyValue)
src\0437c1690f5501bd\SetCopyAbstractValuePredicateKind.cs (1)
11/// Predicate kind for <see cref="CopyDataFlowOperationVisitor.SetAbstractValue(CopyAnalysisData, AnalysisEntity, CopyAbstractValue, System.Func{AnalysisEntity, CopyAbstractValue}, SetCopyAbstractValuePredicateKind?, bool)"/>
src\11b41c7305441175\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (2)
595Func<PropertySetAbstractValue, HazardousUsageEvaluationResult> evaluationFunction, 596Func<AbstractLocation, PropertySetAbstractValue>? locationToAbstractValueMapping = null)
src\11b41c7305441175\PropertySetAnalysisContext.cs (2)
37Func<PropertySetAnalysisContext, PropertySetAnalysisResult?> tryGetOrComputeAnalysisResult, 80Func<PropertySetAnalysisContext, PropertySetAnalysisResult?> tryGetOrComputeAnalysisResult,
src\40daf5e1cab76dff\TaintedDataAnalysisContext.cs (2)
33Func<TaintedDataAnalysisContext, TaintedDataAnalysisResult?> tryGetOrComputeAnalysisResult, 75Func<TaintedDataAnalysisContext, TaintedDataAnalysisResult?> tryGetOrComputeAnalysisResult,
src\440320f3f10733a8\ValueContentAnalysis.cs (2)
56Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null) 90Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null)
src\440320f3f10733a8\ValueContentAnalysisContext.cs (5)
33Func<ValueContentAnalysisContext, ValueContentAnalysisResult?> tryGetOrComputeAnalysisResult, 35Func<IOperation, ValueContentAbstractValue>? getValueForAdditionalSupportedValueTypeOperation, 49public Func<IOperation, ValueContentAbstractValue>? GetValueForAdditionalSupportedValueTypeOperation { get; } 61Func<ValueContentAnalysisContext, ValueContentAnalysisResult?> tryGetOrComputeAnalysisResult, 63Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation,
src\47c588c5b8785708\ParameterValidationAnalysisContext.cs (2)
34Func<ParameterValidationAnalysisContext, ParameterValidationAnalysisResult?> tryGetOrComputeAnalysisResult, 58Func<ParameterValidationAnalysisContext, ParameterValidationAnalysisResult?> tryGetOrComputeAnalysisResult)
src\8ce1f4f68b646e6d\GlobalFlowStateAnalysis.cs (5)
59Func<GlobalFlowStateAnalysisContext, GlobalFlowStateValueSetFlowOperationVisitor> createOperationVisitor, 69Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null) 89Func<GlobalFlowStateAnalysisContext, GlobalFlowStateValueSetFlowOperationVisitor> createOperationVisitor, 99Func<IOperation, ValueContentAbstractValue>? getValueContentValueForAdditionalSupportedValueTypeOperation = null) 126Func<GlobalFlowStateAnalysisContext, GlobalFlowStateValueSetFlowOperationVisitor> createOperationVisitor)
src\8ce1f4f68b646e6d\GlobalFlowStateAnalysisContext.cs (2)
34Func<GlobalFlowStateAnalysisContext, GlobalFlowStateAnalysisResult?> tryGetOrComputeAnalysisResult, 62Func<GlobalFlowStateAnalysisContext, GlobalFlowStateAnalysisResult?> tryGetOrComputeAnalysisResult,
src\9382845807600969\AbstractDataFlowAnalysisContext.cs (2)
40Func<TAnalysisContext, TAnalysisResult?> tryGetOrComputeAnalysisResult, 88public Func<TAnalysisContext, TAnalysisResult?> TryGetOrComputeAnalysisResult { get; }
src\9382845807600969\AnalysisEntityDataFlowOperationVisitor.cs (3)
432private ImmutableHashSet<AnalysisEntity> GetChildAnalysisEntities(PointsToAbstractValue? instanceLocation, Func<AnalysisEntity, bool>? predicate) 452private ImmutableHashSet<AnalysisEntity> GetChildAnalysisEntities(Func<AnalysisEntity, bool> predicate) 737Func<AnalysisEntity, bool>? predicate = null;
src\9382845807600969\AnalysisEntityMapAbstractDomain.cs (6)
17private static readonly Func<AnalysisEntity, bool> s_defaultIsTrackedEntity = new(_ => true); 18private static readonly Func<PointsToAbstractValue, bool> s_defaultIsTrackedPointsToValue = new(_ => true); 20private readonly Func<AnalysisEntity, bool> _isTrackedEntity; 21private readonly Func<PointsToAbstractValue, bool> _isTrackedPointsToValue; 25Func<AnalysisEntity, bool> isTrackedEntity, 26Func<PointsToAbstractValue, bool> isTrackedPointsToValue)
src\9382845807600969\InterproceduralAnalysisPredicate.cs (7)
13private readonly Func<IMethodSymbol, bool>? _skipAnalysisForInvokedMethodPredicate; 14private readonly Func<IMethodSymbol, bool>? _skipAnalysisForInvokedLambdaOrLocalFunctionPredicate; 15private readonly Func<IDataFlowAnalysisContext, bool>? _skipAnalysisForInvokedContextPredicate; 18Func<IMethodSymbol, bool>? skipAnalysisForInvokedMethodPredicate, 19Func<IMethodSymbol, bool>? skipAnalysisForInvokedLambdaOrLocalFunctionPredicate, 20Func<IDataFlowAnalysisContext, bool>? skipAnalysisForInvokedContextPredicate) 36var predicate = isLambdaOrLocalFunction ?
src\ffd9070534249528\PointsToAnalysis.CorePointsToAnalysisDataDomain.cs (3)
21private readonly Func<ITypeSymbol?, bool> _isDisposable; 26Func<ITypeSymbol?, bool> isDisposable) 57Func<PointsToAbstractValue, ImmutableHashSet<AnalysisEntity>> getChildAnalysisEntities,
src\ffd9070534249528\PointsToAnalysis.PointsToAnalysisDomain.cs (3)
17public PointsToAnalysisDomain(DefaultPointsToValueGenerator defaultPointsToValueGenerator, Func<ITypeSymbol?, bool> isDisposable) 25Func<PointsToAbstractValue, ImmutableHashSet<AnalysisEntity>> getChildAnalysisEntities, 27Func<ITypeSymbol?, bool> isDisposable)
src\ffd9070534249528\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
442Func<ITypeSymbol?, bool> isDisposable,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
28public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
131private static int CalculateDepthOfInheritance(INamedTypeSymbol namedType, Func<INamedTypeSymbol, bool> isExcludedFromInheritanceCount)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (3)
16private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 19Func<INamedTypeSymbol, bool>? isExcludedFromInheritanceCountFunc = null) 33public Func<INamedTypeSymbol, bool> IsExcludedFromInheritanceCountFunc { get; }
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (2)
115private readonly Func<INamedTypeSymbol, bool> _isDisallowedCatchType; 121public DisallowGeneralCatchUnlessRethrowWalker(Func<INamedTypeSymbol, bool> isDisallowedCatchType, bool checkAnonymousFunctions)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IEnumerableExtensions.cs (3)
60private static readonly Func<object?, bool> s_notNullTest = x => x != null; 69return source.Where((Func<T?, bool>)s_notNullTest)!; 72public static ImmutableArray<TSource> WhereAsArray<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> selector)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
19private static readonly Func<INamedTypeSymbol, bool> s_isExtension = LightupHelpers.CreateSymbolPropertyAccessor<INamedTypeSymbol, bool>(typeof(INamedTypeSymbol), nameof(IsExtension), fallbackResult: false);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
245public static TOperation? GetAncestor<TOperation>(this IOperation root, OperationKind ancestorKind, Func<TOperation, bool>? predicate = null) 280public static IOperation? GetAncestor(this IOperation root, ImmutableArray<OperationKind> ancestorKinds, Func<IOperation, bool>? predicate = null) 353public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 366public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 371public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(returnValue: true)] out IOperation? foundOperation) 723public static IOperation WalkDownConversion(this IOperation operation, Func<IConversionOperation, bool> predicate) 797public static bool HasAnyExplicitDescendant(this IOperation operation, Func<IOperation, bool>? descendIntoOperation = null)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\ITypeSymbolExtensions.cs (1)
72public static IEnumerable<INamedTypeSymbol> GetBaseTypes(this ITypeSymbol type, Func<INamedTypeSymbol, bool>? takeWhilePredicate = null)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\SourceTextExtensions.cs (1)
24public static T Parse<T>(this SourceText text, Func<StreamReader, T> parser)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Lightup\LightupHelpers.cs (5)
15internal static Func<TSyntax, TProperty> CreateSyntaxPropertyAccessor<TSyntax, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 19internal static Func<TSymbol, TProperty> CreateSymbolPropertyAccessor<TSymbol, TProperty>(Type? type, string propertyName, TProperty fallbackResult) 23internal static Func<T, TProperty> CreatePropertyAccessor<T, TProperty>(Type? type, string parameterName, string propertyName, TProperty fallbackResult) 42Expression<Func<T, TProperty>> expression = Expression.Lambda<Func<T, TProperty>>(result, parameter);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (2)
457Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, 472static bool TryParse(string s, (Compilation compilation, Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out SymbolNamesWithValueOption<TValue> option)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
81Func<string, NameParts> getSymbolNamePartsFunc)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\ArrayBuilder.cs (2)
387internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 515public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\PooledObjects\PooledDictionary.cs (2)
48Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (1)
257internal bool IsTaskOfType([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol, bool> typeArgumentPredicate)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\BranchWithInfo.cs (1)
16private static readonly Func<ControlFlowRegion, IEnumerable<ControlFlowRegion>> s_getTransitiveNestedRegions = GetTransitiveNestedRegions;
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisContext.cs (2)
31Func<CopyAnalysisContext, CopyAnalysisResult?> tryGetOrComputeAnalysisResult, 51Func<CopyAnalysisContext, CopyAnalysisResult?> tryGetOrComputeAnalysisResult,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysisData.cs (2)
191internal void AssertValidCopyAnalysisData(Func<AnalysisEntity, CopyAbstractValue?>? tryGetDefaultCopyValue = null, bool initializingParameters = false) 200Func<AnalysisEntity, CopyAbstractValue?>? tryGetDefaultCopyValue = null,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.cs (1)
95Func<ITypeSymbol, bool> isDisposableTypeNotRequiringToBeDisposed,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisContext.cs (5)
35Func<DisposeAnalysisContext, DisposeAnalysisResult?> tryGetOrComputeAnalysisResult, 43Func<ITypeSymbol, bool> isDisposableTypeNotRequiringToBeDisposed) 74Func<DisposeAnalysisContext, DisposeAnalysisResult?> tryGetOrComputeAnalysisResult, 79Func<ITypeSymbol, bool> isDisposableTypeNotRequiringToBeDisposed) 111internal Func<ITypeSymbol, bool> IsDisposableTypeNotRequiringToBeDisposed { get; }
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
111public static Func<ITypeSymbol?, bool> GetIsDisposableDelegate(Compilation compilation)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.cs (3)
86var isDisposable = DisposeAnalysisHelper.GetIsDisposableDelegate(analysisContext.ControlFlowGraph.OriginalOperation.SemanticModel!.Compilation); 93internal static bool ShouldBeTracked([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol?, bool> isDisposable) 97internal static bool ShouldBeTracked(AnalysisEntity analysisEntity, PointsToAnalysisKind pointsToAnalysisKind, Func<ITypeSymbol?, bool> isDisposable)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisContext.cs (2)
33Func<PointsToAnalysisContext, PointsToAnalysisResult?> tryGetOrComputeAnalysisResult, 59Func<PointsToAnalysisContext, PointsToAnalysisResult?> tryGetOrComputeAnalysisResult,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysisData.cs (6)
19private readonly Func<ITypeSymbol?, bool> _isDisposable; 21internal PointsToAnalysisData(Func<ITypeSymbol?, bool> isDisposable) 26internal PointsToAnalysisData(IDictionary<AnalysisEntity, PointsToAbstractValue> fromData, Func<ITypeSymbol?, bool> isDisposable) 40Func<ITypeSymbol?, bool> isDisposable) 121internal static void AssertValidPointsToAnalysisData(IDictionary<AnalysisEntity, PointsToAbstractValue> map, Func<ITypeSymbol?, bool> isDisposable) 138Func<ITypeSymbol?, bool> isDisposable)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetCallbacks.cs (1)
51Func<object?, bool> badLiteralValuePredicate)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (8)
33private readonly Func<IOperation, PointsToAbstractValue>? _getPointsToAbstractValue; 35private readonly Func<IFlowCaptureOperation, bool> _getIsLValueFlowCapture; 38private readonly Func<IOperation, AnalysisEntity?>? _interproceduralGetAnalysisEntityForFlowCapture; 39private readonly Func<ISymbol, ImmutableStack<IOperation>?> _getInterproceduralCallStackForOwningSymbol; 44Func<IOperation, PointsToAbstractValue>? getPointsToAbstractValue, 46Func<IFlowCaptureOperation, bool> getIsLValueFlowCapture, 52Func<IOperation, AnalysisEntity?>? interproceduralGetAnalysisEntityForFlowCapture, 53Func<ISymbol, ImmutableStack<IOperation>?> getInterproceduralCallStackForOwningSymbol)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (2)
164protected Func<TAnalysisContext, TAnalysisResult?> TryGetOrComputeAnalysisResult 2101Func<TKey, bool>? predicate)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisData.cs (8)
37Func<IOperation, TAbstractAnalysisValue> getCachedAbstractValueFromCaller, 38Func<IMethodSymbol, ControlFlowGraph?> getInterproceduralControlFlowGraph, 39Func<IOperation, AnalysisEntity?> getAnalysisEntityForFlowCapture, 40Func<ISymbol, ImmutableStack<IOperation>?> getInterproceduralCallStackForOwningSymbol) 64public Func<IOperation, TAbstractAnalysisValue> GetCachedAbstractValueFromCaller { get; } 65public Func<IMethodSymbol, ControlFlowGraph?> GetInterproceduralControlFlowGraph { get; } 66public Func<IOperation, AnalysisEntity?> GetAnalysisEntityForFlowCapture { get; } 67public Func<ISymbol, ImmutableStack<IOperation>?> GetInterproceduralCallStackForOwningSymbol { get; }
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\SingleThreadedConcurrentDictionary.cs (1)
39public TValue? GetOrAdd(TKey key, Func<TKey, TValue?> valueFactory)
SyntaxEditorFixAllProvider.cs (3)
131Func<FixAllContext, TState> createDocumentState, 190private readonly Func<FixAllContext, TState> _createDocumentState; 196Func<FixAllContext, TState> createDocumentState,
Microsoft.CodeAnalysis.Razor.Compiler (107)
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (1)
818Func<CSharpIntermediateToken, IntermediateNode> createCSharpWrapper)
Language\DirectiveTokenEditHandler.cs (1)
13public static void SetupBuilder(SpanEditHandlerBuilder builder, Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> tokenizer)
Language\Intermediate\DocumentIntermediateNodeExtensions.cs (1)
33private static T? FindNode<T>(IntermediateNode node, Func<T, bool> predicate)
Language\Intermediate\IntermediateNodeFactory.cs (2)
13public static CSharpIntermediateToken CSharpToken<T>(T arg, Func<T, string> contentFactory, SourceSpan? source = null) 19public static HtmlIntermediateToken HtmlToken<T>(T arg, Func<T, string> contentFactory, SourceSpan? source = null)
Language\Intermediate\LazyContent.cs (3)
18public static LazyContent Create<T>(T arg, Func<T, string> contentFactory) 25private sealed class LazyContentImpl<T>(T arg, Func<T, string> contentFactory) : LazyContent 32private Func<T, string?> _contentFactory = contentFactory;
Language\Legacy\AutoCompleteEditHandler.cs (1)
14public static void SetupBuilder(SpanEditHandlerBuilder builder, Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> tokenizer, bool autoCompleteAtEndOfSpan, out AutoCompleteStringAccessor autoCompleteStringAccessor)
Language\Legacy\CodeBlockEditHandler.cs (1)
13public static void SetupBuilder(SpanEditHandlerBuilder builder, Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> tokenizer)
Language\Legacy\CSharpCodeParser.cs (1)
24private static readonly Func<SyntaxToken, bool> IsValidStatementSpacingToken =
Language\Legacy\HtmlMarkupParser.cs (1)
224Func<SyntaxToken, bool>? stopCondition = null)
Language\Legacy\ImplicitExpressionEditHandler.cs (1)
19public static void SetupBuilder(SpanEditHandlerBuilder builder, Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> tokenizer, bool acceptTrailingDot, KeywordSet keywords)
Language\Legacy\NativeCSharpTokenizer.cs (3)
570private static readonly Func<char, bool> IsEndQuotedCharacterLiteral = static (c) => c == '\\' || c == '\'' || SyntaxFacts.IsNewLine(c); 571private static readonly Func<char, bool> IsEndQuotedStringLiteral = static (c) => c == '\\' || c == '\"' || SyntaxFacts.IsNewLine(c); 573private StateResult QuotedLiteral(char quote, Func<char, bool> isEndQuotedLiteral, SyntaxKind literalType)
Language\Legacy\SpanEditHandler.cs (3)
15internal static readonly Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> NoTokenizer = _ => []; 34public required Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> Tokenizer { get; init; } 46public static SpanEditHandler CreateDefault(Func<string, IEnumerable<Syntax.InternalSyntax.SyntaxToken>> tokenizer, AcceptedCharactersInternal acceptedCharacters)
Language\Legacy\SpanEditHandlerBuilder.cs (7)
13private static readonly Func<string, IEnumerable<SyntaxToken>> DefaultTokenizer = SpanEditHandler.NoTokenizer; 16private readonly Func<string, IEnumerable<SyntaxToken>>? _defaultLanguageTokenizer; 20private Func<string, IEnumerable<SyntaxToken>>? _tokenizer; 21private Func<AcceptedCharactersInternal, Func<string, IEnumerable<SyntaxToken>>, SpanEditHandler>? _factory; 23public SpanEditHandlerBuilder(Func<string, IEnumerable<SyntaxToken>>? defaultLanguageTokenizer) 33public Func<string, IEnumerable<SyntaxToken>>? Tokenizer 46public Func<AcceptedCharactersInternal, Func<string, IEnumerable<SyntaxToken>>, SpanEditHandler>? Factory
Language\Legacy\Tokenizer.cs (2)
239protected bool TakeUntil(Func<char, bool> predicate) 343Func<char, char> filter = c => c;
Language\Legacy\TokenizerBackedParser.cs (9)
27protected static readonly Func<SyntaxToken, bool> IsSpacingToken = (token) => 32protected static readonly Func<SyntaxToken, bool> IsSpacingTokenIncludingNewLines = (token) => 37protected static readonly Func<SyntaxToken, bool> IsSpacingTokenIncludingComments = (token) => 42protected static readonly Func<SyntaxToken, bool> IsSpacingTokenIncludingNewLinesAndCommentsAndCSharpDirectives = (token) => 91protected Func<string, IEnumerable<SyntaxToken>> LanguageTokenizeString { get; } 244protected internal bool NextIs(Func<SyntaxToken, bool> condition) 320Func<SyntaxToken, bool> predicate, 338protected void SkipWhile(Func<SyntaxToken, bool> predicate) 500protected void AcceptWhile(Func<SyntaxToken, bool> condition)
Language\RazorProjectEngine.cs (1)
396internal ImmutableArray<RazorProjectItem> GetImports(RazorProjectItem projectItem, Func<RazorProjectItem, bool> predicate)
Language\Syntax\SyntaxList`1.cs (4)
443public bool Any(Func<TNode, bool> predicate) 456public SyntaxList<TNode> Where(Func<TNode, bool> predicate) 534public int IndexOf(Func<TNode, bool> predicate) 581public int LastIndexOf(Func<TNode, bool> predicate)
Language\Syntax\SyntaxNavigator.cs (10)
12private static Func<SyntaxToken, bool> GetPredicateFunction(bool includeZeroWidth) 17private static bool Matches(Func<SyntaxToken, bool>? predicate, SyntaxToken token) 42internal static SyntaxToken GetFirstToken(SyntaxNode current, Func<SyntaxToken, bool>? predicate) 76private static SyntaxToken GetFirstToken(SyntaxToken token, Func<SyntaxToken, bool>? predicate) 86internal static SyntaxToken GetLastToken(SyntaxNode current, Func<SyntaxToken, bool> predicate) 121private static SyntaxToken GetLastToken(SyntaxToken token, Func<SyntaxToken, bool> predicate) 131internal static SyntaxToken GetNextToken(SyntaxToken current, Func<SyntaxToken, bool>? predicate) 173internal static SyntaxToken GetNextToken(SyntaxNode node, Func<SyntaxToken, bool>? predicate) 215internal static SyntaxToken GetPreviousToken(SyntaxToken current, Func<SyntaxToken, bool> predicate) 257internal static SyntaxToken GetPreviousToken(SyntaxNode node, Func<SyntaxToken, bool> predicate)
Language\Syntax\SyntaxNode.cs (13)
269public TNode? FirstAncestorOrSelf<TNode>(Func<TNode, bool>? predicate = null) 288internal DescendantNodeEnumerable<SyntaxNode> DescendantNodes(Func<SyntaxNode, bool>? descendIntoChildren = null) 298public IEnumerable<SyntaxNode> DescendantNodesAsIEnumerable(Func<SyntaxNode, bool>? descendIntoChildren = null) 308public IEnumerable<SyntaxNode> DescendantNodes(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null) 317public IEnumerable<SyntaxNode> DescendantNodesAndSelf(Func<SyntaxNode, bool>? descendIntoChildren = null) 327public IEnumerable<SyntaxNode> DescendantNodesAndSelf(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null) 336public IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokens(Func<SyntaxNode, bool>? descendIntoChildren = null) 346public IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokens(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null) 355public IEnumerable<SyntaxNodeOrToken> DescendandNodesAndTokensAndSelf(Func<SyntaxNode, bool>? descendIntoChildren = null) 364public IEnumerable<SyntaxNodeOrToken> DescendandNodesAndTokensAndSelf(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null) 373internal DescendantTokenEnumerable DescendantTokens(Func<SyntaxNode, bool>? descendIntoChildren = null) 382public IEnumerable<SyntaxToken> DescendantTokensAsIEnumerable(Func<SyntaxNode, bool>? descendIntoChildren = null) 392public IEnumerable<SyntaxToken> DescendantTokens(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null)
Language\Syntax\SyntaxNode.Iterators.cs (38)
15private IEnumerable<SyntaxNode> DescendantNodesImpl(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren, bool includeSelf) 39private IEnumerable<SyntaxNodeOrToken> DescendantNodesAndTokensImpl(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren, bool includeSelf) 102public ChildSyntaxListEnumeratorStack(SyntaxNode startingNode, Func<SyntaxNode, bool>? descendIntoChildren) 165public void PushChildren(SyntaxNode node, Func<SyntaxNode, bool>? descendIntoChildren) 189Func<SyntaxNode, bool>? descendIntoChildren, 190Func<SyntaxNode, bool>? predicate, 191Func<SyntaxNode, TResult>? selector) 194private readonly Func<SyntaxNode, bool>? _descendIntoChildren = descendIntoChildren; 195private readonly Func<SyntaxNode, bool>? _predicate = predicate; 196private readonly Func<SyntaxNode, TResult>? _selector = selector; 206public DescendantNodeEnumerable<TNew> Select<TNew>(Func<TResult, TNew> newSelector) 210return new(_root, _descendIntoChildren, _predicate, (Func<SyntaxNode, TNew>)(object)newSelector); 215static DescendantNodeEnumerable<TNew> Composed(SyntaxNode root, Func<SyntaxNode, bool>? descendIntoChildren, Func<SyntaxNode, bool>? predicate, Func<SyntaxNode, TResult> outerSelector, Func<TResult, TNew> newSelector) 221public DescendantNodeEnumerable<TResult> Where(Func<TResult, bool> newPredicate) 225return new(_root, _descendIntoChildren, (Func<SyntaxNode, bool>)(object)newPredicate, _selector); 230static DescendantNodeEnumerable<TResult> Composed(SyntaxNode root, Func<SyntaxNode, bool>? descendIntoChildren, Func<SyntaxNode, bool>? outerPredicate, Func<SyntaxNode, TResult>? outerSelector, Func<TResult, bool> newPredicate) 235Func<SyntaxNode, bool> composedPredicate = outerPredicate is not null 247Func<SyntaxNode, bool> composedPredicate = outerPredicate is not null 259public bool Any(Func<TResult, bool> predicate) 272public TResult? FirstOrDefault(Func<TResult, bool>? predicate = null) 285public TResult? LastOrDefault(Func<TResult, bool>? predicate = null) 319Func<SyntaxNode, bool>? descendIntoChildren, 320Func<SyntaxNode, bool>? predicate, 321Func<SyntaxNode, TResult>? selector) 324private readonly Func<SyntaxNode, bool>? _descendIntoChildren = descendIntoChildren; 325private readonly Func<SyntaxNode, bool>? _predicate = predicate; 326private readonly Func<SyntaxNode, TResult>? _selector = selector; 364internal readonly ref struct DescendantTokenEnumerable(SyntaxNode root, Func<SyntaxNode, bool>? descendIntoChildren) 367private readonly Func<SyntaxNode, bool>? _descendIntoChildren = descendIntoChildren; 371public readonly bool Any(Func<SyntaxToken, bool> predicate) 400internal ref struct DescendantTokenEnumerator(SyntaxNode root, Func<SyntaxNode, bool>? descendIntoChildren) 403private readonly Func<SyntaxNode, bool>? _descendIntoChildren = descendIntoChildren;
Language\Syntax\SyntaxToken.cs (4)
16internal static readonly Func<SyntaxToken, bool> NonZeroWidth = t => t.Width > 0; 17internal static readonly Func<SyntaxToken, bool> Any = t => true; 139internal SyntaxToken GetNextToken(Func<SyntaxToken, bool> predicate) 168internal SyntaxToken GetPreviousToken(Func<SyntaxToken, bool> predicate)
Microsoft.CodeAnalysis.ResxSourceGenerator (404)
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
37using var _ = PooledDelegates.GetPooledFunction(valueFactory, factoryArgument, out var boundFunction); 55using var _a = PooledDelegates.GetPooledFunction(addValueFactory, factoryArgument, out var pooledAddValueFactory);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 47private readonly Func<T, int> _getHashCode = getHashCode;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (7)
122Func<object, Task> taskBody = static async o => 287Func<object, Task> taskBody = static async o => 395private readonly Func<object, Task> _taskBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 584IEnumerable<TSource> source, Func<object, Task> taskBody, 610IAsyncEnumerable<TSource> source, Func<object, Task> taskBody, 637T fromExclusive, T toExclusive, Func<object, Task> taskBody,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
29public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
130private static int CalculateDepthOfInheritance(INamedTypeSymbol namedType, Func<INamedTypeSymbol, bool> isExcludedFromInheritanceCount)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (3)
15private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 18Func<INamedTypeSymbol, bool>? isExcludedFromInheritanceCountFunc = null) 32public Func<INamedTypeSymbol, bool> IsExcludedFromInheritanceCountFunc { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (2)
115private readonly Func<INamedTypeSymbol, bool> _isDisallowedCatchType; 121public DisallowGeneralCatchUnlessRethrowWalker(Func<INamedTypeSymbol, bool> isDisallowedCatchType, bool checkAnonymousFunctions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
131public static TOperation? GetAncestor<TOperation>(this IOperation root, OperationKind ancestorKind, Func<TOperation, bool>? predicate = null) 166public static IOperation? GetAncestor(this IOperation root, ImmutableArray<OperationKind> ancestorKinds, Func<IOperation, bool>? predicate = null)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\SourceTextExtensions.cs (1)
25public static T Parse<T>(this SourceText text, Func<StreamReader, T> parser)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (2)
458Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, 473static bool TryParse(string s, (Compilation compilation, Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out SymbolNamesWithValueOption<TValue> option)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
83Func<string, NameParts> getSymbolNamePartsFunc)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (2)
24Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
203internal bool IsTaskOfType([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol, bool> typeArgumentPredicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
17public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 20public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
Microsoft.CodeAnalysis.Scripting (34)
Script.cs (24)
194public Task<ScriptState> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 197internal abstract Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken); 222public Task<ScriptState> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 225internal abstract Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken); 235internal abstract Func<object[], Task> CommonGetExecutor(CancellationToken cancellationToken); 341private ImmutableArray<Func<object[], Task>> _lazyPrecedingExecutors; 342private Func<object[], Task<T>> _lazyExecutor; 374internal override Func<object[], Task> CommonGetExecutor(CancellationToken cancellationToken) 380internal override Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken) 383internal override Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken) 387private Func<object[], Task<T>> GetExecutor(CancellationToken cancellationToken) 398private ImmutableArray<Func<object[], Task>> GetPrecedingExecutors(CancellationToken cancellationToken) 411private ImmutableArray<Func<object[], Task>> TryGetPrecedingExecutors(Script lastExecutedScriptInChainOpt, CancellationToken cancellationToken) 416return ImmutableArray<Func<object[], Task>>.Empty; 430return default(ImmutableArray<Func<object[], Task>>); 433var executors = ArrayBuilder<Func<object[], Task>>.GetInstance(scriptsReversed.Count); 487public new Task<ScriptState<T>> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 496var currentExecutor = GetExecutor(cancellationToken); 510var currentExecutor = GetExecutor(cancellationToken); 547public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 569var currentExecutor = GetExecutor(cancellationToken); 577ImmutableArray<Func<object[], Task>> precedingExecutors, 578Func<object[], Task> currentExecutor, 579Func<Exception, bool> catchExceptionOpt,
ScriptBuilder.cs (4)
78internal Func<object[], Task<T>> CreateExecutor<T>(ScriptCompiler compiler, Compilation compilation, bool emitDebugInformation, CancellationToken cancellationToken) 88var executor = Build<T>(compilation, diagnostics, emitDebugInformation, cancellationToken); 122private Func<object[], Task<T>> Build<T>( 160return runtimeEntryPoint.CreateDelegate<Func<object[], Task<T>>>();
ScriptExecutionState.cs (3)
68ImmutableArray<Func<object[], Task>> precedingExecutors, 69Func<object[], Task> currentExecutor, 71Func<Exception, bool> catchExceptionOpt,
ScriptState.cs (2)
156public Task<ScriptState<object>> ContinueWithAsync(string code, ScriptOptions options = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 180public Task<ScriptState<TResult>> ContinueWithAsync<TResult>(string code, ScriptOptions options = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
Utilities\ParameterValidationHelpers.cs (1)
68internal static IEnumerable<S> SelectChecked<T, S>(IEnumerable<T> items, string parameterName, Func<T, S> selector)
Microsoft.CodeAnalysis.VisualBasic (4)
Declarations\MergedTypeDeclaration.vb (2)
138Private Shared ReadOnly s_identityFunc As Func(Of SingleTypeDeclaration, SingleTypeDeclaration) = 141Private Shared ReadOnly s_mergeFunc As Func(Of IEnumerable(Of SingleTypeDeclaration), MergedTypeDeclaration) =
Symbols\SynthesizedSymbols\SynthesizedClonedTypeParameterSymbol.vb (2)
27Private ReadOnly _typeMapFactory As Func(Of Symbol, TypeSubstitution) 40Friend Sub New(correspondingMethodTypeParameter As TypeParameterSymbol, container As Symbol, name As String, typeMapFactory As Func(Of Symbol, TypeSubstitution))
Microsoft.CodeAnalysis.Workspaces (532)
Classification\AbstractClassificationService.cs (4)
27private Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>>? _getNodeClassifiers; 28private Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>>? _getTokenClassifiers; 185(Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>>, Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>>) GetExtensionClassifiers(
Classification\Classifier.cs (2)
84var getNodeClassifiers = extensionManager.CreateNodeExtensionGetter(syntaxClassifiers, c => c.SyntaxNodeTypes); 85var getTokenClassifiers = extensionManager.CreateTokenExtensionGetter(syntaxClassifiers, c => c.SyntaxTokenKinds);
Classification\ClassifierHelper.cs (1)
239Func<TClassifiedSpan, TextSpan> getSpan,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.cs (4)
29Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 30Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 50Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 51Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (6)
25private readonly Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> _getNodeClassifiers; 26private readonly Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> _getTokenClassifiers; 38Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 39Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 60Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 61Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers,
Classification\SyntaxClassification\ISyntaxClassificationService.cs (4)
38Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 39Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 47Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 48Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers,
Classification\SyntaxClassification\SyntaxClassificationExtensions.cs (4)
32Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 33Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 51Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>> getNodeClassifiers, 52Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers,
CodeActions\CodeAction.cs (8)
109private bool IsNonProgressApiOverridden(Dictionary<Type, bool> dictionary, Func<CodeAction, bool> computeResult) 486public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey) 493/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?)"/> 496public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 499/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?, CodeActionPriority)"/> 520public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey) 531public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 534/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Solution}}, string?, CodeActionPriority)"/>
CodeCleanup\AbstractCodeCleanerService.cs (3)
458Func<SyntaxNode, ImmutableArray<TextSpan>> spanGetter, 521SyntaxNode root, Func<SyntaxNode, ImmutableArray<TextSpan>> spanGetter) 539Func<SyntaxNode, ImmutableArray<TextSpan>> spanGetter,
CodeFixesAndRefactorings\FixAllProviderInfo.cs (1)
115private readonly Func<Diagnostic, bool> _canBeSuppressedOrUnsuppressed = suppressionFixer.IsFixableDiagnostic;
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (1)
66Func<SyntaxEditor, Task> editAsync,
Editing\SymbolEditorExtensions.cs (1)
60Func<SyntaxGenerator, SyntaxNode> getNewBaseType,
Editing\SyntaxGenerator.cs (2)
1520protected static SyntaxNode? PreserveTrivia<TNode>(TNode? node, Func<TNode, SyntaxNode> nodeChanger) where TNode : SyntaxNode 1549protected static SyntaxNode ReplaceWithTrivia<TNode>(SyntaxNode root, TNode original, Func<TNode, SyntaxNode> replacer)
ExtensionManager\IExtensionManagerExtensions.cs (5)
69Func<CancellationToken, Task<T>?> function, 90public static Func<SyntaxNode, ImmutableArray<TExtension>> CreateNodeExtensionGetter<TExtension>( 91this IExtensionManager extensionManager, IEnumerable<TExtension> extensions, Func<TExtension, ImmutableArray<Type>> nodeTypeGetter) 114public static Func<SyntaxToken, ImmutableArray<TExtension>> CreateTokenExtensionGetter<TExtension>( 115this IExtensionManager extensionManager, IEnumerable<TExtension> extensions, Func<TExtension, ImmutableArray<int>> tokenKindGetter)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (1)
203string pattern, Func<SearchQuery, Task<ImmutableArray<ISymbol>>> searchAsync)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (1)
95static async IAsyncEnumerable<TResult> SelectManyAsync<TSource, TResult>(IEnumerable<TSource> source, Func<TSource, IAsyncEnumerable<TResult>> selector)
FindSymbols\FindReferences\DependentTypeFinder.cs (10)
43private static readonly Func<Location, bool> s_isInMetadata = static loc => loc.IsInMetadata; 44private static readonly Func<Location, bool> s_isInSource = static loc => loc.IsInSource; 46private static readonly Func<INamedTypeSymbol, bool> s_isInterface = static t => t is { TypeKind: TypeKind.Interface }; 47private static readonly Func<INamedTypeSymbol, bool> s_isNonSealedClass = static t => t is { TypeKind: TypeKind.Class, IsSealed: false }; 48private static readonly Func<INamedTypeSymbol, bool> s_isInterfaceOrNonSealedClass = static t => s_isInterface(t) || s_isNonSealedClass(t); 66Func<INamedTypeSymbol, bool> shouldContinueSearching, 255Func<INamedTypeSymbol, bool>? predicate) 376SymbolSet foundTypes, Func<Location, bool> assert, string message) 389private static void AddRange(SymbolSet foundTypes, SymbolSet currentTypes, Func<INamedTypeSymbol, bool> shouldContinueSearching) 540Func<INamedTypeSymbol, bool> shouldContinueSearching)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (2)
347Func<SyntaxTreeIndex, bool> predicate, 378Func<SyntaxTreeIndex, bool> isRelevantDocument,
FindSymbols\SearchQuery.cs (4)
21private readonly Func<string, bool> _predicate; 54private SearchQuery(Func<string, bool> predicate) 72public static SearchQuery CreateCustom(Func<string, bool> predicate) 75public readonly Func<string, bool> GetPredicate()
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (4)
28public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, CancellationToken cancellationToken = default) 34public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default) 73public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, CancellationToken cancellationToken = default) 79public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default)
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (1)
32Func<Checksum, ValueTask<SymbolTreeInfo>> createAsync,
Log\AbstractLogAggregator.cs (1)
28private readonly Func<object, TValue> _createCounter;
Log\AggregateLogger.cs (2)
42public static ILogger AddOrReplace(ILogger newLogger, ILogger oldLogger, Func<ILogger, bool> predicate) 86public static ILogger Remove(ILogger logger, Func<ILogger, bool> predicate)
Log\EtwLogger.cs (1)
14internal sealed class EtwLogger(Func<FunctionId, bool> isEnabledPredicate) : ILogger
Log\TraceLogger.cs (1)
14internal sealed class TraceLogger(Func<FunctionId, bool>? isEnabledPredicate) : ILogger
Options\OptionChangedEventArgs.cs (1)
15public bool HasOption(Func<IOption2, bool> predicate)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
179/// <param name="candidateSymbols">symbols corresponding to <see cref="Expression{Func}"/> or <see cref="Func{some_args, TResult}"/>
Rename\ConflictEngine\DeclarationConflictHelpers.cs (1)
42Func<ISymbol, ImmutableArray<ImmutableArray<ParameterSignature>>> getAllSignatures)
Serialization\SerializerService.cs (1)
36private static readonly Func<WellKnownSynchronizationKind, string> s_logKind = k => k.ToString();
Shared\Extensions\ISymbolExtensions.cs (1)
646this ImmutableArray<T> symbols, bool hideAdvancedMembers, Compilation compilation, Func<T, bool> inclusionFilter) where T : ISymbol
Shared\TestHooks\AsynchronousOperationListener.cs (1)
182public async Task WaitUntilConditionIsMetAsync(Func<IEnumerable<DiagnosticAsyncToken>, bool> condition)
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
44private readonly Func<string, AsynchronousOperationListener> _createCallback;
Simplification\Simplifier.cs (6)
62public static async Task<TNode> ExpandAsync<TNode>(TNode node, Document document, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 81public static TNode Expand<TNode>(TNode node, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 92internal static TNode Expand<TNode>(TNode node, SemanticModel semanticModel, SolutionServices services, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 112public static async Task<SyntaxToken> ExpandAsync(SyntaxToken token, Document document, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default) 126public static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default) 137internal static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, SolutionServices services, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default)
SourceGeneratorTelemetry\ISourceGeneratorTelemetryCollectorWorkspaceService.cs (1)
14void CollectRunResult(GeneratorDriverRunResult driverRunResult, GeneratorDriverTimingInfo driverTimingInfo, Func<ISourceGenerator, AnalyzerReference> getAnalyzerReference);
SourceGeneratorTelemetry\SourceGeneratorTelemetryCollectorWorkspaceService.cs (2)
46private GeneratorTelemetryKey GetTelemetryKey(ISourceGenerator generator, Func<ISourceGenerator, AnalyzerReference> getAnalyzerReference) 52Func<ISourceGenerator, AnalyzerReference> getAnalyzerReference)
src\7a47995420f988d7\AbstractRemoveUnnecessaryImportsService.cs (2)
22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25Document document, Func<SyntaxNode, bool> predicate, CancellationToken cancellationToken)
src\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (1)
16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
19protected readonly Func<TypeInferenceInfo, bool> IsUsableTypeFunc; 24private static readonly Func<TypeInferenceInfo, bool> s_isNotNull = t => t.InferredType != null;
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (8)
38private sealed class StorageMapping(IOption2 internalOption, Func<object?, object?> toPublicValue, Func<object?, object?> toInternalValue) : OptionStorageMapping(internalOption) 47private static OptionDefinition<TPublicValue> ToPublicOptionDefinition<T, TPublicValue>(this OptionDefinition<T> definition, IOption2 internalOption, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 56public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 66public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (2)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 80Func<SyntaxEditor, Task> editAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
235Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
501Func<SyntaxTrivia, bool> isEndOfLineTrivia, 521Func<SyntaxToken, bool> isComma, 549Func<SyntaxToken, bool> isAccessibilityModifier)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
195Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 196Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
29Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 52Func<TType, TNode> selector, 96Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 153Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
31private static readonly Func<ISymbol, bool> s_LocalNameFilter = s => 76Func<ISymbol, bool>? filter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
35Func<ISymbol, bool> filter, IEnumerable<string> usedNames, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
35protected static readonly Func<SyntaxNode, bool> s_containsAnnotations = n => n.ContainsAnnotations; 36protected static readonly Func<SyntaxNodeOrToken, bool> s_hasSimplifierAnnotation = n => n.HasAnnotation(Simplifier.Annotation); 40protected abstract ImmutableArray<NodeOrTokenToReduce> GetNodesAndTokensToReduce(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 283Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpan)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
20Func<SyntaxNode, bool>? expandInsideNode, 27Func<SyntaxNode, bool>? expandInsideNode,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (6)
43Func<string, bool>? canUse = null, 63Func<string, bool>? canUse = null, 86Func<string, bool>? canUse = null, 134public static string GenerateUniqueName(string baseName, Func<string, bool> canUse) 140public static string GenerateUniqueName(string baseName, string extension, Func<string, bool> canUse) 160public static string GenerateUniqueName(IEnumerable<string> baseNames, Func<string, bool> canUse)
SymbolSearch\ISymbolSearchService.cs (1)
133private static readonly ImmutableArray<Func<PackageWithAssemblyResult, IComparable>> s_comparers =
TemporaryStorage\TemporaryStorageService.MemoryMappedInfo.cs (1)
119private static T RunWithCompactingGCFallback<TArg, T>(Func<TArg, T> function, TArg argument)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
442Func<DocumentId, SourceTextContainer?> getContainer)
Workspace\ProjectSystem\ProjectSystemProject.cs (2)
195private void ChangeProjectProperty<T>(ref T field, T newValue, Func<Solution, Solution> updateSolution, bool logThrowAwayTelemetry = false) 310private void ChangeProjectOutputPath(ref string? field, string? newValue, Func<Solution, Solution> withNewValue)
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (3)
286public void ApplyChangeToWorkspace(ProjectId projectId, Func<CodeAnalysis.Solution, CodeAnalysis.Solution> solutionTransformation) 911Func<Project, IEnumerable<TReference>> getReferences, 912Func<TReference, string> getFilePath,
Workspace\Solution\Checksum.cs (2)
102public static Func<Checksum, string> GetChecksumLogInfo { get; } 105public static Func<IEnumerable<Checksum>, string> GetChecksumsLogInfo { get; }
Workspace\Solution\Project.cs (2)
420Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken) 488private async Task<bool> ContainsAsync(Func<Document, Task<bool>> predicateAsync)
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (1)
27private readonly Func<string, AnalyzerConfigData> _computeFunction = path => new AnalyzerConfigData(configSet.GetOptionsForSourcePath(path), fallbackOptions);
Workspace\Solution\SolutionCompilationState.cs (1)
155Func<StateChange, TranslationAction?>? translate,
Workspace\Solution\SolutionCompilationState.GeneratorDriverInitializationCache.cs (1)
36Func<GeneratorFilterContext, bool> generatorFilter,
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
33private static readonly Func<ProjectState, string> s_logBuildCompilationAsync =
Workspace\Solution\TextDocumentStates.cs (2)
75public TextDocumentStates(IEnumerable<DocumentInfo> infos, Func<DocumentInfo, TState> stateConstructor) 129public ImmutableArray<TValue> SelectAsArray<TValue>(Func<TState, TValue> selector)
Workspace\Workspace.cs (5)
197/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, ValueTuple{WorkspaceChangeKind, ProjectId?, DocumentId?}}, Action{Solution, Solution}?, Action{Solution, Solution}?)"/> 199Func<Solution, Solution> transformation, 228Func<Solution, Solution> transformation, 248Func<Solution, Solution> transformation, 723Func<WorkspaceEventOptions, bool> shouldRaise,
Workspace\WorkspaceEventMap.cs (4)
94public bool HasMatchingOptions(Func<WorkspaceEventOptions, bool> isMatch) 97public void RaiseEvent<TEventArgs>(TEventArgs arg, Func<WorkspaceEventOptions, bool> shouldRaiseEvent) 125public bool HasMatchingOptions(Func<WorkspaceEventOptions, bool> isMatch) 128public void RaiseEvent(EventArgs args, Func<WorkspaceEventOptions, bool> shouldRaiseEvent)
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\DiagnosticReporter.cs (1)
23public void Report(DiagnosticReportingMode mode, string message, Func<string, Exception>? createException = null)
MSBuild\ProjectMap.cs (1)
166private static bool TryFindPathInProjectIdSet(string? path, Func<ProjectId, string?> getPathById, HashSet<ProjectId> set, [NotNullWhen(true)] out ProjectId? result)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (1)
18public static EqualityComparer<T> Create<T>(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null)
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Semantics\EXPRExtensions.cs (1)
12public static Expr Map(this Expr expr, Func<Expr, Expr> f)
src\runtime\src\libraries\Common\src\System\Runtime\InteropServices\ComEventsMethod.cs (1)
201public void RemoveDelegates(Func<Delegate, bool> condition)
Microsoft.Data.Analysis (11)
DataFrame.IO.cs (4)
61private static Type GuessKind(int col, List<(long LineNumber, string[] Line)> read, Func<IEnumerable<string>, Type> guessTypeFunction) 360CultureInfo cultureInfo = null, Func<IEnumerable<string>, Type> guessTypeFunction = null) 545CultureInfo cultureInfo = null, Func<IEnumerable<string>, Type> guessTypeFunction = null) 572Func<IEnumerable<string>, Type> guessTypeFunction = null)
DataFrameColumns\ArrowStringDataFrameColumn.cs (1)
684public ArrowStringDataFrameColumn Apply(Func<string, string> func)
DataFrameColumns\StringDataFrameColumn.cs (1)
88public StringDataFrameColumn Apply(Func<string, string> func, bool inPlace = false)
GroupBy.cs (1)
335private DataFrameColumn ResizeAndInsertColumn(int columnIndex, long rowIndex, bool firstGroup, DataFrame ret, PrimitiveDataFrameColumn<long> empty, Func<string, DataFrameColumn> getColumn = null)
PrimitiveColumnContainer.cs (2)
197public void Apply(Func<T, T> func) 215public void Apply<TResult>(Func<T?, TResult?> func, PrimitiveColumnContainer<TResult> resultContainer)
PrimitiveDataFrameColumn.cs (2)
667public PrimitiveDataFrameColumn<T> Apply(Func<T, T> func, bool inPlace = false) 681public PrimitiveDataFrameColumn<TResult> Apply<TResult>(Func<T?, TResult?> func) where TResult : unmanaged
Microsoft.Diagnostics.DataContractReader (4)
CachingContractRegistry.cs (4)
21private readonly Dictionary<(Type, string), Func<Target, IContract>> _creators = []; 37public override void Register<TContract>(string version, Func<Target, TContract> creator) 57if (!TryResolveCreator(typeof(TContract), TContract.Name, out Func<Target, IContract>? creator, out failureException)) 99[NotNullWhen(true)] out Func<Target, IContract>? creator,
Microsoft.Diagnostics.DataContractReader.Abstractions (1)
ContractRegistry.cs (1)
211public abstract void Register<TContract>(string version, Func<Target, TContract> creator)
Microsoft.Diagnostics.DataContractReader.Contracts (6)
Contracts\CodeVersions_1.cs (1)
256private IEnumerable<NativeCodeVersionHandle> FindNativeCodeVersionNodes(IRuntimeTypeSystem rts, MethodDescHandle md, Func<Data.NativeCodeVersionNode, bool> predicate)
Contracts\ExecutionManager\Helpers\BinaryThenLinearSearch.cs (2)
15Func<uint, bool> compare, 16Func<uint, bool> match,
Contracts\StressLog.cs (3)
15StressMsgData GetStressMsgData(Data.StressMsg msg, Func<ulong, TargetPointer> getFormatPointerFromOffset); 278public StressMsgData GetStressMsgData(Data.StressMsg msg, Func<ulong, TargetPointer> getFormatPointerFromOffset) 308public StressMsgData GetStressMsgData(Data.StressMsg msg, Func<ulong, TargetPointer> getFormatPointerFromOffset)
Microsoft.DotNet.ApiCompat.Task (5)
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\ApiCompatServiceProvider.cs (2)
20public ApiCompatServiceProvider(Func<ISuppressionEngine, ISuppressibleLog> logFactory, 22Func<ISuppressibleLog, IRuleFactory> ruleFactory,
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\RoslynResolver.cs (1)
43private Assembly? LoadRoslyn(AssemblyName name, Func<string, Assembly> loadFromPath)
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\ValidateAssemblies.cs (1)
13public static int Run(Func<ISuppressionEngine, ISuppressibleLog> logFactory,
src\sdk\src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Shared\ValidatePackage.cs (1)
14public static int Run(Func<ISuppressionEngine, ISuppressibleLog> logFactory,
Microsoft.DotNet.ApiCompatibility (3)
ApiComparer.cs (1)
26Func<IRuleRunner, IElementMapperFactory>? elementMapperFactory = null)
ApiComparerFactory.cs (1)
17Func<IRuleRunner, IElementMapperFactory>? elementMapperFactory = null) : IApiComparerFactory
Rules\CannotChangeGenericConstraints.cs (1)
140void CompareBoolConstraint(Func<ITypeParameterSymbol, bool> boolConstraint, string constraintName)
Microsoft.DotNet.Build.Tasks.Packaging (7)
Extensions.cs (2)
140public static void UpdateMember<T1, T2>(this T1 target, Expression<Func<T1, T2>> memberLamda, T2 value) 162public static void AddRangeToMember<T, TItem>(this T target, Expression<Func<T, ICollection<TItem>>> memberLamda, IEnumerable<TItem> value)
FilterUnknownPackages.cs (1)
37Func<string, bool> isKnownPackage;
NuGetPack.cs (3)
167Func<string, string> nuspecPropertyProvider = GetNuspecPropertyProviderFunction(NuspecProperties); 202private static Func<string, string> GetNuspecPropertyProviderFunction(ITaskItem[] nuspecProperties) 207private Manifest GetManifest(string nuspecPath, Func<string, string> nuspecPropertyProvider, bool isPackedPackage)
NugetPropertyStringProvider.cs (1)
29public static Func<string, string> GetNuspecPropertyProviderFunction(string[] nuspecPropertyStrings)
Microsoft.DotNet.Cli.CommandLine (13)
ForwardedOptionExtensions.cs (12)
16private static readonly Dictionary<Symbol, Func<ParseResult, IEnumerable<string>>> s_forwardingFunctions = []; 28public Func<ParseResult, IEnumerable<string>>? ForwardingFunction => s_forwardingFunctions.GetValueOrDefault(option); 37private Func<ParseResult, IEnumerable<string>> GetForwardingFunction(Func<TValue, IEnumerable<string>> func) 60private Func<ParseResult, IEnumerable<string>> GetForwardingFunction(Func<TValue, ParseResult, IEnumerable<string>> func) 83public Option<TValue> SetForwardingFunction(Func<TValue?, IEnumerable<string>> func) 96public Option<TValue> SetForwardingFunction(Func<TValue, string> format) 123public Option<TValue> ForwardAsMany(Func<TValue?, IEnumerable<string>> format) => option.SetForwardingFunction(format); 140public Option<TValue> ForwardAsSingle(Func<TValue, string> format) => option.SetForwardingFunction(format); 148if (s_forwardingFunctions.TryGetValue(option, out var existingFunc)) 151Func<ParseResult, IEnumerable<string>> wrapped = pr => 226var func = command.Options?
OptionBuilderExtensions.cs (1)
43public T AddCompletions(Func<CompletionContext, IEnumerable<CompletionItem>> completionSource)
Microsoft.DotNet.Cli.Definitions (29)
Help\HelpBuilder.cs (16)
16private Func<HelpContext, IEnumerable<Func<HelpContext, bool>>>? _getLayout; 46foreach (var writeSection in GetLayout(context)) 64Func<HelpContext, string?>? firstColumnText = null, 65Func<HelpContext, string?>? secondColumnText = null, 66Func<HelpContext, string?>? defaultValue = null) 85public void CustomizeLayout(Func<HelpContext, IEnumerable<Func<HelpContext, bool>>> getLayout) 442private static IEnumerable<T> RecurseWhileNotNull<T>(T? source, Func<T, T?> next) where T : class 495private IEnumerable<Func<HelpContext, bool>> GetLayout(HelpContext context) 543Func<HelpContext, string?>? getFirstColumn, 544Func<HelpContext, string?>? getSecondColumn, 545Func<HelpContext, string?>? getDefaultValue) 552public Func<HelpContext, string?>? GetFirstColumn { get; } 554public Func<HelpContext, string?>? GetSecondColumn { get; } 556public Func<HelpContext, string?>? GetDefaultValue { get; }
Help\HelpBuilder.Default.cs (8)
58static string? GetUsageLabel(string? helpName, Type valueType, List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, Symbol symbol, ArgumentArity arity) 101public static IEnumerable<Func<HelpContext, bool>> GetLayout() 114public static Func<HelpContext, bool> SynopsisSection() => 124public static Func<HelpContext, bool> CommandUsageSection() => 134public static Func<HelpContext, bool> CommandArgumentsSection() => 152public static Func<HelpContext, bool> SubcommandsSection() => 158public static Func<HelpContext, bool> OptionsSection() => 217public static Func<HelpContext, bool> AdditionalArgumentsSection() =>
src\sdk\src\Resolvers\Microsoft.DotNet.NativeWrapper\EnvironmentProvider.cs (5)
14private readonly Func<string, string?> _getEnvironmentVariable; 17public EnvironmentProvider(Func<string, string?> getEnvironmentVariable) 21public EnvironmentProvider(Func<string, string?> getEnvironmentVariable, Func<string?> getCurrentProcessPath) 114public static string? GetDotnetExeDirectory(Func<string, string?>? getEnvironmentVariable = null, Action<FormattableString>? log = null) 124public static string? GetDotnetExeDirectory(Func<string, string?> getEnvironmentVariable, Func<string?>? getCurrentProcessPath, Action<FormattableString>? log = null)
Microsoft.DotNet.Cli.Utils (7)
ArgumentEscaper.cs (1)
89public static string EscapeSingleArg(string arg, Func<string, bool>? additionalShouldSurroundWithQuotes = null)
BuiltInCommand.cs (3)
12private readonly Func<string[], int> _builtInCommand; 21public BuiltInCommand(string commandName, IEnumerable<string> commandArgs, Func<string[], int> builtInCommand) 26internal BuiltInCommand(string commandName, IEnumerable<string> commandArgs, Func<string[], int> builtInCommand, IBuiltInCommandEnvironment environment)
ExponentialRetry.cs (2)
34Func<T, bool> shouldStopRetry, 62Func<T, bool> shouldStopRetry,
TelemetryEventEntry.cs (1)
73public TelemetryEntryFormat WithAppliedToPropertiesValue(Func<string, string> func)
Microsoft.DotNet.Configurer (2)
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (2)
11private readonly Func<string, string?> _getEnvironmentVariable; 25public CliFolderPathCalculatorCore(Func<string, string?> getEnvironmentVariable)
Microsoft.DotNet.GenFacades (1)
RoslynBuildTask.cs (1)
39private Assembly LoadRoslyn(AssemblyName name, Func<string, Assembly> loadFromPath)
Microsoft.DotNet.HotReload.Utils.Generator (4)
DeltaProject.cs (1)
59Func<DeltaNaming, DeltaOutputStreams>? makeOutputs = default,
Runner.cs (3)
44protected Func<DeltaNaming,DeltaOutputStreams>? MakeOutputs {get; set; } = null; 51protected Func<CancellationToken,Task>? OutputsDone {get; set;} = null; 108Func<DeltaNaming,DeltaOutputStreams>? makeOutputs = null,
Microsoft.DotNet.HotReload.Watch (10)
Build\ProjectBuildManager.cs (1)
36Func<ProjectInstance, bool> onFailure,
Build\ProjectGraphUtilities.cs (1)
122private static IEnumerable<ProjectGraphNode> GetTransitiveProjects(IEnumerable<ProjectGraphNode> projects, Func<ProjectGraphNode, IEnumerable<ProjectGraphNode>> getEdges)
src\sdk\src\Dotnet.Watch\AspireService\Helpers\ImmutableInterlockedExtensions.cs (1)
16public static (T oldValue, T newValue) Transform<T>(ref T location, Func<T, T> transformer) where T : class?
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClient.cs (1)
141protected Task<bool> QueueUpdateBatch(Func<int, ValueTask<bool>> sendAndReceive, CancellationToken applyOperationCancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\AbstractBrowserRefreshServer.cs (3)
28Func<int, ILogger> connectionServerLoggerFactory, 29Func<int, ILogger> connectionAgentLoggerFactory) : IDisposable 269Func<string?, TRequest>? request,
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\BrowserRefreshServer.cs (2)
26Func<int, ILogger> connectionServerLoggerFactory, 27Func<int, ILogger> connectionAgentLoggerFactory,
UI\ConsoleInputReader.cs (1)
12public async Task<ConsoleKeyInfo> GetKeyAsync(string prompt, Func<ConsoleKeyInfo, bool> validateInput, CancellationToken cancellationToken)
Microsoft.DotNet.NativeWrapper (11)
EnvironmentProvider.cs (5)
14private readonly Func<string, string?> _getEnvironmentVariable; 17public EnvironmentProvider(Func<string, string?> getEnvironmentVariable) 21public EnvironmentProvider(Func<string, string?> getEnvironmentVariable, Func<string?> getCurrentProcessPath) 114public static string? GetDotnetExeDirectory(Func<string, string?>? getEnvironmentVariable = null, Action<FormattableString>? log = null) 124public static string? GetDotnetExeDirectory(Func<string, string?> getEnvironmentVariable, Func<string?>? getCurrentProcessPath, Action<FormattableString>? log = null)
HostFxrLocator.cs (3)
26Func<string, bool> directoryExists, 27Func<string, string[]> getDirectories, 28Func<string, bool> fileExists)
src\sdk\src\Common\HostFxrPathResolver.cs (3)
32Func<string, bool> directoryExists, 33Func<string, string[]> getDirectories, 34Func<string, bool> fileExists)
Microsoft.DotNet.SdkResolver (2)
NETCoreSdkResolver.cs (2)
14private readonly Func<string, string?> _getEnvironmentVariable; 29public NETCoreSdkResolver(Func<string, string?> getEnvironmentVariable, VSSettings vsSettings)
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\XmlParsingHelpers.cs (2)
32Func<T, string> selector) 39Func<T, string> selector)
Microsoft.DotNet.TemplateLocator (12)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (1)
69internal SdkDirectoryWorkloadManifestProvider(string? sdkRootPath, string? sdkVersion, Func<string, string?> getEnvironmentVariable, string? userProfileDir, string? globalJsonPath = null, string? workloadSetVersion = null)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.cs (2)
323private static List<T> ReadStringArray<T>(ref Utf8JsonStreamReader reader, Func<string, T> map) 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (2)
18static readonly Func<string, bool> _fileExists = File.Exists; 21internal static string? GetLocalizationCatalogFilePath(string manifestFilePath, CultureInfo culture, Func<string, bool> fileExists)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (5)
25private Func<string, bool>? _fileExistOverride; 26private Func<string, bool>? _directoryExistOverride; 28public static WorkloadResolver Create(IWorkloadManifestProvider manifestProvider, string dotnetRootPath, string sdkVersion, string? userProfileDir, Func<string, string?>? getEnvironmentVariable = null) 253internal void ReplaceFilesystemChecksForTest(Func<string, bool> fileExists, Func<string, bool> directoryExists)
TemplateLocator.cs (2)
15private readonly Func<string, string?> _getEnvironmentVariable; 26public TemplateLocator(Func<string, string?> getEnvironmentVariable, Func<string>? getCurrentProcessPath, VSSettings vsSettings,
Microsoft.DotNet.XliffTasks (1)
EnumerableExtensions.cs (1)
11public static bool IsSorted<T, U>(this IEnumerable<T> source, Func<T, U> keySelector, IComparer<U> comparer)
Microsoft.Extensions.AI (35)
ChatCompletion\ChatClientBuilder.cs (3)
15private readonly Func<IServiceProvider, IChatClient> _innerClientFactory; 31public ChatClientBuilder(Func<IServiceProvider, IChatClient> innerClientFactory) 70public ChatClientBuilder Use(Func<IChatClient, IChatClient> clientFactory)
ChatCompletion\ChatClientBuilderServiceCollectionExtensions.cs (2)
42Func<IServiceProvider, IChatClient> innerClientFactory, 86Func<IServiceProvider, IChatClient> innerClientFactory,
Common\FunctionInvocationProcessor.cs (4)
26private readonly Func<Activity?, bool> _isSensitiveDataEnabled; 43Func<Activity?, bool>? isSensitiveDataEnabled = null) 64Func<string, AITool?> findTool, 108Func<string, AITool?> findTool,
Embeddings\EmbeddingGeneratorBuilder.cs (3)
18private readonly Func<IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> _innerGeneratorFactory; 34public EmbeddingGeneratorBuilder(Func<IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> innerGeneratorFactory) 74public EmbeddingGeneratorBuilder<TInput, TEmbedding> Use(Func<IEmbeddingGenerator<TInput, TEmbedding>, IEmbeddingGenerator<TInput, TEmbedding>> generatorFactory)
Embeddings\EmbeddingGeneratorBuilderServiceCollectionExtensions.cs (2)
47Func<IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> innerGeneratorFactory, 99Func<IServiceProvider, IEmbeddingGenerator<TInput, TEmbedding>> innerGeneratorFactory,
Files\HostedFileClientBuilder.cs (3)
16private readonly Func<IServiceProvider, IHostedFileClient> _innerClientFactory; 33public HostedFileClientBuilder(Func<IServiceProvider, IHostedFileClient> innerClientFactory) 72public HostedFileClientBuilder Use(Func<IHostedFileClient, IHostedFileClient> clientFactory)
Image\ImageGeneratorBuilder.cs (3)
16private readonly Func<IServiceProvider, IImageGenerator> _innerGeneratorFactory; 33public ImageGeneratorBuilder(Func<IServiceProvider, IImageGenerator> innerGeneratorFactory) 68public ImageGeneratorBuilder Use(Func<IImageGenerator, IImageGenerator> generatorFactory)
Image\ImageGeneratorBuilderServiceCollectionExtensions.cs (2)
38Func<IServiceProvider, IImageGenerator> innerGeneratorFactory, 75Func<IServiceProvider, IImageGenerator> innerGeneratorFactory,
Realtime\RealtimeClientBuilder.cs (3)
16private readonly Func<IServiceProvider, IRealtimeClient> _innerClientFactory; 32public RealtimeClientBuilder(Func<IServiceProvider, IRealtimeClient> innerClientFactory) 70public RealtimeClientBuilder Use(Func<IRealtimeClient, IRealtimeClient> clientFactory)
SpeechToText\SpeechToTextClientBuilder.cs (3)
16private readonly Func<IServiceProvider, ISpeechToTextClient> _innerClientFactory; 31public SpeechToTextClientBuilder(Func<IServiceProvider, ISpeechToTextClient> innerClientFactory) 65public SpeechToTextClientBuilder Use(Func<ISpeechToTextClient, ISpeechToTextClient> clientFactory)
SpeechToText\SpeechToTextClientBuilderServiceCollectionExtensions.cs (2)
36Func<IServiceProvider, ISpeechToTextClient> innerClientFactory, 71Func<IServiceProvider, ISpeechToTextClient> innerClientFactory,
TextToSpeech\TextToSpeechClientBuilder.cs (3)
16private readonly Func<IServiceProvider, ITextToSpeechClient> _innerClientFactory; 31public TextToSpeechClientBuilder(Func<IServiceProvider, ITextToSpeechClient> innerClientFactory) 65public TextToSpeechClientBuilder Use(Func<ITextToSpeechClient, ITextToSpeechClient> clientFactory)
TextToSpeech\TextToSpeechClientBuilderServiceCollectionExtensions.cs (2)
40Func<IServiceProvider, ITextToSpeechClient> innerClientFactory, 79Func<IServiceProvider, ITextToSpeechClient> innerClientFactory,
Microsoft.Extensions.AI.Abstractions (17)
ChatCompletion\ChatOptions.cs (1)
221public Func<IChatClient, object?>? RawRepresentationFactory { get; set; }
ChatCompletion\ChatResponseExtensions.cs (1)
82public static void AddMessages(this IList<ChatMessage> list, ChatResponseUpdate update, Func<AIContent, bool>? filter = null)
Contents\FunctionCallContent.cs (1)
81Func<TEncoding, IDictionary<string, object?>?> argumentParser)
Embeddings\EmbeddingGenerationOptions.cs (1)
70public Func<IEmbeddingGenerator, object?>? RawRepresentationFactory { get; set; }
Files\HostedFileClientOptions.cs (1)
90public Func<IHostedFileClient, object?>? RawRepresentationFactory { get; set; }
Functions\AIFunctionFactory.cs (6)
402/// an instance method and a <see cref="Func{AIFunctionArguments,Object}"/> for constructing an instance of 494Func<AIFunctionArguments, object> createInstanceFunc, 560Func<AIFunctionArguments, object> createInstanceFunc, 588Func<AIFunctionArguments, object> createInstanceFunc, 598public Func<AIFunctionArguments, object>? CreateInstanceFunc { get; } 1276Func<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions>? GetBindParameterOptions,
Functions\AIFunctionFactoryOptions.cs (1)
85public Func<ParameterInfo, ParameterBindingOptions>? ConfigureParameterBinding { get; set; }
Image\ImageGenerationOptions.cs (1)
77public Func<IImageGenerator, object?>? RawRepresentationFactory { get; set; }
SpeechToText\SpeechToTextOptions.cs (1)
68public Func<ISpeechToTextClient, object?>? RawRepresentationFactory { get; set; }
TextToSpeech\TextToSpeechOptions.cs (1)
98public Func<ITextToSpeechClient, object?>? RawRepresentationFactory { get; set; }
Utilities\AIJsonSchemaCreateOptions.cs (2)
37public Func<ParameterInfo, bool>? IncludeParameter { get; init; } 49public Func<ParameterInfo, string?>? ParameterDescriptionProvider { get; init; }
Microsoft.Extensions.AI.Abstractions.Tests (13)
ChatCompletion\ChatOptionsTests.cs (1)
81Func<IChatClient, object?> rawRepresentationFactory = (c) => null;
ChatRouting\RoutingChatClientTests.cs (2)
145private readonly Func<RoutingContext, IChatClient> _select; 147public DelegatingTestRouter(Func<RoutingContext, IChatClient> select)
Embeddings\EmbeddingGenerationOptionsTests.cs (1)
44Func<IEmbeddingGenerator?, object?> rawRepresentationFactory = (c) => null;
Files\HostedFileClientOptionsTests.cs (1)
36Func<IHostedFileClient, object?> factory = _ => "raw";
Image\ImageGenerationOptionsTests.cs (1)
39Func<IImageGenerator, object?> factory = generator => new { Representation = "raw data" };
SpeechToText\SpeechToTextOptionsTests.cs (1)
38Func<ISpeechToTextClient?, object?> rawRepresentationFactory = (c) => null;
TestRealtimeClientSession.cs (1)
18public Func<CancellationToken, IAsyncEnumerable<RealtimeServerMessage>>? GetStreamingResponseAsyncCallback { get; set; }
TextToSpeech\TextToSpeechOptionsTests.cs (1)
46Func<ITextToSpeechClient?, object?> rawRepresentationFactory = (c) => null;
Utilities\AIJsonUtilitiesTests.cs (4)
106case null when property.PropertyType == typeof(Func<ParameterInfo, bool>): 107Func<ParameterInfo, bool> includeParameter = static (parameter) => true; 112case null when property.PropertyType == typeof(Func<ParameterInfo, string?>): 113Func<ParameterInfo, string?> parameterDescriptionProvider = static (parameter) => "description";
Microsoft.Extensions.AI.Evaluation (5)
EvaluationMetricExtensions.cs (1)
65Func<EvaluationDiagnostic, bool>? predicate = null)
EvaluationResultExtensions.cs (2)
93Func<EvaluationDiagnostic, bool>? predicate = null) 113Func<EvaluationMetric, EvaluationMetricInterpretation?> interpretationProvider)
Utilities\TaskExtensions.cs (2)
16this IEnumerable<Func<CancellationToken, Task<T>>> functions, 25this IEnumerable<Func<CancellationToken, ValueTask<T>>> functions,
Microsoft.Extensions.AI.Evaluation.Reporting (6)
ReportingConfiguration.cs (2)
90public Func<EvaluationMetric, EvaluationMetricInterpretation?>? EvaluationMetricInterpreter { get; } 142Func<EvaluationMetric, EvaluationMetricInterpretation?>? evaluationMetricInterpreter = null,
ScenarioRun.cs (2)
97private readonly Func<EvaluationMetric, EvaluationMetricInterpretation?>? _evaluationMetricInterpreter; 110Func<EvaluationMetric, EvaluationMetricInterpretation?>? evaluationMetricInterpreter = null,
ScenarioRunResultExtensions.cs (1)
31Func<EvaluationDiagnostic, bool>? predicate = null)
Storage\DiskBasedReportingConfiguration.cs (1)
77Func<EvaluationMetric, EvaluationMetricInterpretation?>? evaluationMetricInterpreter = null,
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Storage\AzureStorageReportingConfiguration.cs (1)
77Func<EvaluationMetric, EvaluationMetricInterpretation?>? evaluationMetricInterpreter = null,
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
431Func<string, AIFunction> createWithSchema = schema =>
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIHostedFileClientTests.cs (1)
906private sealed class RoutingHandler(Func<HttpRequestMessage, HttpResponseMessage> handler) : HttpMessageHandler
Microsoft.Extensions.AI.Stabilization.Tests (1)
parent\Microsoft.Extensions.AI.Abstractions.Tests\Image\ImageGenerationOptionsTests.cs (1)
39Func<IImageGenerator, object?> factory = generator => new { Representation = "raw data" };
Microsoft.Extensions.AI.Tests (48)
ChatCompletion\ChatClientBuilderTest.cs (1)
68Assert.Throws<ArgumentNullException>("innerClientFactory", () => new ChatClientBuilder((Func<IServiceProvider, IChatClient>)null!));
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (6)
1469Func<ChatClientBuilder, ChatClientBuilder> configurePipeline = b => b.Use(s => new FunctionInvokingChatClient(s)); 1545Func<ChatClientBuilder, ChatClientBuilder> configurePipeline = b => b.Use(s => new FunctionInvokingChatClient(s)); 1937Func<ChatClientBuilder, ChatClientBuilder>? configurePipeline = null, 1954Func<ChatClientBuilder, ChatClientBuilder>? configurePipeline = null, 2025Func<ChatClientBuilder, ChatClientBuilder>? configurePipeline = null, 2042Func<ChatClientBuilder, ChatClientBuilder>? configurePipeline = null,
ChatCompletion\FunctionInvokingChatClientTests.cs (26)
117Func<ChatClientBuilder, ChatClientBuilder> configure = builder => 150Func<ChatClientBuilder, ChatClientBuilder> configure = builder => 217Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use( 265Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use( 339Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use( 619Func<ChatClientBuilder, ChatClientBuilder> configurePipeline = pipeline => pipeline 834Func<ChatClientBuilder, ChatClientBuilder> configurePipeline = pipeline => pipeline 915Func<ChatClientBuilder, ChatClientBuilder> configurePipeline = pipeline => pipeline 1026Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use( 1053Func<ChatClientBuilder, ChatClientBuilder> configure = b => 1060async Task InvokeAsync(Func<IServiceProvider, Task> work) 1110Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use(c => 1501Func<ChatClientBuilder, ChatClientBuilder> configurePipeline = builder => builder 1524Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use( 1587Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use( 1619Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use(s => new FunctionInvokingChatClient(s) { TerminateOnUnknownCalls = false }); 1692Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use(c => 1803Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use(c => 1845Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use(c => 1967Func<ChatClientBuilder, ChatClientBuilder> configure = b => b.Use(c => 2202Func<ChatClientBuilder, ChatClientBuilder>? configurePipeline = null, 2272Func<ChatClientBuilder, ChatClientBuilder>? configurePipeline = null, 3263Func<ChatClientBuilder, ChatClientBuilder> configure = b => 3295Func<ChatClientBuilder, ChatClientBuilder> configure = b => 3328Func<ChatClientBuilder, ChatClientBuilder> configure = b => 3366Func<ChatClientBuilder, ChatClientBuilder> configure = b =>
ChatRouting\FailoverChatClientTests.cs (4)
1195private readonly Func<RoutingContext, IChatClient> _select; 1197public DelegatingTestRouter(Func<RoutingContext, IChatClient> select) 1210private readonly Func<RoutingContext, IChatClient> _select; 1214Func<RoutingContext, IChatClient> select,
Embeddings\EmbeddingGeneratorBuilderTests.cs (1)
68() => new EmbeddingGeneratorBuilder<string, Embedding<float>>((Func<IServiceProvider, IEmbeddingGenerator<string, Embedding<float>>>)null!));
Files\HostedFileClientBuilderTests.cs (2)
19Assert.Throws<ArgumentNullException>("innerClientFactory", () => new HostedFileClientBuilder((Func<IServiceProvider, IHostedFileClient>)null!)); 23Assert.Throws<ArgumentNullException>("clientFactory", () => builder.Use((Func<IHostedFileClient, IHostedFileClient>)null!));
Functions\AIFunctionFactoryTest.cs (4)
39AIFunctionFactory.Create(typeof(AIFunctionFactoryTest).GetMethod(nameof(InvalidArguments_Throw))!, (Func<AIFunctionArguments, object>)null!)); 272Func<string, string> dotnetFunc2 = a => a + " " + a; 492Func<ParameterInfo, AIFunctionFactoryOptions.ParameterBindingOptions> getBindParameterMode = _ => default; 1670Delegate testDelegate = dynamicMethod.CreateDelegate(typeof(Func<int, Task<int>>));
Image\ImageGeneratorBuilderTests.cs (1)
68Assert.Throws<ArgumentNullException>("innerGeneratorFactory", () => new ImageGeneratorBuilder((Func<IServiceProvider, IImageGenerator>)null!));
parent\Microsoft.Extensions.AI.Abstractions.Tests\TestRealtimeClientSession.cs (1)
18public Func<CancellationToken, IAsyncEnumerable<RealtimeServerMessage>>? GetStreamingResponseAsyncCallback { get; set; }
Realtime\RealtimeClientBuilderTests.cs (2)
25Assert.Throws<ArgumentNullException>("innerClientFactory", () => new RealtimeClientBuilder((Func<IServiceProvider, IRealtimeClient>)null!)); 54Assert.Throws<ArgumentNullException>("clientFactory", () => builder.Use((Func<IRealtimeClient, IRealtimeClient>)null!));
Microsoft.Extensions.Caching.Abstractions (8)
Hybrid\HybridCache.cs (4)
45public ValueTask<T> GetOrCreateAsync<T>(string key, Func<CancellationToken, ValueTask<T>> factory, 62Func<CancellationToken, ValueTask<T>> factory, 102Func<CancellationToken, ValueTask<T>> factory, 349public static readonly Func<Func<CancellationToken, ValueTask<T>>, CancellationToken, ValueTask<T>> Instance = static (callback, ct) => callback(ct);
MemoryCacheExtensions.cs (4)
170public static TItem? GetOrCreate<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory) 184public static TItem? GetOrCreate<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, TItem> factory, MemoryCacheEntryOptions? createOptions) 210public static Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory) 224public static async Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory, MemoryCacheEntryOptions? createOptions)
Microsoft.Extensions.Caching.Hybrid.Tests (3)
ExpirationTests.cs (1)
27Func<CancellationToken, ValueTask<Guid>> callback = static _ => new(Guid.NewGuid());
SizeTests.cs (2)
168Func<CancellationToken, ValueTask<MutablePoco>> func = _ => 234Func<CancellationToken, ValueTask<ImmutablePoco>> func = _ =>
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
642private void Compact(long removalSizeTarget, Func<CacheEntry, long> computeEntrySize, CoherentState coherentState) 704static void ExpirePriorityBucket(ref long removedSize, long removalSizeTarget, Func<CacheEntry, long> computeEntrySize, List<CacheEntry> entriesToRemove, List<(CacheEntry Entry, DateTime LastAccessed)> priorityEntries)
Microsoft.Extensions.Configuration.Abstractions (1)
ConfigurationRootExtensions.cs (1)
36public static string GetDebugView(this IConfigurationRoot root, Func<ConfigurationDebugViewContext, string>? processValue)
Microsoft.Extensions.Configuration.EnvironmentVariables (6)
EnvironmentVariablesConfigurationProvider.cs (2)
32private readonly Func<string, string> _transformation; 57public EnvironmentVariablesConfigurationProvider(string? prefix, Func<string, string>? variableNameTransformation)
EnvironmentVariablesConfigurationSource.cs (3)
18public static Func<string, string> DefaultTransformation { get; } = 35public static Func<string, string> ColonAndDotTransformation { get; } = TransformUnderscoresToColonAndDot; 99public Func<string, string>? VariableNameTransformation { get; set; }
EnvironmentVariablesExtensions.cs (1)
57Func<string, string>? variableNameTransformation)
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationSource.cs (1)
35public Func<string, bool> IgnoreCondition { get; set; }
Microsoft.Extensions.Configuration.Xml (2)
XmlDocumentDecryptor.cs (2)
26private readonly Func<XmlDocument, EncryptedXml>? _encryptedXmlFactory; 38internal XmlDocumentDecryptor(Func<XmlDocument, EncryptedXml> encryptedXmlFactory)
Microsoft.Extensions.DataIngestion.Tests (1)
Utils\ArrayUtils.cs (1)
10internal static TTo[,] Map<TFrom, TTo>(this TFrom[,] from, Func<TFrom, TTo> mapFunc)
Microsoft.Extensions.DependencyInjection (35)
ServiceLookup\CompiledServiceProviderEngine.cs (1)
23public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite) => ResolverBuilder.Build(callSite);
ServiceLookup\DynamicServiceProviderEngine.cs (1)
21public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (11)
35delegateType: typeof(Func<object?, object?>), 45private readonly ConcurrentDictionary<ServiceCacheKey, Func<ServiceProviderEngineScope, object>> _scopeResolverCache; 47private readonly Func<ServiceCacheKey, ServiceCallSite, Func<ServiceProviderEngineScope, object>> _buildTypeDelegate; 52_scopeResolverCache = new ConcurrentDictionary<ServiceCacheKey, Func<ServiceProviderEngineScope, object>>(); 56public Func<ServiceProviderEngineScope, object> Build(ServiceCallSite callSite) 67public Func<ServiceProviderEngineScope, object> BuildNoCache(ServiceCallSite callSite) 69Expression<Func<ServiceProviderEngineScope, object>> expression = BuildExpression(callSite); 74private Expression<Func<ServiceProviderEngineScope, object>> BuildExpression(ServiceCallSite callSite) 78return Expression.Lambda<Func<ServiceProviderEngineScope, object>>( 87return Expression.Lambda<Func<ServiceProviderEngineScope, object>>( 205Func<ServiceProviderEngineScope, object> lambda = Build(callSite);
ServiceLookup\Expressions\ExpressionsServiceProviderEngine.cs (1)
18public override Func<ServiceProviderEngineScope, object> RealizeService(ServiceCallSite callSite)
ServiceLookup\FactoryCallSite.cs (2)
10public Func<IServiceProvider, object> Factory { get; } 12public FactoryCallSite(ResultCache cache, Type serviceType, Func<IServiceProvider, object> factory) : base(cache, null)
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (7)
42public Func<IServiceProvider, object>[]? Factories; 47public Func<ServiceProviderEngineScope, object?> Lambda; 66public Func<ServiceProviderEngineScope, object?> Build(ServiceCallSite callSite) 124Lambda = (Func<ServiceProviderEngineScope, object?>)dynamicMethod.CreateDelegate(typeof(Func<ServiceProviderEngineScope, object?>), runtimeContext), 244argument.Factories ??= new List<Func<IServiceProvider, object>>(); 251argument.Generator.Emit(OpCodes.Ldelem, typeof(Func<IServiceProvider, object>));
ServiceLookup\ILEmit\ILEmitResolverBuilderContext.cs (1)
15public List<Func<IServiceProvider, object>>? Factories { get; set; }
ServiceLookup\ILEmit\ILEmitServiceProviderEngine.cs (1)
19public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite)
ServiceLookup\RuntimeServiceProviderEngine.cs (1)
15public override Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite)
ServiceLookup\ServiceLookupHelpers.cs (2)
17internal static readonly MethodInfo InvokeFactoryMethodInfo = typeof(Func<IServiceProvider, object>) 18.GetMethod(nameof(Func<IServiceProvider, object>.Invoke), LookupFlags)!;
ServiceLookup\ServiceProviderEngine.cs (1)
10public abstract Func<ServiceProviderEngineScope, object?> RealizeService(ServiceCallSite callSite);
ServiceLookup\StackGuard.cs (2)
50private R RunOnEmptyStackCore<R>(Func<object, R> action, object state) 57Task<R> task = Task.Factory.StartNew((Func<object?, R>)action, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
ServiceProvider.cs (4)
24private readonly Func<ServiceIdentifier, ServiceAccessor> _createServiceAccessor; 272Func<ServiceProviderEngineScope, object?> realizedService = _engine.RealizeService(callSite); 278internal void ReplaceServiceAccessor(ServiceCallSite callSite, Func<ServiceProviderEngineScope, object?> accessor) 356public Func<ServiceProviderEngineScope, object?>? RealizedService { get; set; }
Microsoft.Extensions.DependencyInjection.Abstractions (36)
Extensions\ServiceCollectionDescriptorExtensions.cs (12)
147/// <seealso cref="ServiceCollectionServiceExtensions.AddTransient(IServiceCollection, Type, Func{IServiceProvider, object})"/> 151Func<IServiceProvider, object> implementationFactory) 202/// <seealso cref="ServiceCollectionServiceExtensions.AddTransient{TService}(IServiceCollection, Func{IServiceProvider, TService})"/> 205Func<IServiceProvider, TService> implementationFactory) 259/// <seealso cref="ServiceCollectionServiceExtensions.AddScoped(IServiceCollection, Type, Func{IServiceProvider, object})"/> 263Func<IServiceProvider, object> implementationFactory) 314/// <seealso cref="ServiceCollectionServiceExtensions.AddScoped{TService}(IServiceCollection, Func{IServiceProvider, TService})"/> 317Func<IServiceProvider, TService> implementationFactory) 371/// <seealso cref="ServiceCollectionServiceExtensions.AddSingleton(IServiceCollection, Type, Func{IServiceProvider, object})"/> 375Func<IServiceProvider, object> implementationFactory) 445/// <seealso cref="ServiceCollectionServiceExtensions.AddSingleton{TService}(IServiceCollection, Func{IServiceProvider, TService})"/> 448Func<IServiceProvider, TService> implementationFactory)
ServiceCollectionServiceExtensions.cs (10)
59Func<IServiceProvider, object> implementationFactory) 153Func<IServiceProvider, TService> implementationFactory) 181Func<IServiceProvider, TImplementation> implementationFactory) 236Func<IServiceProvider, object> implementationFactory) 330Func<IServiceProvider, TService> implementationFactory) 358Func<IServiceProvider, TImplementation> implementationFactory) 414Func<IServiceProvider, object> implementationFactory) 508Func<IServiceProvider, TService> implementationFactory) 536Func<IServiceProvider, TImplementation> implementationFactory) 614Func<IServiceProvider, object> implementationFactory,
ServiceDescriptor.cs (14)
91Func<IServiceProvider, object> factory, 121Func<IServiceProvider, object> nullKeyedFactory = sp => factory(sp, null); 224public Func<IServiceProvider, object>? ImplementationFactory => IsKeyedService ? null : (Func<IServiceProvider, object>?) _implementationFactory; 433Func<IServiceProvider, TImplementation> implementationFactory) 472public static ServiceDescriptor Transient<TService>(Func<IServiceProvider, TService> implementationFactory) 505public static ServiceDescriptor Transient(Type service, Func<IServiceProvider, object> implementationFactory) 604Func<IServiceProvider, TImplementation> implementationFactory) 643public static ServiceDescriptor Scoped<TService>(Func<IServiceProvider, TService> implementationFactory) 676public static ServiceDescriptor Scoped(Type service, Func<IServiceProvider, object> implementationFactory) 782Func<IServiceProvider, TImplementation> implementationFactory) 821public static ServiceDescriptor Singleton<TService>(Func<IServiceProvider, TService> implementationFactory) 858Func<IServiceProvider, object> implementationFactory) 1017public static ServiceDescriptor Describe(Type serviceType, Func<IServiceProvider, object> implementationFactory, ServiceLifetime lifetime)
Microsoft.Extensions.DependencyInjection.AutoActivation (5)
AutoActivationExtensions.cs (5)
97public static IServiceCollection AddActivatedSingleton<TService, TImplementation>(this IServiceCollection services, Func<IServiceProvider, TImplementation> implementationFactory) 134public static IServiceCollection AddActivatedSingleton<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory) 190Func<IServiceProvider, object> implementationFactory) 261public static void TryAddActivatedSingleton(this IServiceCollection services, Type serviceType, Func<IServiceProvider, object> implementationFactory) 304public static void TryAddActivatedSingleton<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory)
Microsoft.Extensions.Diagnostics.HealthChecks (10)
DefaultHealthCheckService.cs (1)
39Func<HealthCheckRegistration, bool>? predicate,
DelegateHealthCheck.cs (2)
16private readonly Func<CancellationToken, Task<HealthCheckResult>> _check; 22public DelegateHealthCheck(Func<CancellationToken, Task<HealthCheckResult>> check)
DependencyInjection\HealthChecksBuilderDelegateExtensions.cs (4)
74Func<CancellationToken, HealthCheckResult> check, 93Func<CancellationToken, HealthCheckResult> check, 160Func<CancellationToken, Task<HealthCheckResult>> check, 179Func<CancellationToken, Task<HealthCheckResult>> check,
HealthCheckPublisherHostedService.cs (1)
184var withOptionsPredicate = (HealthCheckRegistration r) =>
HealthCheckPublisherOptions.cs (1)
78public Func<HealthCheckRegistration, bool>? Predicate { get; set; }
HealthCheckService.cs (1)
61Func<HealthCheckRegistration, bool>? predicate,
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (4)
HealthCheckRegistration.cs (4)
26private Func<IServiceProvider, IHealthCheck> _factory; 85Func<IServiceProvider, IHealthCheck> factory, 105Func<IServiceProvider, IHealthCheck> factory, 128public Func<IServiceProvider, IHealthCheck> Factory
Microsoft.Extensions.Diagnostics.Probes (4)
KubernetesProbesExtensions.cs (3)
64var originalPredicate = options.FilterChecks; 81var originalPredicate = options.FilterChecks; 98var originalPredicate = options.FilterChecks;
TcpEndpointProbesOptions.cs (1)
52public Func<HealthCheckRegistration, bool>? FilterChecks { get; set; }
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
MockHealthCheckService.cs (1)
18public override Task<HealthReport> CheckHealthAsync(Func<HealthCheckRegistration, bool>? predicate, CancellationToken cancellationToken = default)
Microsoft.Extensions.Diagnostics.Testing (10)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (6)
1247public static void BindCore(IConfiguration configuration, ref Func<FakeLogRecord, bool> instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) 1249ValidateConfigurationKeys(typeof(Func<FakeLogRecord, bool>), s_configKeys_FuncFakeLogRecordBoolean, configuration, binderOptions); 1345public static void BindCore(IConfiguration configuration, ref Func<FakeLogRecord, string> instance, bool defaultValueIfNotFound, BinderOptions? binderOptions) 1347ValidateConfigurationKeys(typeof(Func<FakeLogRecord, string>), s_configKeys_FuncFakeLogRecordString, configuration, binderOptions); 1385Func<FakeLogRecord, bool>? temp250 = instance.CustomFilter; 1436Func<FakeLogRecord, string>? temp260 = instance.OutputFormatter;
Logging\FakeLogCollector.cs (1)
140var customFilter = _options.CustomFilter;
Logging\FakeLogCollectorOptions.cs (2)
45public Func<FakeLogRecord, bool>? CustomFilter { get; set; } 74public Func<FakeLogRecord, string> OutputFormatter { get; set; } = FakeLogRecord.Formatter;
Metrics\MetricCollector.cs (1)
270private void Initialize(Func<Instrument, bool> instrumentPredicate)
Microsoft.Extensions.Features (3)
FeatureReferences.cs (3)
96Func<TState, TFeature?> factory) where TFeature : class? 112private TFeature? UpdateCached<TFeature, TState>(ref TFeature? cached, TState state, Func<TState, TFeature?> factory, int revision, bool flush) where TFeature : class? 143public TFeature? Fetch<TFeature>(ref TFeature? cached, Func<IFeatureCollection, TFeature?> factory)
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFilesWatcher.cs (1)
423void CancelAll(ConcurrentDictionary<string, ChangeTokenInfo> tokens, Func<string, bool> requiresSubdirectories)
Microsoft.Extensions.Hosting (4)
HostApplicationBuilder.cs (1)
377public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) where TContainerBuilder : notnull
HostBuilder.cs (1)
122public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) where TContainerBuilder : notnull
Internal\ServiceFactoryAdapter.cs (2)
14private readonly Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>>? _factoryResolver; 23public ServiceFactoryAdapter(Func<HostBuilderContext> contextResolver, Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factoryResolver)
Microsoft.Extensions.Hosting.Abstractions (2)
IHostBuilder.cs (1)
63IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) where TContainerBuilder : notnull
ServiceCollectionHostedServiceExtensions.cs (1)
63public static IServiceCollection AddHostedService<THostedService>(this IServiceCollection services, Func<IServiceProvider, THostedService> implementationFactory)
Microsoft.Extensions.Hosting.Testing (1)
FakeHostBuilder.cs (1)
83public IHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<HostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory)
Microsoft.Extensions.Hosting.Testing.Tests (1)
FakeHostBuilderTests.cs (1)
193var functor = (HostBuilderContext _) => factory;
Microsoft.Extensions.Http (23)
DefaultHttpClientFactory.cs (1)
26private readonly Func<string, Lazy<ActiveHandlerTrackingEntry>> _entryFactory;
DependencyInjection\HttpClientBuilderExtensions.cs (8)
103public static IHttpClientBuilder AddHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, DelegatingHandler> configureHandler) 184public static IHttpClientBuilder ConfigurePrimaryHttpMessageHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpMessageHandler> configureHandler) 472/// Calling <see cref="HttpClientBuilderExtensions.AddTypedClient{TClient}(IHttpClientBuilder,Func{HttpClient,TClient})"/> 476public static IHttpClientBuilder AddTypedClient<TClient>(this IHttpClientBuilder builder, Func<HttpClient, TClient> factory) 485internal static IHttpClientBuilder AddTypedClientCore<TClient>(this IHttpClientBuilder builder, Func<HttpClient, TClient> factory, bool validateSingleType) 551/// Sets the <see cref="Func{T, R}"/> which determines whether to redact the HTTP header value given its corresponding header name before logging. 554/// <param name="shouldRedactHeaderValue">The <see cref="Func{T, R}"/> which determines whether to redact the HTTP header value given its corresponding header name before logging.</param> 558public static IHttpClientBuilder RedactLoggedHeaders(this IHttpClientBuilder builder, Func<string, bool> shouldRedactHeaderValue)
DependencyInjection\HttpClientBuilderExtensions.Logging.cs (1)
46public static IHttpClientBuilder AddLogger(this IHttpClientBuilder builder, Func<IServiceProvider, IHttpClientLogger> httpClientLoggerFactory, bool wrapHandlersPipeline = false)
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (2)
707public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, Func<HttpClient, TImplementation> factory) 746public static IHttpClientBuilder AddHttpClient<TClient, TImplementation>(this IServiceCollection services, string name, Func<HttpClient, TImplementation> factory)
HttpClientFactoryOptions.cs (2)
74/// Gets or sets the <see cref="Func{T, R}"/> that determines whether to redact the HTTP header value before logging. 76public Func<string, bool> ShouldRedactHeaderValue { get; set; } = LogHelper.ShouldRedactHeaderValue;
Logging\HttpHeadersLogValue.cs (2)
17private readonly Func<string, bool> _shouldRedactHeaderValue; 22public HttpHeadersLogValue(Kind kind, HttpHeaders headers, HttpHeaders? contentHeaders, Func<string, bool> shouldRedactHeaderValue)
Logging\LoggingHttpMessageHandler.cs (1)
56Func<string, bool> shouldRedactHeaderValue = _options?.ShouldRedactHeaderValue ?? LogHelper.ShouldRedactHeaderValue;
Logging\LoggingScopeHttpMessageHandler.cs (1)
57Func<string, bool> shouldRedactHeaderValue = _options?.ShouldRedactHeaderValue ?? LogHelper.ShouldRedactHeaderValue;
Logging\LogHelper.cs (5)
33public static readonly Func<string, bool> ShouldRedactHeaderValue = (header) => true; 68public static void LogRequestStart(this ILogger logger, HttpRequestMessage request, Func<string, bool> shouldRedactHeaderValue) 87public static void LogRequestEnd(this ILogger logger, HttpResponseMessage response, TimeSpan duration, Func<string, bool> shouldRedactHeaderValue) 111public static void LogRequestPipelineStart(this ILogger logger, HttpRequestMessage request, string? formattedUri, Func<string, bool> shouldRedactHeaderValue) 126public static void LogRequestPipelineEnd(this ILogger logger, HttpResponseMessage response, TimeSpan duration, Func<string, bool> shouldRedactHeaderValue)
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\LoggingOptionsConfigureOptions.cs (1)
118private static void BindValue<T>(IConfigurationSection section, string key, Func<string, T> parser, Action<T> setter)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpClientLoggingExtensionsTest.cs (1)
738private sealed class TestMessageHandler(Func<HttpRequestMessage, HttpResponseMessage> responseFactory)
Microsoft.Extensions.Http.Polly (6)
DependencyInjection\PollyHttpClientBuilderExtensions.cs (3)
63Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector) 217Func<PolicyBuilder<HttpResponseMessage>, IAsyncPolicy<HttpResponseMessage>> configurePolicy) 254public static IHttpClientBuilder AddPolicyHandler(this IHttpClientBuilder builder, Func<IServiceProvider, HttpRequestMessage, string, IAsyncPolicy<HttpResponseMessage>> policyFactory, Func<HttpRequestMessage, string> keySelector)
PolicyHttpMessageHandler.cs (3)
47/// The <see cref="PollyHttpClientBuilderExtensions.AddTransientHttpErrorPolicy(IHttpClientBuilder, Func{PolicyBuilder{HttpResponseMessage}, IAsyncPolicy{HttpResponseMessage}})"/> 76private readonly Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> _policySelector; 96public PolicyHttpMessageHandler(Func<HttpRequestMessage, IAsyncPolicy<HttpResponseMessage>> policySelector)
Microsoft.Extensions.Http.Resilience (23)
Hedging\HttpStandardHedgingResilienceOptions.cs (2)
32/// <see cref="StandardHedgingHandlerBuilderExtensions.SelectPipelineBy(IStandardHedgingHandlerBuilder, Func{IServiceProvider, Func{System.Net.Http.HttpRequestMessage, string}})"/> extensions.
Hedging\StandardHedgingHandlerBuilderExtensions.cs (2)
96public static IStandardHedgingHandlerBuilder SelectPipelineBy(this IStandardHedgingHandlerBuilder builder, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
Polly\HttpRetryStrategyOptionsExtensions.cs (1)
49var shouldHandle = Throw.IfNullOrMemberNull(options, options?.ShouldHandle);
Resilience\HttpResiliencePipelineBuilderExtensions.cs (2)
37public static IHttpResiliencePipelineBuilder SelectPipelineBy(this IHttpResiliencePipelineBuilder builder, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
Resilience\HttpStandardResiliencePipelineBuilderExtensions.cs (2)
98public static IHttpStandardResiliencePipelineBuilder SelectPipelineBy(this IHttpStandardResiliencePipelineBuilder builder, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory)
Resilience\Internal\PipelineKeyOptions.cs (1)
14public Func<HttpRequestMessage, string>? KeyProvider { get; set; }
Resilience\Internal\PipelineKeyProviderHelper.cs (5)
21public static void SelectPipelineBy(IServiceCollection services, string pipelineName, Func<IServiceProvider, Func<HttpRequestMessage, string>> selectorFactory) 26public static Func<HttpRequestMessage, string>? GetPipelineKeyProvider(this IServiceProvider provider, string pipelineName) 31private static void UsePipelineKeyProvider(IServiceCollection services, string pipelineName, Func<IServiceProvider, Func<HttpRequestMessage, string>> factory)
Resilience\ResilienceHandler.cs (2)
20private readonly Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> _pipelineProvider; 27public ResilienceHandler(Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> pipelineProvider)
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (4)
70var selector = CreatePipelineSelector(serviceProvider, pipelineBuilder.PipelineName); 101private static Func<HttpRequestMessage, ResiliencePipeline<HttpResponseMessage>> CreatePipelineSelector(IServiceProvider serviceProvider, string pipelineName) 104var pipelineKeyProvider = serviceProvider.GetPipelineKeyProvider(pipelineName); 123private static void TouchPipelineKey(Func<HttpRequestMessage, string> provider)
Routing\Internal\RoutingHelper.cs (1)
12public static T SelectByWeight<T>(this IList<T> endpoints, Func<T, double> weightProvider, Randomizer randomizer)
Routing\RoutingStrategyBuilderExtensions.cs (1)
117internal static IRoutingStrategyBuilder ConfigureRoutingStrategy(this IRoutingStrategyBuilder builder, Func<IServiceProvider, Func<RequestRoutingStrategy>> factory)
Microsoft.Extensions.Http.Resilience.Tests (2)
Hedging\StandardHedgingTests.cs (1)
113var generator = options.Hedging.ActionGenerator;
Resilience\HttpClientBuilderExtensionsTests.BySelector.cs (1)
51var provider = PipelineKeyProviderHelper.GetPipelineKeyProvider(builder.Services.BuildServiceProvider(), builder.PipelineName)!;
Microsoft.Extensions.Localization (2)
IResourceNamesCache.cs (1)
20IList<string>? GetOrAdd(string name, Func<string, IList<string>?> valueFactory);
ResourceNamesCache.cs (1)
25public IList<string>? GetOrAdd(string name, Func<string, IList<string>?> valueFactory)
Microsoft.Extensions.Logging (8)
FilterLoggingBuilderExtensions.cs (8)
80public static ILoggingBuilder AddFilter(this ILoggingBuilder builder, Func<LogLevel, bool> levelFilter) => 97public static ILoggingBuilder AddFilter<T>(this ILoggingBuilder builder, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider => 135public static ILoggingBuilder AddFilter(this ILoggingBuilder builder, string? category, Func<LogLevel, bool> levelFilter) => 153public static ILoggingBuilder AddFilter<T>(this ILoggingBuilder builder, string? category, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider => 222public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<LogLevel, bool> levelFilter) => 239public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider => 277public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, string? category, Func<LogLevel, bool> levelFilter) => 295public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, string? category, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider =>
Microsoft.Extensions.Logging.Abstractions (1)
LoggerMessage.cs (1)
21public static Func<ILogger, IDisposable?> DefineScope(string formatString)
Microsoft.Extensions.Logging.AzureAppServices (3)
AzureBlobLoggerOptions.cs (1)
38public Func<AzureBlobLoggerContext, string> FileNameFormat { get; set; } = context =>
BlobLoggerProvider.cs (2)
23private readonly Func<string, ICloudAppendBlob> _blobReferenceFactory; 47Func<string, ICloudAppendBlob> blobReferenceFactory) :
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Parser.cs (3)
28private static readonly Func<ITypeParameterSymbol, bool>? s_getAllowsRefLikeType = 29(Func<ITypeParameterSymbol, bool>?) 30typeof(ITypeParameterSymbol).GetProperty("AllowsRefLikeType")?.GetGetMethod()!.CreateDelegate(typeof(Func<ITypeParameterSymbol, bool>));
Microsoft.Extensions.ML (1)
ServiceCollectionExtensions.cs (1)
49Func<IServiceProvider, PredictionEnginePool<TData, TPrediction>> implementationFactory)
Microsoft.Extensions.ObjectPool (1)
DefaultObjectPool.cs (1)
18private readonly Func<T, bool> _returnFunc;
Microsoft.Extensions.Options (7)
OptionsBuilder.cs (2)
376public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, bool> validation) 385public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, bool> validation, string failureMessage)
StartupValidatorOptions.cs (2)
18public Dictionary<(Type, string), Func<CancellationToken, Task>> _asyncValidators { get; } = new Dictionary<(Type, string), Func<CancellationToken, Task>>();
ValidateOnStart.cs (1)
67foreach (Func<CancellationToken, Task> asyncValidator in _validatorOptions._asyncValidators.Values)
ValidateOptions.cs (2)
20public ValidateOptions(string? name, Func<TOptions, bool> validation, string failureMessage) 37public Func<TOptions, bool> Validation { get; }
Microsoft.Extensions.Primitives (3)
ChangeToken.cs (3)
83public static IDisposable OnChange<TState>(Func<IChangeToken?> changeTokenProducer, Func<TState, Task> changeTokenConsumer, TState state) 210private readonly Func<TState, Task> _changeTokenConsumer; 212public AsyncChangeTokenRegistration(Func<IChangeToken?> changeTokenProducer, Func<TState, Task> changeTokenConsumer, TState state)
Microsoft.Extensions.ServiceDiscovery (2)
ConfigurationServiceEndpointProviderOptions.cs (1)
27public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (1)
10public TValue GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
parent\parent\Shared\FxPolyfills\ConcurrentDictionary.cs (1)
10public TValue GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsServiceEndpointProviderOptions.cs (1)
37public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
DnsSrvServiceEndpointProviderOptions.cs (2)
42public Func<ServiceEndpointQuery, string>? ServiceDomainNameCallback { get; set; } 50public Func<ServiceEndpoint, bool> ShouldApplyHostNameMetadata { get; set; } = _ => false;
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (6)
Resolver\LoopbackDnsServer.cs (2)
70public Task ProcessUdpRequest(Func<LoopbackDnsResponseBuilder, Task> action) 113public Task ProcessTcpRequest(Func<LoopbackDnsResponseBuilder, Task> action)
Resolver\RetryTests.cs (4)
17private Task SetupUdpProcessFunction(LoopbackDnsServer server, Func<LoopbackDnsResponseBuilder, Task> func) 36private Task SetupUdpProcessFunction(Func<LoopbackDnsResponseBuilder, Task> func) 281private async Task<AddressResult[]> RunWithFallbackServerHelper(string name, Func<LoopbackDnsResponseBuilder, Task> primaryHandler, Func<LoopbackDnsResponseBuilder, Task> fallbackHandler)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointResolverTests.cs (1)
67private sealed class FakeEndpointResolverProvider(Func<ServiceEndpointQuery, (bool Result, IServiceEndpointProvider? Resolver)> createResolverDelegate) : IServiceEndpointProviderFactory
Microsoft.Extensions.Telemetry (10)
Latency\Internal\LatencyConsoleExporter.cs (2)
24private static readonly Func<int, string> _rows = Memoize.Function((int nameColumnWidth) => $" {{0,-{nameColumnWidth}}} | {{1}}" + Environment.NewLine); 27private static readonly Func<int, string> _dashes = Memoize.Function<int, string>(num => new('-', num));
Logging\ExtendedLoggerFactory.cs (1)
35private readonly Func<DataClassificationSet, Redactor> _redactorProvider;
Logging\Import\LoggerInformation.cs (1)
30public Func<LogLevel, bool> LoggerIsEnabled { get; }
Logging\LoggerConfig.cs (2)
25Func<DataClassificationSet, Redactor> getRedactor, 54public Func<DataClassificationSet, Redactor> GetRedactor { get; }
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Memoization\Memoize.cs (2)
41public static Func<TParameter, TResult> Function<TParameter, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TResult>(Func<TParameter, TResult> f)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Memoization\MemoizedFunction.cs (2)
60private readonly Func<TParameter, TResult> _function; 66public MemoizedFunction(Func<TParameter, TResult> function)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
src\aspnetcore\src\Shared\RoslynUtils\BoundedCacheWithFactory.cs (1)
30public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
Microsoft.Extensions.VectorData.Abstractions (16)
FilteredRecordRetrievalOptions.cs (6)
13/// Defines options for calling <see cref="VectorStoreCollection{TKey, TRecord}.GetAsync(Expression{Func{TRecord, bool}}, int, FilteredRecordRetrievalOptions{TRecord}, CancellationToken)"/>. 42public Func<OrderByDefinition, OrderByDefinition>? OrderBy { get; set; } 67public OrderByDefinition Ascending(Expression<Func<TRecord, object?>> propertySelector) 82public OrderByDefinition Descending(Expression<Func<TRecord, object?>> propertySelector) 99internal SortInfo(Expression<Func<TRecord, object?>> propertySelector, bool isAscending) 108public Expression<Func<TRecord, object?>> PropertySelector { get; }
HybridSearchOptions.cs (3)
19public Expression<Func<TRecord, bool>>? Filter { get; set; } 29public Expression<Func<TRecord, object?>>? VectorProperty { get; set; } 39public Expression<Func<TRecord, object?>>? AdditionalProperty { get; set; }
ProviderServices\CollectionModel.cs (3)
151public DataPropertyModel GetFullTextDataPropertyOrSingle<TRecord>(Expression<Func<TRecord, object?>>? expression) 188public PropertyModel GetDataOrKeyProperty<TRecord>(Expression<Func<TRecord, object?>> expression) 195private TProperty GetMatchingProperty<TRecord, TProperty>(Expression<Func<TRecord, object?>> expression)
ProviderServices\PropertyModel.cs (1)
20private Func<object, object?>? _getter;
VectorSearchOptions.cs (2)
19public Expression<Func<TRecord, bool>>? Filter { get; set; } 29public Expression<Func<TRecord, object?>>? VectorProperty { get; set; }
VectorStoreCollection.cs (1)
109public abstract IAsyncEnumerable<TRecord> GetAsync(Expression<Func<TRecord, bool>> filter, int top, FilteredRecordRetrievalOptions<TRecord>? options = null, CancellationToken cancellationToken = default);
Microsoft.Extensions.VectorData.ConformanceTests (15)
DependencyInjectionTests.cs (1)
296Expression<Func<TRecord, bool>> filter,
EmbeddingGenerationTests.cs (6)
69foreach (var registrationDelegate in stringVectorFixture.DependencyInjectionStoreRegistrationDelegates) 90foreach (var registrationDelegate in stringVectorFixture.DependencyInjectionCollectionRegistrationDelegates) 501public abstract Func<IServiceCollection, IServiceCollection>[] DependencyInjectionStoreRegistrationDelegates { get; } 502public abstract Func<IServiceCollection, IServiceCollection>[] DependencyInjectionCollectionRegistrationDelegates { get; } 572public abstract Func<IServiceCollection, IServiceCollection>[] DependencyInjectionStoreRegistrationDelegates { get; } 573public abstract Func<IServiceCollection, IServiceCollection>[] DependencyInjectionCollectionRegistrationDelegates { get; }
FilterTests.cs (2)
485Expression<Func<FilterRecord, bool>> filter, 486Expression<Func<Dictionary<string, object?>, bool>> dynamicFilter,
Support\TestStore.cs (2)
126Expression<Func<TRecord, bool>>? filter = null, 127Expression<Func<TRecord, object?>>? vectorProperty = null,
TypeTests\DataTypeTests.cs (4)
352var filter = Expression.Lambda<Func<TRecord, bool>>( 370filter = Expression.Lambda<Func<TRecord, bool>>( 391var filter = Expression.Lambda<Func<Dictionary<string, object?>, bool>>( 411filter = Expression.Lambda<Func<Dictionary<string, object?>, bool>>(
Microsoft.Extensions.WebEncoders (2)
EncoderServiceCollectionExtensions.cs (2)
60private static Func<IServiceProvider, TService> CreateFactory<TService>( 62Func<TextEncoderSettings, TService> customSettingsFactory)
Microsoft.Gen.BuildMetadata (2)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Microsoft.Gen.ComplianceReports (2)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Microsoft.Gen.ContextualOptions (2)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Microsoft.Gen.Logging (6)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Parser.cs (3)
23private static readonly Func<ITypeParameterSymbol, bool>? _getAllowsRefLikeType = 24(Func<ITypeParameterSymbol, bool>?)typeof(ITypeParameterSymbol) 26.CreateDelegate(typeof(Func<ITypeParameterSymbol, bool>));
TemplateProcessor.cs (1)
78internal static string? MapTemplates(string? message, Func<string, string> mapTemplate)
Microsoft.Gen.MetadataExtractor (2)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Microsoft.Gen.Metrics (2)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Microsoft.Gen.MetricsReports (2)
GeneratorUtilities.cs (2)
51Func<SyntaxNode, SyntaxNode?> transform, 104static SyntaxNode? Filter(GeneratorSyntaxContext context, HashSet<string> fullyQualifiedAttributeNames, Func<SyntaxNode, SyntaxNode?> transform, CancellationToken cancellationToken)
Microsoft.Interop.ComInterfaceGenerator (11)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (11)
34List<Func<ITypeSymbol, bool>> sourceGeneratedComRecognizers = new(); 53var methodsOfInterest = new Dictionary<ISymbol, ImmutableArray<Func<IInvocationOperation, (ITypeSymbol, Location)?>>>(SymbolEqualityComparer.Default); 55var firstArgumentTypeLookup = CreateArgumentTypeLookup(0); 108if (methodsOfInterest.TryGetValue(operation.TargetMethod.OriginalDefinition, out ImmutableArray<Func<IInvocationOperation, (ITypeSymbol, Location)?>> discoverers)) 110foreach (Func<IInvocationOperation, (ITypeSymbol, Location)?> discoverer in discoverers) 115foreach (var recognizer in sourceGeneratedComRecognizers) 156foreach (var recognizer in sourceGeneratedComRecognizers) 169foreach (var recognizer in sourceGeneratedComRecognizers) 200static Func<IInvocationOperation, (ITypeSymbol Type, Location location)?> CreateArgumentTypeLookup(int ordinal) => invocation => invocation.GetArgumentByOrdinal(ordinal).Value switch 206static Func<IInvocationOperation, (ITypeSymbol Type, Location location)?> CreateTypeArgumentTypeLookup(int ordinal) => invocation => 235static Func<IInvocationOperation, (ITypeSymbol Type, Location location)?> CreateTypeOfArgumentTypeLookup(int ordinal) => invocation => invocation.GetArgumentByOrdinal(ordinal).Value switch
Microsoft.Interop.SourceGeneration (12)
ArrayMarshallingInfoProvider.cs (1)
72Func<ITypeSymbol, MarshallingInfo> getMarshallingInfoForElement = (ITypeSymbol elementType) => elementMarshallingInfo;
CustomMarshallingInfoHelper.cs (1)
78Func<ITypeSymbol, MarshallingInfo> getMarshallingInfoForElement = (ITypeSymbol elementType) => getMarshallingInfoCallback(elementType, useSiteAttributeProvider, indirectionDepth + 1);
ManualTypeMarshallingHelper.cs (6)
119Func<ITypeSymbol, MarshallingInfo> getMarshallingInfo, 129Func<ITypeSymbol, MarshallingInfo> getMarshallingInfo, 152Func<ITypeSymbol, MarshallingInfo> getMarshallingInfoForElement, 412Func<ITypeSymbol, MarshallingInfo> getMarshallingInfo) 455private static CustomTypeMarshallerData? GetStatelessMarshallerDataForType(ITypeSymbol marshallerType, MarshalMode mode, ITypeSymbol managedType, bool isLinearCollectionMarshaller, Compilation compilation, Func<ITypeSymbol, MarshallingInfo>? getMarshallingInfo) 555Func<ITypeSymbol, MarshallingInfo>? getMarshallingInfo)
Marshalling\MarshallerHelpers.cs (2)
121Func<T, U> keyFn, 122Func<T, IEnumerable<U>> getDependentIndicesFn)
ValueEqualityImmutableDictionary.cs (2)
68Func<TSource, TKey> keySelector, 69Func<TSource, TValue> valueSelector)
Microsoft.JSInterop (3)
Infrastructure\DotNetDispatcher.cs (3)
33private static readonly ConcurrentDictionary<Type, Func<object, Task>> _cachedConvertToTaskByType = new(); 373var converterDelegate = _cachedConvertToTaskByType.GetOrAdd(type, (Type t, MethodInfo taskConverterMethodInfo) => 374taskConverterMethodInfo.MakeGenericMethod(t).CreateDelegate<Func<object, Task>>(), _taskConverterMethodInfo);
Microsoft.Maui (15)
Animations\Easing.cs (3)
78 readonly Func<double, double> _easingFunc; 113 public Easing(Func<double, double> easingFunc) 133 public static implicit operator Easing(Func<double, double> func)
Converters\EasingTypeConverter.cs (1)
14 => sourceType == typeof(string) || sourceType == typeof(Func<double, double>);
Extensions\EnumerableExtensions.cs (2)
36 public static IDictionary<TKey, List<TSource>> GroupToDictionary<TSource, TKey>(this IEnumerable<TSource> enumeration, Func<TSource, TKey> func) 143 public static int IndexOf<T>(this IEnumerable<T> enumerable, Func<T, bool> predicate)
Handlers\View\ViewHandlerOfT.cs (1)
58 public static Func<ViewHandler<TVirtualView, TPlatformView>, TPlatformView>? PlatformViewFactory { get; set; }
Hosting\ImageSources\ImageSourceServiceCollectionExtensions.cs (1)
35 public static IImageSourceServiceCollection AddService<TImageSource>(this IImageSourceServiceCollection services, Func<IServiceProvider, IImageSourceService<TImageSource>> implementationFactory)
Hosting\MauiHandlersCollectionExtensions.cs (2)
61 Func<IServiceProvider, IElementHandler> handlerImplementationFactory) 119 Func<IServiceProvider, IElementHandler> handlerImplementationFactory)
Layouts\GridLayoutManager.cs (2)
613 void ResolveStars(Definition[] defs, double availableSpace, Func<Cell, bool> cellCheck, Func<Size, double> dimension, double starCount)
MauiContext.cs (2)
55 readonly ConcurrentDictionary<Type, (object, Func<object, object?>)> _scopeStatic = new(); 75 public void AddSpecific(Type type, Func<object, object?> getter, object state)
Platform\ViewExtensions.cs (1)
87 static ParentView? FindParent(this ParentView? view, Func<ParentView?, bool> searchExpression)
Microsoft.Maui.Controls (64)
Animation.cs (1)
36 Func<double, double> transform = AnimationExtensions.Interpolate(start, end);
AnimationExtensions.cs (4)
85 public static int Insert(this IAnimationManager animationManager, Func<long, bool> step) 170 public static void Animate<T>(this IAnimatable self, string name, Func<double, T> transform, Action<T> callback, 208 public static Func<double, double> Interpolate(double start, double end = 1.0f, double reverseVal = 0.0f, bool reverse = false) 255 static void AnimateInternal<T>(IAnimatable self, IAnimationManager animationManager, string name, Func<double, T> transform, Action<T> callback,
BindableObjectExtensions.cs (1)
132 Func<TSource, TProperty> getter,
BindingBase.Create.cs (1)
22 Func<TSource, TProperty> getter,
Command.cs (3)
27 public Command(Action<T> execute, Func<T, bool> canExecute) 66 readonly Func<object, bool> _canExecute; 87 public Command(Action<object> execute, Func<object, bool> canExecute) : this(execute)
DependencyResolver.cs (1)
22 public static void ResolveUsing(Func<Type, object> resolver)
DragAndDrop\DragEventArgs.cs (2)
11 Func<IElement?, Point?>? _getPosition; 28 internal DragEventArgs(DataPackage dataPackage, Func<IElement?, Point?>? getPosition, PlatformDragEventArgs platformArgs)
DragAndDrop\DragGestureRecognizer.cs (1)
111 internal DragStartingEventArgs SendDragStarting(View element, Func<IElement?, Point?>? getPosition = null, PlatformDragStartingEventArgs? platformArgs = null)
DragAndDrop\DragStartingEventArgs.cs (2)
12 Func<IElement?, Point?>? _getPosition; 26 internal DragStartingEventArgs(Func<IElement?, Point?>? getPosition, PlatformDragStartingEventArgs? platformArgs)
DragAndDrop\DropEventArgs.cs (2)
11 Func<IElement?, Point?>? _getPosition; 29 internal DropEventArgs(DataPackageView? view, Func<IElement?, Point?>? getPosition, PlatformDropEventArgs platformArgs)
EnumerableExtensions.cs (5)
8 public static bool HasChildGesturesFor<T>(this IEnumerable<GestureElement>? elements, Func<T, bool>? predicate = null) where T : GestureRecognizer 29 public static IEnumerable<T> GetChildGesturesFor<T>(this IEnumerable<GestureElement>? elements, Func<T, bool>? predicate = null) where T : GestureRecognizer 49 public static IEnumerable<T> GetGesturesFor<T>(this IEnumerable<IGestureRecognizer>? gestures, Func<T, bool>? predicate = null) where T : GestureRecognizer 65 internal static bool HasAnyGesturesFor<T>(this IEnumerable<IGestureRecognizer>? gestures, Func<T, bool>? predicate = null) where T : GestureRecognizer 68 internal static T? FirstGestureOrDefault<T>(this IEnumerable<IGestureRecognizer>? gestures, Func<T, bool>? predicate = null) where T : GestureRecognizer
Hosting\AppHostBuilderExtensions.cs (1)
54 internal static MauiAppBuilder UseMauiPrimaryApp<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder, Func<IServiceProvider, TApp> implementationFactory)
ImageSource.cs (1)
95 public static ImageSource FromStream(Func<CancellationToken, Task<Stream>> stream)
Internals\ResourceLoader.cs (2)
12 static Func<ResourceLoadingQuery, ResourceLoadingResponse> _resourceProvider2; 14 public static Func<ResourceLoadingQuery, ResourceLoadingResponse> ResourceProvider2
LegacyLayouts\Constraint.cs (2)
13 Func<RelativeLayout, double> _measureFunc; 40 public static Constraint RelativeToParent(Func<RelativeLayout, double> measure)
PlatformBindingHelpers.cs (1)
128 public static void SetBindingContext<TPlatformView>(TPlatformView target, object bindingContext, Func<TPlatformView, IEnumerable<TPlatformView>> getChild = null) where TPlatformView : class
PointerEventArgs.cs (2)
12 Func<IElement?, Point?>? _getPosition; 26 internal PointerEventArgs(Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? args = null)
PointerGestureRecognizer.cs (5)
189 internal void SendPointerEntered(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null) 202 internal void SendPointerExited(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null) 215 internal void SendPointerMoved(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null) 228 internal void SendPointerPressed(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null) 241 internal void SendPointerReleased(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null)
Registrar.cs (2)
344 internal static Func<object, IViewHandler> RendererToHandlerShim { get; private set; } 345 public static void RegisterRendererToHandlerShim(Func<object, IViewHandler> handlerShim)
Shell\ShellExtensions.cs (2)
24 public static BaseShellItem SearchForPart(this IShellController shell, Func<BaseShellItem, bool> searchBy) 37 public static BaseShellItem SearchForPart(this BaseShellItem part, Func<BaseShellItem, bool> searchBy)
StreamImageSource.cs (4)
13 public static readonly BindableProperty StreamProperty = BindableProperty.Create(nameof(Stream), typeof(Func<CancellationToken, Task<Stream>>), typeof(StreamImageSource), 14 default(Func<CancellationToken, Task<Stream>>)); 20 public virtual Func<CancellationToken, Task<Stream>> Stream 22 get { return (Func<CancellationToken, Task<Stream>>)GetValue(StreamProperty); }
StyleSheets\Selector.cs (2)
150 readonly Func<IStyleSelectable, bool> func; 151 public Generic(Func<IStyleSelectable, bool> func)
TapGestureRecognizer.cs (1)
56 internal void SendTapped(View sender, Func<IElement?, Point?>? getPosition = null)
TappedEventArgs.cs (2)
9 Func<IElement?, Point?>? _getPosition; 17 internal TappedEventArgs(object? parameter, Func<IElement?, Point?>? getPosition) : this(parameter)
Tweener.cs (2)
35 readonly Func<long, bool> _step; 37 public TweenerAnimation(Func<long, bool> step)
TypedBinding.cs (10)
96 Func<TSource, TProperty> getter, 106 handlers: new Tuple<Func<TSource, object>, string>[] 122 readonly Func<TSource, (TProperty value, bool success)> _getter; 126 public TypedBinding(Func<TSource, (TProperty value, bool success)> getter, Action<TSource, TProperty> setter, Tuple<Func<TSource, object>, string>[] handlers) 213 Tuple<Func<TSource, object>, string>[] handlers = _handlers == null ? null : new Tuple<Func<TSource, object>, string>[_handlers.Length]; 220 handlers[i] = new Tuple<Func<TSource, object>, string>(_handlers[i].PartGetter, _handlers[i].PropertyName); 459 public Func<TSource, object> PartGetter { get; } 490 public PropertyChangedProxy(Func<TSource, object> partGetter, string propertyName, BindingBase binding)
ViewExtensions.cs (2)
95 Func<double, Rect> computeBounds = progress => 330 internal static Element? FindParentWith(this Element element, Func<Element, bool> withMatch, bool includeThis = false)
Microsoft.Maui.Controls.Build.Tasks (19)
ModuleDefinitionExtensions.cs (5)
25 static MethodReference ImportCtorReference(this ModuleDefinition module, XamlCache cache, TypeReference type, TypeReference[] classArguments, Func<MethodDefinition, bool> predicate) 102 static MethodReference ImportPropertyGetterReference(this ModuleDefinition module, XamlCache cache, TypeReference type, string propertyName, Func<PropertyDefinition, bool> predicate = null, bool flatten = false, bool caseSensitive = true) 123 static MethodReference ImportPropertySetterReference(this ModuleDefinition module, XamlCache cache, TypeReference type, string propertyName, Func<PropertyDefinition, bool> predicate = null) 143 static MethodReference ImportMethodReference(this ModuleDefinition module, XamlCache cache, TypeReference type, string methodName, Func<MethodDefinition, bool> predicate = null, TypeReference[] classArguments = null) 235 static FieldReference ImportFieldReference(this ModuleDefinition module, XamlCache cache, TypeReference type, string fieldName, Func<FieldDefinition, bool> predicate = null, bool caseSensitive = true)
NodeILExtensions.cs (4)
101 Func<TypeReference[], IEnumerable<Instruction>> pushServiceProvider, bool boxValueTypes, bool unboxValueTypes) 122 Func<TypeReference[], IEnumerable<Instruction>> pushServiceProvider, bool boxValueTypes, bool unboxValueTypes) 136 static T TryFormat<T>(Func<string, T> func, IXmlLineInfo lineInfo, string str) 149 TypeReference targetTypeRef, TypeReference typeConverter, Func<TypeReference[], IEnumerable<Instruction>> pushServiceProvider,
TypeReferenceExtensions.cs (4)
62 public static PropertyDefinition GetProperty(this TypeReference typeRef, XamlCache cache, Func<PropertyDefinition, bool> predicate, 87 public static EventDefinition GetEvent(this TypeReference typeRef, XamlCache cache, Func<EventDefinition, bool> predicate, 124 public static FieldDefinition GetField(this TypeReference typeRef, XamlCache cache, Func<FieldDefinition, bool> predicate, 269 Func<MethodDefinition, bool> predicate, ModuleDefinition module)
XamlCache.cs (6)
23 static TValue GetOrAdd<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> valueFactory) 32 public IList<XmlnsDefinitionAttribute> GetXmlsDefinitions(ModuleDefinition module, Func<ModuleDefinition, IList<XmlnsDefinitionAttribute>> valueFactory) => 38 public FieldReference GetOrAddFieldReference((ModuleDefinition module, string fieldRefKey) key, Func<(ModuleDefinition module, string fieldRefKey), FieldReference> valueFactory) => 44 public TypeReference GetOrAddTypeReference(ModuleDefinition module, string typeKey, Func<(ModuleDefinition module, string typeKey), TypeReference> valueFactory) => 47 public MethodReference GetOrAddMethodReference(ModuleDefinition module, string methodRefKey, Func<(ModuleDefinition module, string methodRefKey), MethodReference> valueFactory) => 50 public TypeDefinition GetOrAddTypeDefinition(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName) type, Func<(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName)), TypeDefinition> valueFactory) =>
Microsoft.Maui.Controls.Compatibility (1)
AppHostBuilderExtensions.Embedding.cs (1)
16 public static MauiAppBuilder UseMauiEmbedding<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder, Func<IServiceProvider, TApp> implementationFactory)
Microsoft.Maui.Controls.SourceGen (1)
src\Controls\src\Xaml\XmlTypeXamlExtensions.cs (1)
40 Func<(string typeName, string clrNamespace, string assemblyName), T> refFromTypeInfo,
Microsoft.Maui.Controls.Xaml (3)
Embedding\EmbeddingExtensions.cs (1)
36 public static MauiAppBuilder UseMauiEmbeddedApp<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder, Func<IServiceProvider, TApp> implementationFactory)
Hosting\AppHostBuilderExtensions.cs (1)
30 public static MauiAppBuilder UseMauiApp<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder, Func<IServiceProvider, TApp> implementationFactory)
XmlTypeXamlExtensions.cs (1)
40 Func<(string typeName, string clrNamespace, string assemblyName), T> refFromTypeInfo,
Microsoft.ML.AutoML (4)
API\AutoMLExperimentExtension.cs (1)
178public static AutoMLExperiment SetPerformanceMonitor<TPerformanceMonitor>(this AutoMLExperiment experiment, Func<IServiceProvider, TPerformanceMonitor> factory)
AutoMLExperiment\AutoMLExperiment.cs (3)
136public AutoMLExperiment SetMonitor<TMonitor>(Func<IServiceProvider, TMonitor> factory) 152public AutoMLExperiment SetTrialRunner<TTrialRunner>(Func<IServiceProvider, TTrialRunner> factory) 174public AutoMLExperiment SetTuner<TTuner>(Func<IServiceProvider, TTuner> factory)
Microsoft.ML.Core (32)
ComponentModel\ComponentFactory.cs (3)
58public static IComponentFactory<TComponent> CreateFromFunction<TComponent>(Func<IHostEnvironment, TComponent> factory) 96private readonly Func<IHostEnvironment, TComponent> _factory; 98public SimpleComponentFactory(Func<IHostEnvironment, TComponent> factory)
Data\IHostEnvironment.cs (1)
268public static T Apply<T>(this IHost host, string channelName, Func<IChannel, T> func)
Data\ServerChannel.cs (2)
96public void Register<T1, TRet>(string name, Func<T1, TRet> func) 223/// some variety of <see cref="Func{TResult}"/>, <see cref="Func{T1, TResult}"/>,
Utilities\FuncInstanceMethodInfo1`2.cs (1)
56public static FuncInstanceMethodInfo1<TTarget, TResult> Create(Expression<Func<TTarget, Func<TResult>>> expression)
Utilities\FuncInstanceMethodInfo1`3.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 32public FuncInstanceMethodInfo1(Func<T, TResult> function) 57public static FuncInstanceMethodInfo1<TTarget, T, TResult> Create(Expression<Func<TTarget, Func<T, TResult>>> expression) 75Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).Value == typeof(Func<T, TResult>), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`4.cs (1)
58public static FuncInstanceMethodInfo1<TTarget, T1, T2, TResult> Create(Expression<Func<TTarget, Func<T1, T2, TResult>>> expression)
Utilities\FuncInstanceMethodInfo2`4.cs (1)
58public static FuncInstanceMethodInfo2<TTarget, T1, T2, TResult> Create(Expression<Func<TTarget, Func<T1, T2, TResult>>> expression)
Utilities\FuncInstanceMethodInfo3`3.cs (5)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 32public FuncInstanceMethodInfo3(Func<T, TResult> function) 57public static FuncInstanceMethodInfo3<TTarget, T, TResult> Create(Expression<Func<TTarget, Func<T, TResult>>> expression) 75Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).Value == typeof(Func<T, TResult>), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`4.cs (1)
58public static FuncInstanceMethodInfo3<TTarget, T1, T2, TResult> Create(Expression<Func<TTarget, Func<T1, T2, TResult>>> expression)
Utilities\FuncMethodInfo1`2.cs (1)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>,
Utilities\FuncMethodInfo3`2.cs (1)
15/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>,
Utilities\FuncStaticMethodInfo1`2.cs (2)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 27public FuncStaticMethodInfo1(Func<T, TResult> function)
Utilities\FuncStaticMethodInfo3`2.cs (2)
14/// Represents the <see cref="MethodInfo"/> for a generic function corresponding to <see cref="Func{T, TResult}"/>, 27public FuncStaticMethodInfo3(Func<T, TResult> function)
Utilities\Utils.cs (6)
390public static int FindIndexSorted<T>(this T[] input, int min, int lim, Func<T, bool> func) 742public static T[] BuildArray<T>(int length, Func<int, T> func) 767public static void BuildSubsetMaps(DataViewSchema schema, Func<DataViewSchema.Column, bool> pred, out int[] map, out int[] invMap) 802public static void BuildSubsetMaps(int lim, Func<int, bool> pred, out int[] map, out int[] invMap) 1267public static int Count<TSource>(this ReadOnlySpan<TSource> source, Func<TSource, bool> predicate) 1280public static bool All<TSource>(this ReadOnlySpan<TSource> source, Func<TSource, bool> predicate)
Microsoft.ML.Data (268)
Data\DataViewUtils.cs (1)
176public static bool AllCacheable(DataViewSchema schema, Func<DataViewSchema.Column, bool> predicate)
Data\IRowSeekable.cs (1)
17RowSeeker GetSeeker(Func<int, bool> predicate);
Data\RowCursorUtils.cs (1)
489internal static Func<int, bool> FromColumnsToPredicate(IEnumerable<DataViewSchema.Column> columnsNeeded, DataViewSchema sourceSchema)
DataLoadSave\LegacyCompositeDataLoader.cs (3)
322ILegacyDataLoader srcLoader, Func<string, bool> isTransformTagAccepted) 347public static IDataView LoadSelectedTransforms(ModelLoadContext ctx, IDataView srcView, IHostEnvironment env, Func<string, bool> isTransformTagAccepted) 450private static ILegacyDataLoader LoadTransforms(ModelLoadContext ctx, ILegacyDataLoader srcLoader, IHost host, Func<string, bool> isTransformTagAccepted)
DataLoadSave\Text\TextLoaderParser.cs (21)
28private static readonly FuncInstanceMethodInfo1<ValueCreatorCache, PrimitiveDataViewType, Func<RowSet, ColumnPipe>> _getCreatorOneCoreMethodInfo 29= FuncInstanceMethodInfo1<ValueCreatorCache, PrimitiveDataViewType, Func<RowSet, ColumnPipe>>.Create(target => target.GetCreatorOneCore<int>); 31private static readonly FuncInstanceMethodInfo1<ValueCreatorCache, PrimitiveDataViewType, Func<RowSet, ColumnPipe>> _getCreatorVecCoreMethodInfo 32= FuncInstanceMethodInfo1<ValueCreatorCache, PrimitiveDataViewType, Func<RowSet, ColumnPipe>>.Create(target => target.GetCreatorVecCore<int>); 59private readonly Func<RowSet, ColumnPipe>[] _creatorsOne; 60private readonly Func<RowSet, ColumnPipe>[] _creatorsVec; 69_creatorsOne = new Func<RowSet, ColumnPipe>[InternalDataKindExtensions.KindCount]; 70_creatorsVec = new Func<RowSet, ColumnPipe>[InternalDataKindExtensions.KindCount]; 79private Func<RowSet, ColumnPipe> GetCreatorOneCore(PrimitiveDataViewType type) 84private Func<RowSet, ColumnPipe> GetCreatorOneCore<T>(PrimitiveDataViewType type) 92private Func<RowSet, ColumnPipe> GetCreatorVecCore(PrimitiveDataViewType type) 97private Func<RowSet, ColumnPipe> GetCreatorVecCore<T>(PrimitiveDataViewType type) 105public Func<RowSet, ColumnPipe> GetCreatorOne(KeyDataViewType key) 111public Func<RowSet, ColumnPipe> GetCreatorVec(KeyDataViewType key) 117public Func<RowSet, ColumnPipe> GetCreatorOne(InternalDataKind kind) 124public Func<RowSet, ColumnPipe> GetCreatorVec(InternalDataKind kind) 666private readonly Func<RowSet, ColumnPipe>[] _creator; 678_creator = new Func<RowSet, ColumnPipe>[_infos.Length]; 693var mapOne = new Dictionary<InternalDataKind, Func<RowSet, ColumnPipe>>(); 694var mapVec = new Dictionary<InternalDataKind, Func<RowSet, ColumnPipe>>(); 717var fn = vectorType != null ?
DataView\ArrayDataViewBuilder.cs (5)
237var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 245var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 265public Cursor(IChannelProvider provider, DataView view, Func<int, bool> predicate, Random rand) 453public VectorColumn(PrimitiveDataViewType itemType, TIn[] values, Func<TIn, int> lengthFunc) 462private static DataViewType InferType(PrimitiveDataViewType itemType, TIn[] values, Func<TIn, int> lengthFunc)
DataView\BatchDataViewMapperBase.cs (4)
35var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, SchemaBindings.AsSchema); 53var predInput = GetSchemaBindingDependencies(predicate); 71protected abstract Func<int, bool> GetSchemaBindingDependencies(Func<int, bool> predicate);
DataView\CacheDataView.cs (12)
213var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 243private DataViewRowCursor GetRowCursorWaiterCore<TWaiter>(TWaiter waiter, Func<int, bool> predicate, Random rand) 259var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 272private DataViewRowCursor[] GetRowCursorSetWaiterCore<TWaiter>(TWaiter waiter, Func<int, bool> predicate, int n, Random rand) 293private DataViewRowCursor CreateCursor<TIndex>(Func<int, bool> predicate, TIndex index) 300public RowSeeker GetSeeker(Func<int, bool> predicate) 313private RowSeeker GetSeeker<TWaiter>(Func<int, bool> predicate, TWaiter waiter) 460public RowCursor(CacheDataView parent, Func<int, bool> predicate, TIndex index) 550public RowSeekerCore(CacheDataView parent, Func<int, bool> predicate, TWaiter waiter) 657private WaiterWaiter(CacheDataView parent, Func<int, bool> pred) 695public static Wrapper Create(CacheDataView parent, Func<int, bool> pred) 1155protected RowCursorSeekerBase(CacheDataView parent, Func<int, bool> predicate)
DataView\CompositeRowToRowMapper.cs (2)
92private readonly Func<int, bool> _pred; 94public SubsetActive(DataViewRow row, Func<int, bool> pred)
DataView\DataViewConstructionUtils.cs (10)
215public InputRowBase(IHostEnvironment env, DataViewSchema schema, InternalSchemaDefinition schemaDef, Delegate[] peeks, Func<int, bool> predicate) 308private Delegate CreateConvertingArrayGetterDelegate<TSrc, TDst>(Delegate peekDel, Func<TSrc, TDst> convert) 324private Delegate CreateConvertingGetterDelegate<TSrc, TDst>(Delegate peekDel, Func<TSrc, TDst> convert) 543Func<int, bool> predicate) 622var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 637Func<int, bool> predicate, Random rand) 705var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 714public Cursor(IHostEnvironment env, StreamingDataView<TRow> dataView, Func<int, bool> predicate) 775var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 783public Cursor(IHostEnvironment env, SingleRowLoopDataView<TRow> dataView, Func<int, bool> predicate)
DataView\LambdaFilter.cs (7)
104protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 114var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 117Func<int, bool> inputPred = GetActive(predicate, out active); 128var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 131Func<int, bool> inputPred = GetActive(predicate, out active); 143private Func<int, bool> GetActive(Func<int, bool> predicate, out bool[] active)
DataView\RowToRowMapperTransform.cs (15)
34Func<int, bool> GetDependencies(Func<int, bool> activeOutput); 43Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer); 74private readonly Func<DataViewSchema, IRowMapper> _mapperFactory; 95public RowToRowMapperTransform(IHostEnvironment env, IDataView input, IRowMapper mapper, Func<DataViewSchema, IRowMapper> mapperFactory) 147private bool[] GetActive(Func<int, bool> predicate, out IEnumerable<DataViewSchema.Column> inputColumns) 157var predicateOut = GetActiveOutputColumns(active); 160var predicateIn = _mapper.GetDependencies(predicateOut); 168private Func<int, bool> GetActiveOutputColumns(bool[] active) 181protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 191var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 201var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 242var predicate = RowCursorUtils.FromColumnsToPredicate(dependingColumns, OutputSchema); 263var pred = GetActiveOutputColumns(activeArr); 371var pred = parent.GetActiveOutputColumns(active);
DataView\Transposer.cs (12)
833var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 836var srcPred = CreateInputPredicate(predicate, out activeSplitters); 846var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 849var srcPred = CreateInputPredicate(predicate, out activeSplitters); 866private Func<int, bool> CreateInputPredicate(Func<int, bool> pred, out bool[] activeSplitters) 962public abstract DataViewRow Bind(DataViewRow row, Func<int, bool> pred); 1022public override DataViewRow Bind(DataViewRow row, Func<int, bool> pred) 1116public override DataViewRow Bind(DataViewRow row, Func<int, bool> pred) 1140public RowImpl(ColumnSplitter<T> parent, DataViewRow input, Func<int, bool> pred) 1269public Cursor(IChannelProvider provider, DataViewSlicer slicer, DataViewRowCursor input, Func<int, bool> pred, bool[] activeSplitters) 1281Func<int, bool> defaultPred = null;
DataView\TypedCursor.cs (7)
178public RowCursor<TRow> GetCursor(Func<int, bool> additionalColumnsPredicate, int? randomSeed = null) 184var deps = GetDependencies(additionalColumnsPredicate); 191public Func<int, bool> GetDependencies(Func<int, bool> additionalColumnsPredicate) 203public RowCursor<TRow>[] GetCursorSet(Func<int, bool> additionalColumnsPredicate, int n, Random rand) 424private Action<TRow> CreateConvertingVBufferSetter<TSrc, TDst>(DataViewRow input, int col, Delegate poke, Delegate peek, Func<TSrc, TDst> convert) 484private static Action<TRow> CreateConvertingActionSetter<TSrc, TDst>(DataViewRow input, int col, Delegate poke, Func<TSrc, TDst> convert)
DataView\ZipBinding.cs (3)
51public Func<int, bool>[] GetInputPredicates(Func<int, bool> predicate) 54var result = new Func<int, bool>[_sources.Length];
DataView\ZipDataView.cs (2)
77var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 117public Cursor(ZipDataView parent, DataViewRowCursor[] srcCursors, Func<int, bool> predicate)
Dirty\ChooseColumnsByIndexTransform.cs (8)
153internal bool[] GetActive(Func<int, bool> predicate) 158internal Func<int, bool> GetDependencies(Func<int, bool> predicate) 238protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 248var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 250var inputPred = _bindings.GetDependencies(predicate); 262var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 264var inputPred = _bindings.GetDependencies(predicate);
Evaluators\BinaryClassifierEvaluator.cs (5)
158private protected override Func<int, bool> GetActiveColsCore(RoleMappedSchema schema) 160var pred = base.GetActiveColsCore(schema); 1135private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 1148private protected override Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer)
Evaluators\ClusteringEvaluator.cs (5)
126private protected override Func<int, bool> GetActiveColsCore(RoleMappedSchema schema) 128var pred = base.GetActiveColsCore(schema); 641private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 649private protected override Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer)
Evaluators\EvaluatorBase.cs (17)
34Func<int, bool> activeCols = GetActiveCols(data.Schema); 76private Func<int, bool> GetActiveCols(RoleMappedSchema schema) 78Func<int, bool> pred = GetActiveColsCore(schema); 91private protected virtual Func<int, bool> GetActiveColsCore(RoleMappedSchema schema) 116Func<string, TAgg> createAgg = stratName => GetAggregatorCore(schema, stratName); 131Func<int, bool> activeColsIndices, TAgg aggregator, AggregatorDictionaryBase[] dictionaries) 341private protected readonly Func<string, TAgg> CreateAgg; 348private protected AggregatorDictionaryBase(RoleMappedSchema schema, string stratCol, Func<string, TAgg> createAgg) 365Func<string, TAgg> createAgg) 379DataViewType stratType, Func<string, TAgg> createAgg) 406public GenericAggregatorDictionary(RoleMappedSchema schema, string stratCol, DataViewType stratType, Func<string, TAgg> createAgg) 525Func<int, bool> IRowMapper.GetDependencies(Func<int, bool> activeOutput) 529private protected abstract Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput); 537Delegate[] IRowMapper.CreateGetters(DataViewRow input, Func<int, bool> activeCols, out Action disposer) 541private protected abstract Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer);
Evaluators\EvaluatorUtils.cs (7)
30private static volatile Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> _knownEvaluatorFactories; 32public static Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> Instance 36Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> result = _knownEvaluatorFactories; 39var tmp = new Dictionary<string, Func<IHostEnvironment, IMamlEvaluator>> 164int colScore, string valueKind, Func<DataViewType, bool> testType) 923Func<IDataView, IDataView> selectDropNonVarLenthCol = 991private static List<string> GetMetricNames(IChannel ch, DataViewSchema schema, DataViewRow row, Func<int, bool> ignoreCol,
Evaluators\MulticlassClassificationEvaluator.cs (3)
695private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 709private protected override Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer)
Evaluators\MultiOutputRegressionEvaluator.cs (3)
439private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 460private protected override Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer)
Evaluators\QuantileRegressionEvaluator.cs (3)
345private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 380private protected override Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer)
Evaluators\RankingEvaluator.cs (3)
123private protected override Func<int, bool> GetActiveColsCore(RoleMappedSchema schema) 125var pred = base.GetActiveColsCore(schema); 751protected override Delegate[] CreateGetters(RowCursorState state, Func<int, bool> predicate)
Evaluators\RegressionEvaluator.cs (3)
255private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 269private protected override Delegate[] CreateGettersCore(DataViewRow input, Func<int, bool> activeCols, out Action disposer)
Model\Pfa\ModelUtils.cs (1)
34public static string CreateNameCore(string name, Func<string, bool> contains)
Prediction\CalibratorCatalog.cs (3)
261private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 313protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Prediction\PredictionEngine.cs (2)
114var makeMapper = TransformerChecker(env, transformer); 132private protected virtual Func<DataViewSchema, IRowToRowMapper> TransformerChecker(IExceptionContext ectx, ITransformer transformer)
Scorers\GenericScorer.cs (2)
249protected override bool WantParallelCursors(Func<int, bool> predicate) 265protected override Delegate[] GetGetters(DataViewRow output, Func<int, bool> predicate)
Scorers\PredictedLabelScorerBase.cs (7)
127Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType) 259public override Func<int, bool> GetActiveMapperColumns(bool[] active) 266var pred = base.GetActiveMapperColumns(active); 284Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType, string predictedLabelColumnName = DefaultColumnNames.PredictedLabel) 318Func<DataViewType, bool> outputTypeMatches, Func<DataViewType, ISchemaBoundRowMapper, DataViewType> getPredColType) 396protected override bool WantParallelCursors(Func<int, bool> predicate) 404protected override Delegate[] GetGetters(DataViewRow output, Func<int, bool> predicate)
Scorers\RowToRowScorerBase.cs (9)
97var predicateMapper = bindings.GetActiveMapperColumns(active); 98Func<int, bool> localMapper = predicateMapper; 115protected sealed override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 127protected abstract bool WantParallelCursors(Func<int, bool> predicate); 146var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 172Func<int, bool> activeInfos = iinfo => activeIndices.Contains(bindings.MapIinfoToCol(iinfo)); 188protected abstract Delegate[] GetGetters(DataViewRow output, Func<int, bool> predicate); 190protected static Delegate[] GetGettersFromRow(DataViewRow row, Func<int, bool> predicate) 475public virtual Func<int, bool> GetActiveMapperColumns(bool[] active)
Transforms\BootstrapSamplingTransformer.cs (1)
163protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate)
Transforms\ColumnBindingsBase.cs (5)
589public bool[] GetActive(Func<int, bool> predicate) 603public bool[] GetActiveInput(Func<int, bool> predicate) 625var predicate = RowCursorUtils.FromColumnsToPredicate(inputColumns, AsSchema); 633public bool AnyNewColumnsActive(Func<int, bool> predicate) 770public bool[] GetActiveInput(Func<int, bool> predicate)
Transforms\ColumnConcatenatingTransformer.cs (3)
857private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 875protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\ColumnCopying.cs (1)
213protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\ColumnSelecting.cs (1)
73private readonly Func<string, bool> _selectPredicate;
Transforms\FeatureContributionCalculationTransformer.cs (1)
203protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> active, out Action disposer)
Transforms\GenerateNumberTransform.cs (7)
231public Func<int, bool> GetDependencies(Func<int, bool> predicate) 327protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 340var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 342var inputPred = _bindings.GetDependencies(predicate); 353var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 355var inputPred = _bindings.GetDependencies(predicate);
Transforms\Hashing.cs (1)
1354protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) => _parent.GetGetterCore(input, iinfo, out disposer);
Transforms\KeyToValue.cs (1)
212protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\KeyToVector.cs (1)
449protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\NAFilter.cs (7)
200protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 210var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 212Func<int, bool> inputPred = GetActive(predicate, out bool[] active); 222var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 224Func<int, bool> inputPred = GetActive(predicate, out bool[] active); 237private Func<int, bool> GetActive(Func<int, bool> predicate, out bool[] active)
Transforms\Normalizer.cs (1)
756protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\OneToOneTransformerBase.cs (2)
109private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
Transforms\PerGroupTransformBase.cs (6)
62public Func<int, bool> GetDependencies(Func<int, bool> predicate) 165var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 183private DataViewRowCursor GetRowCursorCore(Func<int, bool> predicate) 189var predInput = bindings.GetDependencies(predicate); 202protected abstract Delegate[] CreateGetters(TState state, Func<int, bool> predicate);
Transforms\RangeFilter.cs (12)
201protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 212var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 213Func<int, bool> inputPred = GetActive(predicate, out bool[] active); 225var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 226Func<int, bool> inputPred = GetActive(predicate, out bool[] active); 249private Func<int, bool> GetActive(Func<int, bool> predicate, out bool[] active) 270protected readonly Func<Double, bool> CheckBounds; 283CheckBounds = Parent._complement ? (Func<Double, bool>)TestNotCC : TestCC; 285CheckBounds = Parent._complement ? (Func<Double, bool>)TestNotCO : TestCO; 290CheckBounds = Parent._complement ? (Func<Double, bool>)TestNotOC : TestOC; 292CheckBounds = Parent._complement ? (Func<Double, bool>)TestNotOO : TestOO;
Transforms\RowShufflingTransformer.cs (1)
245protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate)
Transforms\RowToRowTransformerBase.cs (6)
78public virtual Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 107protected abstract Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer); 109Func<int, bool> IRowMapper.GetDependencies(Func<int, bool> activeOutput) 113private protected abstract Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput);
Transforms\SkipTakeFilter.cs (1)
205protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate)
Transforms\SlotsDroppingTransformer.cs (1)
719protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\TransformBase.cs (13)
69var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 94protected abstract bool? ShouldUseParallelCursors(Func<int, bool> predicate); 328ITransposeDataView transposedInput, Func<DataViewType, string> testType) 365ITransposeDataView transposeInput, Func<DataViewType, string> testType) 499IDataView input, Func<DataViewType, string> testType) 513IDataView input, Func<DataViewType, string> testType) 527IDataView input, Func<DataViewType, string> testType) 544IDataView newInput, Func<DataViewType, string> checkType) 716protected sealed override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 728protected virtual bool WantParallelCursors(Func<int, bool> predicate) 738Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 750var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 821Func<int, bool> activeInfos =
Transforms\TypeConverting.cs (1)
467protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\ValueMapping.cs (1)
1048protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Transforms\ValueToKeyMappingTransformer.cs (1)
756protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Utilities\ColumnCursor.cs (6)
65Delegate convert = (Func<ReadOnlyMemory<char>, string>)((ReadOnlyMemory<char> txt) => txt.ToString()); 66Func<IDataView, int, Func<int, T>, IEnumerable<T>> del = GetColumnConvert; 86Delegate convert = (Func<ReadOnlyMemory<char>, string>)((ReadOnlyMemory<char> txt) => txt.ToString()); 87Func<IDataView, int, Func<int, long>, IEnumerable<long[]>> del = GetColumnArrayConvert; 116private static IEnumerable<TOut> GetColumnConvert<TOut, TData>(IDataView data, int col, Func<TData, TOut> convert) 156private static IEnumerable<TOut[]> GetColumnArrayConvert<TOut, TData>(IDataView data, int col, Func<TData, TOut> convert)
Microsoft.ML.DataView (1)
DataViewSchema.cs (1)
271public void Add(Annotations annotations, Func<string, bool> selector)
Microsoft.ML.Ensemble (1)
OutputCombiners\BaseStacking.cs (1)
170List<FeatureSubsetModel<TOutput>> models, Func<float, T> labelConvert)
Microsoft.ML.GenAI.Samples (1)
Mistral\Mistral_7B_Instruct.cs (1)
135functionMap: new Dictionary<string, Func<string, Task<string>>>
Microsoft.ML.ImageAnalytics (7)
ImageGrayscale.cs (1)
162protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
ImageLoader.cs (3)
206protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 216private Delegate MakeGetterImageDataViewType(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 263private Delegate MakeGetterVectorDataViewByteType(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
ImagePixelExtractor.cs (1)
294protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
ImageResizer.cs (1)
272protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
VectorToImageTransform.cs (1)
325protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Microsoft.ML.InternalCodeAnalyzer (2)
NameFixProvider.cs (2)
75Func<string, string> renamer = null; 103SyntaxNode identifier, string name, Func<string, string> renamer, CancellationToken cancellationToken)
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
597protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Microsoft.ML.OnnxConverter (1)
OnnxContextImpl.cs (1)
171private string GetUniqueName(string prefix, Func<string, bool> pred)
Microsoft.ML.OnnxTransformer (23)
DnnImageFeaturizerTransform.cs (3)
18/// <seealso cref="OnnxCatalog.DnnFeaturizeImage(TransformsCatalog, string, Func{DnnImageFeaturizerInput, EstimatorChain{ColumnCopyingTransformer}}, string)"/> 82/// <seealso cref="OnnxCatalog.DnnFeaturizeImage(TransformsCatalog, string, Func{DnnImageFeaturizerInput, EstimatorChain{ColumnCopyingTransformer}}, string)"/> 98internal DnnImageFeaturizerEstimator(IHostEnvironment env, string outputColumnName, Func<DnnImageFeaturizerInput, EstimatorChain<ColumnCopyingTransformer>> modelFactory, string inputColumnName = null)
OnnxCatalog.cs (1)
540Func<DnnImageFeaturizerInput, EstimatorChain<ColumnCopyingTransformer>> modelFactory,
OnnxTransform.cs (6)
608private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 615protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 618private Delegate CreateGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, OnnxRuntimeOutputCacher outputCacher) 641public override Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 762var caster = _parent.Model.ModelInfo.OutputsInfo[_parent.MapDataViewColumnToOnnxOutputTensor(iinfo)].Caster;
OnnxTypeParser.cs (8)
268public static IEnumerable<TDst> CastOnnxSequenceToIEnumerable<TSrc, TDst>(IEnumerable<TSrc> o, Func<TSrc, object> caster) 281/// Create a <see cref="Func{T, TResult}"/> to map a <see cref="NamedOnnxValue"/> to the associated .NET <see langword="object"/>. 287public static Func<NamedOnnxValue, object> GetDataViewValueCasterAndResultedType(OnnxCSharpToProtoWrapper.TypeProto typeProto, out Type resultedType) 306Func<NamedOnnxValue, object> caster = (NamedOnnxValue value) => 325Func<NamedOnnxValue, object> caster = (NamedOnnxValue value) => methodSpecialized.Invoke(value, new object[] { }); 340var elementCaster = GetDataViewValueCasterAndResultedType(typeProto.SequenceType.ElemType, out Type elementType); 351Func<NamedOnnxValue, object> caster = (NamedOnnxValue value) => 374Func<NamedOnnxValue, object> caster = (NamedOnnxValue value) =>
OnnxUtils.cs (5)
130public Func<NamedOnnxValue, object> Caster { get; } 132public OnnxVariableInfo(string name, OnnxShape shape, Type typeInOnnxRuntime, DataViewType mlnetType, Func<NamedOnnxValue, object> caster) 272var casterPool = new Dictionary<string, Func<NamedOnnxValue, object>>(); 299Dictionary<string, Func<NamedOnnxValue, object>> casterPool) 308var caster = casterPool?[name];
Microsoft.ML.Parquet (1)
PartitionedFileLoader.cs (1)
681private Delegate MarshalGetter(Func<DataViewSchema.Column, ValueGetter<DataViewSchema.Column>> func, Type type, DataViewSchema.Column column)
Microsoft.ML.PCA (1)
PcaTransformer.cs (1)
569protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Microsoft.ML.StandardTrainers (10)
Optimizer\LineSearch.cs (6)
22float Minimize(Func<float, float> func); 274private readonly Func<float, float> _func; 289public StepAndValue(Func<float, float> func) 295public StepAndValue(Func<float, float> func, float initStep) 330public float Minimize(Func<float, float> func) 336private float FindMinimum(Func<float, float> func)
Standard\ModelStatistics.cs (1)
490Func<float, string> decorateProbabilityString = (float probZ) =>
Standard\SdcaBinary.cs (2)
811Func<DataViewRowId, long> getIndexFromId = GetIndexFromIdGetter(idToIdx, biasReg.Length); 1110private protected Func<DataViewRowId, long> GetIndexFromIdGetter(IdToIdxLookup idToIdx, int biasLength)
Standard\SdcaMulticlass.cs (1)
200Func<DataViewRowId, long> getIndexFromId = GetIndexFromIdGetter(idToIdx, biasReg.Length);
Microsoft.ML.TensorFlow (5)
TensorflowTransform.cs (5)
641private Delegate CreateGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, OutputCache outputCache) 653public override Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 698protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 779private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
Microsoft.ML.TestFramework (2)
BaseTestBaseline.cs (2)
479private IEnumerator<string> LineEnumerator(TextReader reader, Func<string, bool> stop) 501Func<string, bool> stop = x => x == tailSignature;
Microsoft.ML.TestFrameworkCommon (3)
src\Common\tests\RetryHelper.cs (3)
15private static readonly Func<int, int> _defaultBackoffFunc = i => Math.Min(i * 100, 60_000); 24public static void Execute(Action test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null) 74public static async Task ExecuteAsync(Func<Task> test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
Microsoft.ML.Tests (6)
ExpressionLanguageTests\ExpressionLanguageTests.cs (3)
247var getters = new Func<ReadOnlyMemory<char>, bool>[types.Length]; 285private Func<ReadOnlyMemory<char>, bool> GetGetter(int i, DataViewType dst, object[] args) 479((Func<I8, I8>)(X)).GetMethodInfo(),
PermutationFeatureImportanceTests.cs (2)
959Func<T, double> metricSelector) 967Func<T, double> metricSelector)
Scenarios\Api\TestApi.cs (1)
356Func<IDataView, List<string>> getWorkclass = (IDataView view) =>
Microsoft.ML.TimeSeries (36)
PredictionEngine.cs (2)
44Action<PingerArgument> CreatePinger(DataViewRow input, Func<int, bool> activeOutput, out Action disposer); 265private protected override Func<DataViewSchema, IRowToRowMapper> TransformerChecker(IExceptionContext ectx, ITransformer transformer)
SequentialAnomalyDetectionTransformBase.cs (4)
342public Func<int, bool> GetDependencies(Func<int, bool> activeOutput) 352public Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 380public Action<PingerArgument> CreatePinger(DataViewRow input, Func<int, bool> activeOutput, out Action disposer)
SequentialForecastingTransformBase.cs (4)
146public Func<int, bool> GetDependencies(Func<int, bool> activeOutput) 156public Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 221public Action<PingerArgument> CreatePinger(DataViewRow input, Func<int, bool> activeOutput, out Action disposer)
SequentialTransformBase.cs (1)
371protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate)
SequentialTransformerBase.cs (17)
573protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 612var active = RowCursorUtils.FromColumnsToPredicate(activeColumns, OutputSchema); 810private bool[] GetActive(Func<int, bool> predicate, out Func<int, bool> predicateInput) 820var predicateOut = GetActiveOutputColumns(active); 823var predicateIn = _mapper.GetDependencies(predicateOut); 837private IEnumerable<DataViewSchema.Column> GetActive(Func<int, bool> predicate) 839Func<int, bool> predicateInput; 845private Func<int, bool> GetActiveOutputColumns(bool[] active) 858protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 868Func<int, bool> predicateInput; 869var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 879Func<int, bool> predicateInput; 880var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 922var predicate = RowCursorUtils.FromColumnsToPredicate(dependingColumns, OutputSchema); 937var pred = GetActiveOutputColumns(activeArr); 1030var pred = parent.GetActiveOutputColumns(active);
SrCnnEntireAnomalyDetector.cs (4)
164public Func<int, bool> GetDependencies(Func<int, bool> predicate) 249protected override Func<int, bool> GetSchemaBindingDependencies(Func<int, bool> predicate)
SrCnnTransformBase.cs (4)
185public Func<int, bool> GetDependencies(Func<int, bool> activeOutput) 195public Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 223public Action<PingerArgument> CreatePinger(DataViewRow input, Func<int, bool> activeOutput, out Action disposer)
Microsoft.ML.Tokenizers (1)
Utils\TokenizerExtensions.cs (1)
16public static T? ArgMin<T>(this IEnumerable<T> source, Func<T, int> getValue)
Microsoft.ML.Tokenizers.Data.Tests (3)
src\Common\tests\RetryHelper.cs (3)
15private static readonly Func<int, int> _defaultBackoffFunc = i => Math.Min(i * 100, 60_000); 24public static void Execute(Action test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null) 74public static async Task ExecuteAsync(Func<Task> test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
Microsoft.ML.Tokenizers.Tests (3)
src\Common\tests\RetryHelper.cs (3)
15private static readonly Func<int, int> _defaultBackoffFunc = i => Math.Min(i * 100, 60_000); 24public static void Execute(Action test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null) 74public static async Task ExecuteAsync(Func<Task> test, int maxAttempts = 5, Func<int, int>? backoffFunc = null, Predicate<Exception>? retryWhen = null, [CallerMemberName] string? testName = null)
Microsoft.ML.TorchSharp (17)
AutoFormerV2\ObjectDetectionTrainer.cs (4)
790protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 876public override Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 985private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
NasBert\NasBertTrainer.cs (1)
566protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
NasBert\NerTrainer.cs (2)
437private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
NasBert\SentenceSimilarityTrainer.cs (2)
294private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
NasBert\TextClassificationTrainer.cs (2)
371private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
Roberta\QATrainer.cs (4)
761protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 827public override Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 939private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
TorchSharpBaseTrainer.cs (2)
485protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 490public override Delegate[] CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer)
Microsoft.ML.Transforms (81)
CustomMappingCatalog.cs (1)
81public static IDataView FilterByCustomPredicate<TSrc>(this DataOperationsCatalog catalog, IDataView input, Func<TSrc, bool> filterPredicate)
CustomMappingFilter.cs (7)
40var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 42Func<int, bool> inputPred = TypedSrc.GetDependencies(predicate); 57private readonly Func<TSrc, bool> _predicate; 61public CustomMappingFilter(IHostEnvironment env, IDataView input, Func<TSrc, bool> predicate) 76var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, Schema); 78Func<int, bool> inputPred = TypedSrc.GetDependencies(predicate); 114var predicate = parent._predicate;
CustomMappingTransformer.cs (3)
130Delegate[] IRowMapper.CreateGetters(DataViewRow input, Func<int, bool> activeOutput, out Action disposer) 177Func<int, bool> IRowMapper.GetDependencies(Func<int, bool> activeOutput)
Dracula\CountTableTransformer.cs (1)
672protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Expression\BuiltinFunctions.cs (1)
82public static MethodInfo Fn<T1, T2>(Func<T1, T2> fn)
Expression\CodeGen.cs (2)
50{ typeFn = typeof(Func<,>); break; } 677private void CallFnc<TSrc, TDst>(Func<TSrc, TDst> fn)
ExpressionTransformer.cs (7)
463var fn = (Func<T0, TDst>)del; 607var fn = (Func<T0, TDst>)del; 966protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 976private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
GcnTransform.cs (1)
360protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
GroupTransform.cs (4)
161var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 165protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 341private int[] GetColumnIds(DataViewSchema schema, string[] names, Func<string, Exception> except) 515public Cursor(GroupTransform parent, Func<int, bool> predicate)
KeyToVectorMapping.cs (1)
336protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
LoadTransform.cs (1)
91Func<string, bool> predicate =
MissingValueDroppingTransformer.cs (1)
217protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
MissingValueIndicatorTransformer.cs (1)
235protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
MissingValueReplacing.cs (2)
511Func<int[], VBuffer<int>> function = CreateVBuffer<int>; 622protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
OptionalColumnTransform.cs (10)
201public Func<int, bool> GetDependencies(Func<int, bool> predicate) 223var predicate = RowCursorUtils.FromColumnsToPredicate(dependingColumns, AsSchema); 224Func<int, bool> dependencies = GetDependencies(predicate); 317protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 326var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 328var inputPred = _bindings.GetDependencies(predicate); 340var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 341var inputPred = _bindings.GetDependencies(predicate); 378Func<int, bool> activeInfos =
PermutationFeatureImportance.cs (1)
26Func<IDataView, TMetric> evaluationFunc,
PermutationFeatureImportanceExtensions.cs (1)
657Func<IDataView, TMetric> evaluationFunc,
ProduceIdTransform.cs (7)
71public Func<int, bool> GetDependencies(Func<int, bool> predicate) 144var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 145var inputPred = _bindings.GetDependencies(predicate); 156var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 157var inputPred = _bindings.GetDependencies(predicate); 167protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate)
RandomFourierFeaturizing.cs (1)
502protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
StatefulCustomMappingTransformer.cs (5)
131Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 135var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 220Func<int, bool> inputPred = c => active[c]; 231Func<int, bool> needCol = c => columnsNeeded == null ? false : columnsNeeded.Any(x => x.Index == c); 244protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate)
StatefulFilterTransform.cs (2)
107var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 109Func<int, bool> inputPred = c => activeInputs[c];
Text\LdaTransform.cs (1)
596protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Text\NgramHashingTransformer.cs (3)
558protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 589private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
Text\NgramTransform.cs (1)
670protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Text\StopWordsRemovingTransformer.cs (4)
402protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 507private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput) 1096protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Text\TextNormalizing.cs (1)
326protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Text\TokenizingByCharacters.cs (1)
464protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Text\WordBagTransform.cs (3)
300protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 330private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
Text\WordEmbeddingsExtractor.cs (1)
543protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
Text\WordTokenizing.cs (1)
234protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer)
UngroupTransform.cs (5)
166protected override bool? ShouldUseParallelCursors(Func<int, bool> predicate) 182var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 193var predicate = RowCursorUtils.FromColumnsToPredicate(columnsNeeded, OutputSchema); 385public bool[] GetActiveInput(Func<int, bool> predicate) 479public Cursor(IChannelProvider provider, DataViewRowCursor input, UngroupBinding schema, Func<int, bool> predicate)
Microsoft.ML.Vision (3)
DnnRetrainTransform.cs (3)
855protected override Delegate MakeGetter(DataViewRow input, int iinfo, Func<int, bool> activeOutput, out Action disposer) 946private protected override Func<int, bool> GetDependenciesCore(Func<int, bool> activeOutput)
Microsoft.NET.Build.Containers (4)
LocalDaemons\ContainerArchive.cs (1)
113Func<string, string> layerPathFunc,
LocalDaemons\ContainerRuntimeOperations.cs (1)
88Func<string, string[]> getArguments,
LocalDaemons\DockerCli.cs (1)
332Func<string, string> layerPathFunc,
Registry\Registry.cs (1)
616Func<Descriptor, Task> uploadLayerFunc = async (descriptor) =>
Microsoft.NET.Build.Extensions.Tasks (1)
src\sdk\src\Tasks\Common\ConflictResolution\ConflictResolver.cs (1)
30public void ResolveConflicts(IEnumerable<TConflictItem> conflictItems, Func<TConflictItem, string?> getItemKey,
Microsoft.NET.Build.Tasks (22)
FrameworkReferenceResolver.cs (2)
12private readonly Func<string, string> _getEnvironmentVariable; 19public FrameworkReferenceResolver(Func<string, string> getEnvironmentVariable)
GenerateDepsFile.cs (1)
167Func<ITaskItem, bool> isUserRuntimeAssembly = item => userRuntimeAssemblySet.Contains(item.ItemSpec);
ReferenceInfo.cs (2)
58Func<ITaskItem, bool> isRuntimeAssembly, 118Func<ITaskItem, bool> isRuntimeAssembly)
ResolvePackageAssets.cs (3)
1182Func<LockFileTargetLibrary, IEnumerable<LockFileItem>> getAssets, 1791Func<LockFileTargetLibrary, IEnumerable<T>> getAssets, 1792Func<T, bool> filter = null,
SingleProjectInfo.cs (1)
74Func<ITaskItem, bool> isRuntimeAssembly)
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (2)
11private readonly Func<string, string?> _getEnvironmentVariable; 25public CliFolderPathCalculatorCore(Func<string, string?> getEnvironmentVariable)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (1)
69internal SdkDirectoryWorkloadManifestProvider(string? sdkRootPath, string? sdkVersion, Func<string, string?> getEnvironmentVariable, string? userProfileDir, string? globalJsonPath = null, string? workloadSetVersion = null)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.cs (2)
323private static List<T> ReadStringArray<T>(ref Utf8JsonStreamReader reader, Func<string, T> map) 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadManifestReader.Localization.cs (2)
18static readonly Func<string, bool> _fileExists = File.Exists; 21internal static string? GetLocalizationCatalogFilePath(string manifestFilePath, CultureInfo culture, Func<string, bool> fileExists)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (5)
25private Func<string, bool>? _fileExistOverride; 26private Func<string, bool>? _directoryExistOverride; 28public static WorkloadResolver Create(IWorkloadManifestProvider manifestProvider, string dotnetRootPath, string sdkVersion, string? userProfileDir, Func<string, string?>? getEnvironmentVariable = null) 253internal void ReplaceFilesystemChecksForTest(Func<string, bool> fileExists, Func<string, bool> directoryExists)
src\sdk\src\Tasks\Common\ConflictResolution\ConflictResolver.cs (1)
30public void ResolveConflicts(IEnumerable<TConflictItem> conflictItems, Func<TConflictItem, string?> getItemKey,
Microsoft.NET.HostModel (2)
ResourceUpdater.cs (1)
323private static void ModifyI32(MemoryMappedViewAccessor buffer, int position, Func<int, int> modifier) =>
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\Http\HttpClientExtensions.cs (1)
303Func<CancellationToken, System.Threading.Tasks.Task> func,
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
UpdateStaticWebAssetEndpoints.cs (6)
155private static (T[], bool replaced) RemoveAllIfFound<T>(T[] elements, Func<T, string> getName, Func<T, string> getValue, string name, string value) 185private static (T[], bool replaced) RemoveFirstIfFound<T>(T[] elements, Func<T, string> getName, Func<T, string> getValue, string name, string value) 259Func<T, string> getName, 260Func<T, string> getValue,
Microsoft.NET.Sdk.WorkloadManifestReader (10)
SdkDirectoryWorkloadManifestProvider.cs (1)
69internal SdkDirectoryWorkloadManifestProvider(string? sdkRootPath, string? sdkVersion, Func<string, string?> getEnvironmentVariable, string? userProfileDir, string? globalJsonPath = null, string? workloadSetVersion = null)
WorkloadManifestReader.cs (2)
323private static List<T> ReadStringArray<T>(ref Utf8JsonStreamReader reader, Func<string, T> map) 372private static Dictionary<string, TValue> ReadStringDictionary<TValue>(ref Utf8JsonStreamReader reader, Func<string, TValue> mapValue)
WorkloadManifestReader.Localization.cs (2)
18static readonly Func<string, bool> _fileExists = File.Exists; 21internal static string? GetLocalizationCatalogFilePath(string manifestFilePath, CultureInfo culture, Func<string, bool> fileExists)
WorkloadResolver.cs (5)
25private Func<string, bool>? _fileExistOverride; 26private Func<string, bool>? _directoryExistOverride; 28public static WorkloadResolver Create(IWorkloadManifestProvider manifestProvider, string dotnetRootPath, string sdkVersion, string? userProfileDir, Func<string, string?>? getEnvironmentVariable = null) 253internal void ReplaceFilesystemChecksForTest(Func<string, bool> fileExists, Func<string, bool> directoryExists)
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (2)
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (2)
11private readonly Func<string, string?> _getEnvironmentVariable; 25public CliFolderPathCalculatorCore(Func<string, string?> getEnvironmentVariable)
Microsoft.Private.Windows.Core (12)
System\Collections\Generic\ListConverter.cs (2)
18private readonly Func<TIn, TOut> _converter; 20public ListConverter(IList values, Func<TIn, TOut> converter)
System\Private\Windows\Ole\Composition.cs (1)
193Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
719Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\DataRequest.cs (1)
30public Func<TypeName, Type?>? Resolver { get; init; } = null;
System\Private\Windows\Ole\DataStore.cs (1)
199Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\FormatEnumerator.cs (1)
31public FormatEnumerator(IDataObjectInternal dataObject, Func<string, int> getFormatId)
System\Private\Windows\Ole\IDataObjectInternal.cs (4)
96/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 103/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 112/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 151Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\TypeBinder.cs (1)
43private readonly Func<TypeName, Type?>? _resolver;
Microsoft.TemplateEngine.Cli (79)
ChoiceTemplateParameter.cs (2)
48internal override Func<HelpContext, string?>? GetCustomFirstColumnText(TemplateOption o) 94private static Func<ArgumentResult, string> GetParseChoiceArgument(ChoiceTemplateParameter parameter)
CliTemplateParameter.cs (4)
189internal virtual Func<HelpContext, string?>? GetCustomFirstColumnText(TemplateOption o) 198internal Func<HelpContext, string?>? GetCustomSecondColumnText() 313private static Func<ArgumentResult, T> GetParseArgument<T>(CliTemplateParameter parameter, Func<string?, (bool, T)> convert)
Commands\alias\AliasAddCommand.cs (1)
11internal sealed class AliasAddCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewAliasCommandDefinitionBase definition)
Commands\alias\AliasCommand.cs (1)
11internal sealed class AliasCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewAliasCommandDefinition definition)
Commands\alias\AliasShowCommand.cs (1)
11internal sealed class AliasShowCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewAliasShowCommandDefinition definition)
Commands\AliasAssignmentCoordinator.cs (9)
20Func<string, bool> isAliasTaken = takenAliases.Contains; 21Func<string, bool> isLongNamePredefined = predefinedLongOverrides.Contains; 22Func<string, bool> isShortNamePredefined = predefinedShortOverrides.Contains; 56Func<string, bool> isAliasTaken, 94Func<string, bool> isAliasTaken, 95Func<string, bool> isLongNamePredefined, 137Func<string, bool> isAliasTaken, 138Func<string, bool> isShortNamePredefined, 164private static string GetFreeShortName(Func<string, bool> isAliasTaken, string name, string prefix = "")
Commands\BaseCommand.cs (4)
23internal abstract class BaseCommand<TDefinition>(Func<ParseResult, ITemplateEngineHost> hostBuilder, TDefinition definition) 29protected static readonly Dictionary<string, Func<Func<ParseResult, ITemplateEngineHost>, Command, Command>> SubcommandFactories = new() 75internal BaseCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, TDefinition definition) 135protected static void PrintDeprecationMessage<TDeprecatedCommand, TNewCommand>(ParseResult parseResult, Func<TNewCommand, Option>? additionalNewOptionSelector = null)
Commands\create\InstantiateCommand.cs (1)
20internal InstantiateCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewCreateCommandDefinition definition)
Commands\details\DetailsCommand.cs (1)
12internal sealed class DetailsCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewDetailsCommandDefinition definition)
Commands\Example.cs (3)
96internal Example<T> WithOption(Func<T, Option> optionSelector, params string[] args) 122public Example<T> WithArgument(Func<T, Argument> argumentSelector) 125public Example<TSubcommand> WithSubcommand<TSubcommand>(Func<T, TSubcommand> subcommandSelector)
Commands\FilterOptionDefinition.cs (11)
66private static Func<ITemplatePackageInfo, bool> PackageMatchFilter(string? packageArg) 83Func<string?, Func<ITemplateInfo, MatchInfo?>> matchFilter, 84Func<TemplateResolutionResult, bool> mismatchCriteria, 94internal Func<string?, Func<ITemplateInfo, MatchInfo?>> TemplateMatchFilter { get; } = matchFilter; 99internal Func<TemplateResolutionResult, bool> MismatchCriteria { get; } = mismatchCriteria; 110internal sealed class PackageFilterOptionDefinition(Func<string?, Func<ITemplatePackageInfo, bool>> matchFilter) : FilterOptionDefinition 116internal Func<string?, Func<ITemplatePackageInfo, bool>> PackageMatchFilter { get; } = matchFilter;
Commands\install\BaseInstallCommand.cs (1)
11internal abstract class BaseInstallCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewInstallCommandDefinition definition)
Commands\install\InstallCommand.cs (1)
11internal sealed class InstallCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewInstallCommandDefinition definition)
Commands\install\LegacyInstallCommand.cs (1)
11internal sealed class LegacyInstallCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewInstallCommandDefinition definition)
Commands\list\BaseListCommand.cs (1)
16Func<ParseResult, ITemplateEngineHost> hostBuilder,
Commands\list\LegacyListCommand.cs (1)
11internal class LegacyListCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewListCommandDefinition definition)
Commands\list\ListCommand.cs (1)
11internal sealed class ListCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewListCommandDefinition definition)
Commands\NewCommand.cs (1)
13internal partial class NewCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewCommandDefinition definition)
Commands\search\BaseSearchCommand.cs (1)
12internal abstract class BaseSearchCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewSearchCommandDefinition definition)
Commands\search\LegacySearchCommand.cs (1)
11internal sealed class LegacySearchCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewSearchCommandDefinition definition)
Commands\search\SearchCommand.cs (1)
11internal sealed class SearchCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewSearchCommandDefinition definition)
Commands\uninstall\BaseUninstallCommand.cs (1)
11internal abstract class BaseUninstallCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewUninstallCommandDefinition definition)
Commands\uninstall\LegacyUninstallCommand.cs (1)
11internal sealed class LegacyUninstallCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewUninstallCommandDefinition definition)
Commands\uninstall\UninstallCommand.cs (1)
11internal sealed class UninstallCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewUninstallCommandDefinition definition)
Commands\update\BaseUpdateCommand.cs (1)
16internal abstract class BaseUpdateCommand<TDefinition>(Func<ParseResult, ITemplateEngineHost> hostBuilder, TDefinition definition)
Commands\update\LegacyUpdateApplyCommand.cs (1)
11internal sealed class LegacyUpdateApplyCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewUpdateApplyLegacyCommandDefinition definition)
Commands\update\LegacyUpdateCheckCommand.cs (1)
11internal sealed class LegacyUpdateCheckCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewUpdateCheckLegacyCommandDefinition definition)
Commands\update\UpdateCommand.cs (1)
11internal sealed class UpdateCommand(Func<ParseResult, ITemplateEngineHost> hostBuilder, NewUpdateCommandDefinition definition)
NewCommandFactory.cs (1)
12public static Command Create(Func<ParseResult, ICliTemplateEngineHost> hostBuilder, NewCommandDefinition definition)
PostActionProcessors\PostActionProcessorBase.cs (1)
56Func<string, bool>? matchCriteria = null)
TabularOutput\TabularOutput.cs (4)
28Func<T, string> binder, 50Func<T, string> binder, 317private readonly Func<T, string> _binder; 323Func<T, string> binder,
TemplateResolution\CliFilters.cs (4)
17internal static Func<TemplateGroup, MatchInfo?> ExactShortNameTemplateGroupFilter(string name) 42internal static Func<TemplateGroup, MatchInfo?> NameTemplateGroupFilter(string? name) 86internal static Func<ITemplateInfo, IEnumerable<MatchInfo>>? EmptyTemplateParameterFilter() => (templateInfo) => Array.Empty<MatchInfo>(); 94internal static Func<TemplateGroup, MatchInfo?> LanguageGroupFilter(string? language, string? defaultLanguage)
TemplateResolution\ListTemplateResolver.cs (2)
35IEnumerable<Func<TemplateGroup, MatchInfo?>> groupFilters = new[] 40IEnumerable<Func<ITemplateInfo, MatchInfo?>> templateFilters =
TemplateResolution\TemplateGroupMatchInfo.cs (4)
193IEnumerable<Func<TemplateGroup, MatchInfo?>> groupFilters, 194IEnumerable<Func<ITemplateInfo, MatchInfo?>> templateInfoFilters, 195Func<ITemplateInfo, IEnumerable<MatchInfo>>? templateParametersFilter = null) 198foreach (Func<TemplateGroup, MatchInfo?>? filter in groupFilters)
TemplateSearch\CliHostSearchCacheData.cs (1)
14public static Func<object, object> Reader => (obj) =>
TemplateSearch\CliSearchFiltersFactory.cs (6)
27private static Func<TemplateSearchData, bool> IsNotHiddenBySearchFile => 38private Func<TemplatePackageSearchData, bool> AlreadyInstalledFilter => 49internal static Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> GetMatchingTemplatesFilter(SearchCommandArgs commandArgs) 56IEnumerable<Func<TemplateGroup, MatchInfo?>> groupFilters = new[] 61IEnumerable<Func<ITemplateInfo, MatchInfo?>> templateFilters = 83internal Func<TemplatePackageSearchData, bool> GetPackFilter(SearchCommandArgs commandArgs)
TemplateSearch\CliTemplateSearchCoordinatorFactory.cs (1)
14Dictionary<string, Func<object, object>> dataReaders = new()
Microsoft.TemplateEngine.Core (44)
Expressions\Cpp\Scope.cs (4)
43public static TResult EvaluateSides<TLeft, TRight, TResult>(object left, object right, Func<object, TLeft> convertLeft, Func<object, TRight> convertRight, Func<TLeft, TRight, TResult> combine) 50public static TResult EvaluateSides<T, TResult>(object left, object right, Func<object, T> convert, Func<T, T, TResult> combine) 97private static T EvaluateSide<T>(object side, Func<object, T> convert)
Expressions\IOperatorMap.cs (1)
23IReadOnlyDictionary<TOperator, Func<IEvaluable, IEvaluable>> OperatorScopeLookupFactory { get; }
Expressions\OperatorSetBuilder.cs (31)
9private readonly Func<string, string> _decoder; 10private readonly Func<string, string> _encoder; 11private readonly Dictionary<Operators, Func<IEvaluable, IEvaluable>> _operatorScopeLookupFactory = new Dictionary<Operators, Func<IEvaluable, IEvaluable>>(); 18public OperatorSetBuilder(Func<string, string> encoder, Func<string, string> decoder) 43public IReadOnlyDictionary<Operators, Func<IEvaluable, IEvaluable>> OperatorScopeLookupFactory => _operatorScopeLookupFactory; 49public OperatorSetBuilder<TToken> Add(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 54public OperatorSetBuilder<TToken> And(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 65public OperatorSetBuilder<TToken> BitwiseAnd(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 70public OperatorSetBuilder<TToken> BitwiseOr(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 86public OperatorSetBuilder<TToken> Divide(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 96public OperatorSetBuilder<TToken> EqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 101public OperatorSetBuilder<TToken> Exponentiate(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 106public OperatorSetBuilder<TToken> GreaterThan(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 111public OperatorSetBuilder<TToken> GreaterThanOrEqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 122public OperatorSetBuilder<TToken> LeftShift(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 127public OperatorSetBuilder<TToken> LessThan(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 132public OperatorSetBuilder<TToken> LessThanOrEqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 149public OperatorSetBuilder<TToken> Multiply(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 154public OperatorSetBuilder<TToken> Not(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object>? evaluate = null) 162public OperatorSetBuilder<TToken> NotEqualTo(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 173public OperatorSetBuilder<TToken> Or(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 178public OperatorSetBuilder<TToken> Other(Operators @operator, TToken token, Func<IEvaluable, IEvaluable> nodeFactory) 185public OperatorSetBuilder<TToken> RightShift(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 190public OperatorSetBuilder<TToken> Subtract(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 213public OperatorSetBuilder<TToken> Xor(TToken token, Func<Operators, bool>? precedesOperator = null, Func<object?, object?, object>? evaluate = null) 218private static IEvaluable CreateBinaryChild(IEvaluable active, Operators op, Func<Operators, bool> precedesOperator, Func<object?, object?, object> evaluate) 266private static IEvaluable CreateUnaryChild(IEvaluable active, Operators op, Func<object?, object> evaluate) 528private OperatorSetBuilder<TToken> SetupBinary(Operators op, TToken token, Func<object?, object?, object> evaluate, Func<Operators, bool>? precedesOperator = null)
Expressions\ScopeBuilder.cs (4)
22private readonly IReadOnlyDictionary<TOperator, Func<IEvaluable, IEvaluable>> _operatorScopeFactory; 29private readonly Func<string, string> _valueDecoder; 30private readonly Func<string, string> _valueEncoder; 261if (_operatorScopeFactory.TryGetValue(op, out Func<IEvaluable, IEvaluable> factory))
Expressions\UnaryScope.cs (2)
8private readonly Func<object?, object?> _evaluate; 10public UnaryScope(IEvaluable? parent, TOperator @operator, Func<object?, object?> evaluate)
Operations\Include.cs (2)
16public Include(ITokenConfig startToken, ITokenConfig endToken, Func<string, Stream?> sourceStreamOpener, string? id, bool initialState) 29public Func<string, Stream?> SourceStreamOpener { get; }
Microsoft.TemplateEngine.Edge (23)
Constraints\WorkloadConstraintFactory.cs (4)
31private readonly Func<IReadOnlyList<string>, string> _remedySuggestionFactory; 37Func<IReadOnlyList<string>, string> remedySuggestionFactory) 49(IReadOnlyList<WorkloadInfo> workloads, Func<IReadOnlyList<string>, string> remedySuggestionFactory) = 85private static async Task<(IReadOnlyList<WorkloadInfo> Workloads, Func<IReadOnlyList<string>, string> RemedySuggestionFactory)> ExtractWorkloadInfoAsync(IEnumerable<IWorkloadsInfoProvider> workloadsInfoProviders, ILogger logger, CancellationToken token)
Settings\TemplatePackageManager.cs (2)
172public async Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(Func<ITemplateMatchInfo, bool> matchFilter, IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, CancellationToken cancellationToken)
Template\WellKnownSearchFilters.cs (7)
12public static Func<ITemplateInfo, MatchInfo?> NameFilter(string name) 57public static Func<ITemplateInfo, MatchInfo?> ContextFilter(string inputContext) 86public static Func<ITemplateInfo, MatchInfo?> TagFilter(string tagFilter) 105public static Func<ITemplateInfo, MatchInfo?> LanguageFilter(string language) 125public static Func<ITemplateInfo, MatchInfo?> BaselineFilter(string baselineName) 146public static Func<ITemplateInfo, MatchInfo?> ClassificationsFilter(string name) 191public static Func<ITemplateInfo, MatchInfo?> AuthorFilter(string author)
TemplateListFilter.cs (10)
17public static Func<ITemplateMatchInfo, bool> ExactMatchFilter => x => x.IsMatch; 24public static Func<ITemplateMatchInfo, bool> PartialMatchFilter => x => x.IsPartialMatch; 27public static IReadOnlyCollection<IFilteredTemplateInfo> FilterTemplates(IReadOnlyList<ITemplateInfo> templateList, bool exactMatchesOnly, params Func<ITemplateInfo, MatchInfo?>[] filters) 35foreach (Func<ITemplateInfo, MatchInfo?> filter in filters) 72public static IReadOnlyCollection<ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<ITemplateInfo> templateList, Func<ITemplateMatchInfo, bool> matchFilter, params Func<ITemplateInfo, MatchInfo?>[] filters) 80foreach (Func<ITemplateInfo, MatchInfo?> filter in filters) 106public static IReadOnlyCollection<Abstractions.TemplateFiltering.ITemplateMatchInfo> GetTemplateMatchInfo(IReadOnlyList<ITemplateInfo> templateList, Func<Abstractions.TemplateFiltering.ITemplateMatchInfo, bool> matchFilter, params Func<ITemplateInfo, Abstractions.TemplateFiltering.MatchInfo?>[] filters) 114foreach (Func<ITemplateInfo, Abstractions.TemplateFiltering.MatchInfo?> filter in filters)
Microsoft.TemplateEngine.IDE (3)
Bootstrapper.cs (3)
116public Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, bool exactMatchesOnly = true, CancellationToken cancellationToken = default) 118Func<ITemplateMatchInfo, bool> criteria; 365public async Task<IReadOnlyCollection<Edge.Template.IFilteredTemplateInfo>> ListTemplates(bool exactMatchesOnly, params Func<ITemplateInfo, Edge.Template.MatchInfo?>[] filters)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (6)
Validation\ActionValidationCheck.cs (4)
10internal ActionValidationCheck(string code, IValidationEntry.SeverityLevel severityLevel, Func<ITemplateValidationInfo, string> getDescription, Func<ITemplateValidationInfo, bool> action) 17internal Func<ITemplateValidationInfo, string> GetDescription { get; init; } 19internal Func<ITemplateValidationInfo, bool> Action { get; init; }
Validation\MultiValidationCheck.cs (2)
11internal MultiValidationCheck(string code, IValidationEntry.SeverityLevel severityLevel, Func<ITemplateValidationInfo, T, string> getDescription, Func<ITemplateValidationInfo, IEnumerable<T>> invalidElements) 20internal Func<ITemplateValidationInfo, IEnumerable<T>> InvalidElements { get; }
Microsoft.TemplateEngine.Utils (15)
EqualityExtensions.cs (3)
8public static bool AllAreTheSame<T, TValue>(this IEnumerable<T> items, Func<T, TValue?> selector) 14public static bool AllAreTheSame<T, TValue>(this IEnumerable<T> items, Func<T, TValue?> selector, IEqualityComparer<TValue?> comparer) 22public static bool AllAreTheSame<T, TValue>(this IEnumerable<T> items, Func<T, TValue?> selector, Func<TValue?, TValue?, bool> comparer)
FileFindHelpers.cs (1)
12public static IReadOnlyList<string> FindFilesAtOrAbovePath(IPhysicalFileSystem fileSystem, string startPath, string matchPattern, Func<string, bool>? secondaryFilter = null)
ListExtensions.cs (2)
10public static IEnumerable<IGrouping<TKey?, TElement>> GroupBy<TElement, TKey>(this IEnumerable<TElement> elements, Func<TElement, TKey?> grouper, Func<TElement, bool> hasGroupKey, IEqualityComparer<TKey?>? comparer = null)
WellKnownSearchFilters.cs (9)
18public static Func<ITemplateMatchInfo, bool> MatchesAllCriteria => 24public static Func<ITemplateMatchInfo, bool> MatchesAtLeastOneCriteria => 37public static Func<ITemplateInfo, MatchInfo?> NameFilter(string name) 88public static Func<ITemplateInfo, MatchInfo?> TypeFilter(string? inputType) 116public static Func<ITemplateInfo, MatchInfo?> ClassificationFilter(string? classification) 139public static Func<ITemplateInfo, MatchInfo?> LanguageFilter(string? language) 166public static Func<ITemplateInfo, MatchInfo?> BaselineFilter(string? baselineName) 195public static Func<ITemplateInfo, MatchInfo?> AuthorFilter(string? author) 233public static IEnumerable<Func<ITemplateInfo, MatchInfo?>> ConstraintFilters(IEnumerable<ITemplateConstraint> constraintDefinitions)
Microsoft.TemplateSearch.Common (25)
Abstractions\ITemplateSearchProvider.cs (2)
26Func<TemplatePackageSearchData, bool> packFilters, 27Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> matchingTemplatesFilter,
Abstractions\ITemplateSearchProviderFactory.cs (1)
25ITemplateSearchProvider CreateProvider(IEngineEnvironmentSettings environmentSettings, IReadOnlyDictionary<string, Func<object, object>> additionalDataReaders);
Providers\NuGetMetadataSearchProvider.cs (6)
26private readonly IReadOnlyDictionary<string, Func<object, object>> _additionalDataReaders = new Dictionary<string, Func<object, object>>(); 40IReadOnlyDictionary<string, Func<object, object>> additionalDataReaders) 54IReadOnlyDictionary<string, Func<object, object>> additionalDataReaders, 63Func<TemplatePackageSearchData, bool> packFilter, 64Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> matchingTemplatesFilter,
Providers\NuGetMetadataSearchProviderFactory.cs (1)
17IReadOnlyDictionary<string, Func<object, object>> additionalDataReaders)
TemplateDiscoveryMetadata\LegacySearchCacheReader.cs (5)
16internal static TemplateSearchCache ConvertTemplateDiscoveryMetadata(TemplateDiscoveryMetadata discoveryMetadata, IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders) 55internal static bool TryReadDiscoveryMetadata(IEngineEnvironmentSettings environmentSettings, string filePath, IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders, out TemplateDiscoveryMetadata? discoveryMetadata) 66internal static bool TryReadDiscoveryMetadata(JsonObject cacheObject, ILogger logger, IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders, out TemplateDiscoveryMetadata? discoveryMetadata) 208private static bool TryReadAdditionalData(ILogger logger, JsonObject cacheObject, IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders, out IReadOnlyDictionary<string, object>? additionalData) 227foreach (KeyValuePair<string, Func<object, object>> dataReadInfo in additionalDataReaders)
TemplateSearchCache\TemplatePackageSearchData.Json.cs (1)
17internal TemplatePackageSearchData(JsonObject jObject, ILogger logger, IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders = null)
TemplateSearchCache\TemplateSearchCache.Json.cs (3)
20IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders = null) 75IReadOnlyDictionary<string, Func<object, object>> additionalDataReaders, 79foreach (KeyValuePair<string, Func<object, object>> dataReadInfo in additionalDataReaders)
TemplateSearchCache\TemplateSearchData.Json.cs (1)
17internal TemplateSearchData(JsonObject jObject, ILogger logger, IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders = null)
TemplateSearchCoordinator.cs (5)
20IReadOnlyDictionary<string, Func<object, object>>? additionalDataReaders = null) 23IReadOnlyDictionary<string, Func<object, object>> additionalDataReaders1 = additionalDataReaders ?? new Dictionary<string, Func<object, object>>(); 40Func<TemplatePackageSearchData, bool> packFilter, 41Func<TemplatePackageSearchData, IReadOnlyList<ITemplateInfo>> matchingTemplatesFilter,
Microsoft.TestPlatform.CommunicationUtilities (7)
SocketClient.cs (2)
25private readonly Func<Stream, ICommunicationChannel> _channelFactory; 36protected SocketClient(Func<Stream, ICommunicationChannel> channelFactory)
SocketServer.cs (5)
24private readonly Func<TcpListener, Task<TcpClient>> _acceptClientAsync; 25private readonly Func<Stream, ICommunicationChannel> _channelFactory; 48protected SocketServer(Func<Stream, ICommunicationChannel> channelFactory) 54Func<Stream, ICommunicationChannel> channelFactory, 55Func<TcpListener, Task<TcpClient>> acceptClientAsync)
Microsoft.TestPlatform.CrossPlatEngine (2)
DataCollection\InProcDataCollector.cs (1)
74Func<Type, bool> filterPredicate;
Discovery\DiscoveryContext.cs (1)
34public ITestCaseFilterExpression? GetTestCaseFilter(IEnumerable<string>? supportedProperties, Func<string, TestProperty?> propertyProvider)
Microsoft.TestPlatform.Filter.Source (6)
Condition.cs (1)
155internal bool Evaluate(Func<string, object?> propertyValueProvider)
FastFilter.cs (2)
76internal bool Evaluate(Func<string, object?> propertyValueProvider) 177private static bool TryGetPropertyValue(string name, Func<string, object?> propertyValueProvider, out string? singleValue, out string[]? multiValues)
FilterExpression.cs (1)
381internal bool Evaluate(Func<string, object?> propertyValueProvider)
FilterExpressionWrapper.cs (1)
151public bool Evaluate(Func<string, object?> propertyValueProvider)
TestCaseFilterExpression.cs (1)
84public bool MatchTestCase(Func<string, object?> propertyValueProvider)
Microsoft.TestPlatform.Utilities (3)
InferRunSettingsHelper.cs (2)
630Func<string, bool> validator = (string xml) => 652Func<string, bool> validator = (string xml) =>
XmlUtilities.cs (1)
36internal static bool IsValidNodeXmlValue(string xmlNodeValue, Func<string, bool> validator)
Microsoft.VisualStudio.TestPlatform.Common (16)
RequestData.cs (1)
67internal Func<Uri, object?>? KnownExtensionInstanceFactory { get; set; }
src\vstest\src\Microsoft.TestPlatform.Filter.Source\Condition.cs (3)
155internal bool Evaluate(Func<string, object?> propertyValueProvider) 257internal bool ValidForProperties(IEnumerable<string> properties, Func<string, TestProperty?>? propertyProvider) 280private bool ValidForContainsOperation(Func<string, TestProperty?>? propertyProvider)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FastFilter.cs (2)
76internal bool Evaluate(Func<string, object?> propertyValueProvider) 177private static bool TryGetPropertyValue(string name, Func<string, object?> propertyValueProvider, out string? singleValue, out string[]? multiValues)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterExpression.cs (2)
141internal string[]? ValidForProperties(IEnumerable<string>? properties, Func<string, TestProperty?>? propertyProvider) 381internal bool Evaluate(Func<string, object?> propertyValueProvider)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterExpressionWrapper.cs (2)
136public string[]? ValidForProperties(IEnumerable<string>? supportedProperties, Func<string, TestProperty?>? propertyProvider) 151public bool Evaluate(Func<string, object?> propertyValueProvider)
src\vstest\src\Microsoft.TestPlatform.Filter.Source\TestCaseFilterExpression.cs (2)
61public string[]? ValidForProperties(IEnumerable<string>? supportedProperties, Func<string, TestProperty?> propertyProvider) 82public bool MatchTestCase(TestCase testCase, Func<string, object?> propertyValueProvider)
Utilities\FakesUtilities.cs (4)
101var crossPlatformConfigurator = TryGetFakesCrossPlatformDataCollectorConfigurator(); 176private static Func<IDictionary<string, FrameworkVersion>, DataCollectorSettings>? TryGetFakesCrossPlatformDataCollectorConfigurator() 185return (Func<IDictionary<string, FrameworkVersion>, DataCollectorSettings>)method.CreateDelegate(typeof(Func<IDictionary<string, FrameworkVersion>, DataCollectorSettings>));
Microsoft.VisualStudio.TestPlatform.ObjectModel (5)
Adapter\Interfaces\IRunContext.cs (1)
39ITestCaseFilterExpression? GetTestCaseFilter(IEnumerable<string>? supportedProperties, Func<string, TestProperty?> propertyProvider);
Adapter\Interfaces\ITestCaseFilterExpression.cs (1)
21bool MatchTestCase(TestCase testCase, Func<string, object?> propertyValueProvider);
Nuget.Frameworks\NuGetFrameworkUtility.cs (2)
18internal static T? GetNearest<T>(IEnumerable<T> items, NuGetFramework framework, Func<T, NuGetFramework> selector) where T : class 35Func<T, NuGetFramework> selector) where T : class
Utilities\XmlRunSettingsUtilities.cs (1)
349private static T? GetNodeValue<T>(string? settingsXml, string nodeName, Func<XmlReader, T> nodeParser)
Mono.Cecil (3)
Mono.Cecil.Metadata\Buffers.cs (1)
34 readonly Func<Table, int> counter;
Mono.Cecil.Metadata\Utilities.cs (1)
564 public static int GetSize (this CodedIndex self, Func<Table, int> counter)
Mono.Cecil.PE\Image.cs (1)
60 readonly Func<Table, int> counter;
Mono.Cecil.Rocks (5)
Mono.Cecil.Rocks\Functional.cs (5)
18 public static System.Func<A, R> Y<A, R> (System.Func<System.Func<A, R>, System.Func<A, R>> f) 20 System.Func<A, R> g = null;
MSBuild (1)
JsonOutputFormatter.cs (1)
27internal void AddPropertiesInJsonFormat(string[] propertyNames, Func<string, string> getProperty)
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
235[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,>))]
netstandard (1)
netstandard.cs (1)
803[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,>))]
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
961Func<TProject, PackageSpec> getPackageSpec)
NuGet.CommandLine.XPlat (17)
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (3)
389Func<InstalledPackageReference, bool> topLevelPackagesFilter, 390Func<InstalledPackageReference, bool> transitivePackagesFilter) 404Func<InstalledPackageReference, bool> filter)
Commands\PackageSearch\PackageSearchRunner.cs (1)
77Func<PackageSource, Task<IEnumerable<IPackageSearchMetadata>>> searchPackageSourceAsync =
Commands\Why\WhyCommand.cs (1)
51internal static void Register(Command rootCommand, Lazy<IAnsiConsole> console, Func<WhyCommandArgs, Task<int>> action)
Utility\ListPackageHelper.cs (6)
15internal static readonly Func<InstalledPackageReference, bool> TopLevelPackagesFilterForOutdated = 18internal static readonly Func<InstalledPackageReference, bool> TransitivePackagesFilterForOutdated = 22internal static readonly Func<InstalledPackageReference, bool> PackagesFilterForDeprecated = 24internal static readonly Func<InstalledPackageReference, bool> LatestPackagesFilterForDeprecated = 27internal static readonly Func<InstalledPackageReference, bool> PackagesFilterForVulnerable = 29internal static readonly Func<InstalledPackageReference, bool> LatestPackagesFilterForVulnerable =
Utility\MSBuildAPIUtility.cs (3)
104Func<string, bool> projectShouldBuild = (Func<string, bool>)Delegate.CreateDelegate(typeof(Func<string, bool>), sln, projectShouldBuildMethod);
Utility\ProjectPackagesPrintUtility.cs (1)
118var valueSelectors = new List<Func<ListReportPackage, object>>
Utility\TableParser.cs (2)
19params Func<T, object>[] valueSelectors) 27params Func<T, object>[] valueSelectors)
NuGet.Commands (9)
CommandRunners\DeleteRunner.cs (1)
29Func<string, bool> confirmFunc,
RestoreCommand\RestoreCommandProvidersCache.cs (1)
215Func<SourceRepository, IVulnerabilityInformationProvider> factory = s => new VulnerabilityInformationProvider(s, log, isAuditSource: isAuditSource);
RestoreCommand\Utility\LockFileUtils.cs (1)
970private static void ClearIfExists<T>(IList<T> group, Func<string, T> factory, bool copyProperties = true) where T : LockFileItem
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
src\nuget-client\build\Shared\TaskResultCache.cs (3)
72public Task<TValue> GetOrAddAsync<TState>(TKey key, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 82/// <param name="valueFactory">A <see cref="Func{T1, TResult}" /> to execute asynchronously if a cached operation does not exist.</param> 86public Task<TValue> GetOrAddAsync<TState>(TKey key, bool refresh, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken)
NuGet.Common (8)
ConcurrencyUtilities.cs (2)
50Func<CancellationToken, Task<T>> action, 144internal static void ExecuteWithFileLocked(string filePath, Action action, Func<string, FileStream> acquireFileStream, int numberOfRetries)
PathUtil\FileUtility.cs (1)
121public static async Task ReplaceAsync(Func<string, Task> writeSourceFile, string destFilePath)
PathUtil\PathResolver.cs (3)
23Func<T, string> getPath, 40Func<T, string> getPath, 48Func<T, string> getPath,
Preprocessor.cs (2)
33Func<string, string> tokenReplacement, 64public static string Process(Stream stream, Func<string, string> tokenReplacement)
NuGet.Configuration (3)
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
NuGet.DependencyResolver.Core (12)
GraphModel\GraphOperations.cs (5)
360Func<GraphNode<TItem>, bool> skipNode = null; 529private static TState ForEachGlobalState<TItem, TState>(this GraphNode<TItem> root, TState state, Func<GraphNode<TItem>, TState, TState> visitor, Func<GraphNode<TItem>, bool> skipNode = null) 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) 592private static void ForEach<TItem>(this GraphNode<TItem> root, Action<GraphNode<TItem>> visitor, Func<GraphNode<TItem>, bool> skipNode) 617private static void ForEach<TItem, TContext>(this GraphNode<TItem> root, Action<GraphNode<TItem>, TContext> visitor, TContext context, Func<GraphNode<TItem>, bool> skipNode)
Remote\RemoteDependencyWalker.cs (4)
74Func<LibraryRange, (DependencyResult dependencyResult, LibraryDependency conflictingDependency)> predicate, 344Func<LibraryRange, (DependencyResult dependencyResult, LibraryDependency conflictingDependency)> rootPredicate) 362private static Func<LibraryRange, (DependencyResult dependencyResult, LibraryDependency conflictingDependency)> ChainPredicate( 363Func<LibraryRange, (DependencyResult dependencyResult, LibraryDependency conflictingDependency)> predicate,
src\nuget-client\build\Shared\TaskResultCache.cs (3)
72public Task<TValue> GetOrAddAsync<TState>(TKey key, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 82/// <param name="valueFactory">A <see cref="Func{T1, TResult}" /> to execute asynchronously if a cached operation does not exist.</param> 86public Task<TValue> GetOrAddAsync<TState>(TKey key, bool refresh, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken)
NuGet.Frameworks (2)
NuGetFrameworkUtility.cs (2)
18public static T? GetNearest<T>(IEnumerable<T> items, NuGetFramework framework, Func<T, NuGetFramework> selector) where T : class 34Func<T, NuGetFramework> selector) where T : class
NuGet.LibraryModel (3)
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
NuGet.PackageManagement (8)
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
Utility\CollectionsUtility.cs (1)
22public static int RemoveAll<T>(ICollection<T> collection, Func<T, bool> match)
Utility\MSBuildNuGetProjectSystemUtility.cs (3)
519Func<FileTransformExtensions, string> extensionSelector, 539Func<FileTransformExtensions, string> extensionSelector, 557Func<FileTransformExtensions, string> extensionSelector,
Utility\XElementExtensions.cs (1)
250public static void RemoveAttributes(this XElement element, Func<XAttribute, bool> condition)
NuGet.Packaging (35)
Definitions\IPackageDownloader.cs (1)
73void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync);
NuGetExtractionFileIO.cs (3)
16private static Lazy<Func<string, FileStream>> _createFileMethod = 17new Lazy<Func<string, FileStream>>(CreateFileMethodSelector); 24private static Func<string, FileStream> CreateFileMethodSelector()
PackageCreation\Authoring\Manifest.cs (2)
116public static Manifest ReadFrom(Stream stream, Func<string, string>? propertyProvider, bool validateSchema) 121public static Manifest ReadFrom(Stream stream, Func<string, string>? propertyProvider, bool validateSchema, NuGetVersion? overrideVersion)
PackageCreation\Authoring\PackageBuilder.cs (12)
44public PackageBuilder(string path, Func<string, string>? propertyProvider, bool includeEmptyDirectories) 49public PackageBuilder(string path, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic) 54public PackageBuilder(string path, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic, ILogger logger) 59public PackageBuilder(string path, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic, ILogger logger, string versionOverride) 64public PackageBuilder(string path, string? basePath, Func<string, string>? propertyProvider, bool includeEmptyDirectories) 69public PackageBuilder(string path, string? basePath, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic, ILogger logger) 74public PackageBuilder(string path, string? basePath, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic, ILogger logger, string versionOverride) 80public PackageBuilder(string path, string? basePath, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic) 85public PackageBuilder(string path, string? basePath, Func<string, string>? propertyProvider, bool includeEmptyDirectories, bool deterministic, string versionOverride) 108public PackageBuilder(Stream stream, string? basePath, Func<string, string>? propertyProvider) 113public PackageBuilder(Stream stream, string? basePath, Func<string, string>? propertyProvider, string versionOverride) 813private void ReadManifest(Stream stream, string? basePath, Func<string, string>? propertyProvider)
PackageCreation\Xml\PackageMetadataXmlExtensions.cs (5)
142Func<TSet, bool> isGroupable, 143Func<TSet, string?> getGroupIdentifer, 144Func<TSet, IEnumerable<TItem>> getItems, 364private static void AddElementIfNotNull<T>(XElement parent, XNamespace ns, string name, T? value, Func<T, object> process) 377private static void AddElementIfNotEmpty<T>(XElement parent, XNamespace ns, string name, IEnumerable<T> value, Func<IEnumerable<T>, object> process)
PackageExtractor.cs (4)
23/// <remarks>For PackageReference directory layout, use <see cref="PackageExtractor.InstallFromSourceAsync(string, PackageIdentity, Func{Stream, Task}, VersionFolderPathResolver, PackageExtractionContext, CancellationToken, Guid)"/></remarks> 153/// <remarks>For PackageReference directory layout, use <see cref="PackageExtractor.InstallFromSourceAsync(string, PackageIdentity, Func{Stream, Task}, VersionFolderPathResolver, PackageExtractionContext, CancellationToken, Guid)"/></remarks> 260/// <remarks>For PackageReference directory layout, use <see cref="PackageExtractor.InstallFromSourceAsync(string, PackageIdentity, Func{Stream, Task}, VersionFolderPathResolver, PackageExtractionContext, CancellationToken, Guid)"/></remarks> 380Func<Stream, Task> copyToAsync,
RuntimeModel\RuntimeGraph.cs (1)
90static IReadOnlyDictionary<string, T> Clone<T>(IReadOnlyDictionary<string, T> source, Func<T, T> cloneFunc)
Signing\TrustStore\X509ChainWrapper.cs (2)
13private readonly Func<X509Chain, ILogMessage?>? _getAdditionalContext; 26internal X509ChainWrapper(X509Chain chain, Func<X509Chain, ILogMessage?>? getAdditionalContext)
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
TopologicalSortUtility.cs (2)
25Func<T, string> getId, 26Func<T, string[]> getDependencies) where T : class
NuGet.ProjectModel (8)
JsonUtility.cs (1)
122internal static JObject WriteObject<TItem>(IEnumerable<TItem> items, Func<TItem, JProperty> writeItem)
LazyStringSplit.cs (1)
45public IEnumerable<T> Select<T>(Func<string, T> func)
LockFile\LockFileTargetLibrary.cs (1)
201bool IsListOrderedEqual<T>(PropertyKey key, Func<T, string> accessor, IEqualityComparer<T>? sequenceComparer = null)
LockFile\Utf8JsonStreamLockFileItemConverter.cs (2)
25private Func<string, T> _lockFileItemCreator; 27public Utf8JsonStreamLockFileItemConverter(Func<string, T> lockFileItemCreator)
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
NuGet.Protocol (48)
HttpSource\HttpSource.cs (6)
69Func<HttpSourceResult, Task<T>> processAsync, 211Func<Stream?, Task<T>> processAsync, 220Func<HttpResponseMessage?, Task<T>> processAsync, 248Func<Stream?, Task<T>> processAsync, 275Func<HttpResponseMessage, Task<T>> processAsync, 284Func<HttpResponseMessage, Task<T>> processAsync,
LocalPackageArchiveDownloader.cs (2)
22private Func<Exception, Task<bool>> _handleExceptionAsync; 259public void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync)
LocalRepositories\LocalV2FindPackageByIdResource.cs (1)
408Func<string, IReadOnlyList<LocalPackageInfo>> findPackages = (packageId) => GetPackageInfosCore(packageId, logger);
LocalRepositories\LocalV3FindPackageByIdResource.cs (2)
443private T ProcessNuspecReader<T>(string id, NuGetVersion version, Func<NuspecReader, T> process) 487Func<string, List<NuGetVersion>> findPackages = (keyId) => GetVersionsCore(keyId, logger);
Plugins\IRequestHandlers.cs (1)
27Func<IRequestHandler, IRequestHandler> updateHandlerFunc);
Plugins\MessageConverter.cs (2)
14private static readonly Dictionary<(MessageMethod, MessageType), Func<JsonElement, object?>> _read = new() 157else if (_read.TryGetValue((messageMethod, messageType), out var deserialize))
Plugins\PluginManager.cs (2)
81Func<TimeSpan, PluginFactory> pluginFactoryCreator, 331Func<TimeSpan, IPluginFactory> pluginFactoryCreator,
Plugins\PluginPackageDownloader.cs (2)
18private Func<Exception, Task<bool>> _handleExceptionAsync; 223public void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync)
Plugins\RequestHandlers.cs (1)
38Func<IRequestHandler, IRequestHandler> updateHandlerFunc)
RemotePackageArchiveDownloader.cs (2)
23private Func<Exception, Task<bool>> _handleExceptionAsync; 253public void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (1)
464Func<string, AsyncLazy<HashSet<NuGetVersion>?>> findPackages =
RemoteRepositories\PluginFindPackageByIdResource.cs (1)
385Func<string, AsyncLazy<SortedDictionary<NuGetVersion, PackageInfo>>> findPackages =
Resources\PackageMetadataResourceV3.cs (1)
227Func<HttpSourceResult, Task<RegistrationIndex?>> processAsync,
Resources\PackageSearchResourceV3.cs (1)
97Func<Uri, Task<T>> getResultAsync,
Resources\PackageUpdateResource.cs (11)
61Func<string, string> getApiKey, 62Func<string, string> getSymbolApiKey, 87Func<string, string> getApiKey, 88Func<string, string> getSymbolApiKey, 133Func<string, string> getApiKey, 134Func<string, string> getSymbolApiKey, 157Func<string, string> getApiKey, 158Func<string, bool> confirm, 167Func<string, string> getApiKey, 168Func<string, bool> confirm, 266Func<string, string> getSymbolApiKey,
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
src\nuget-client\build\Shared\TaskResultCache.cs (3)
72public Task<TValue> GetOrAddAsync<TState>(TKey key, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 82/// <param name="valueFactory">A <see cref="Func{T1, TResult}" /> to execute asynchronously if a cached operation does not exist.</param> 86public Task<TValue> GetOrAddAsync<TState>(TKey key, bool refresh, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken)
Utility\FindPackagesByIdNupkgDownloader.cs (4)
171Func<Stream, Task> processStreamAsync, 215Func<Stream, Task> processStreamAsync, 254Func<HttpSourceResult?, Task<T>> processAsync, 335Func<Stream, Task> processStreamAsync,
Utility\TimeoutUtility.cs (2)
17Func<CancellationToken, Task<T>> getTask, 59Func<CancellationToken, Task> getTask,
NuGet.Resolver (2)
CombinationSolver.cs (1)
247var max = new Func<IEnumerable<int>, int>(enumerable => (enumerable == null || !enumerable.Any()) ? 0 : enumerable.Max());
ResolverUtility.cs (1)
335var dependenciesAreSatisfied = new Func<ResolverPackage, bool>(node =>
NuGet.Versioning (4)
src\nuget-client\build\Shared\EqualityUtility.cs (3)
24internal static bool OrderedEquals<TSource, TKey>(this IEnumerable<TSource>? self, IEnumerable<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 50internal static bool OrderedEquals<TSource, TKey>(this ICollection<TSource>? self, ICollection<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null) 92internal static bool OrderedEquals<TSource, TKey>(this IList<TSource>? self, IList<TSource>? other, Func<TSource, TKey> keySelector, IComparer<TKey>? orderComparer = null, IEqualityComparer<TSource>? sequenceComparer = null)
VersionExtensions.cs (1)
20Func<T, NuGetVersion> selector) where T : class
PresentationCore (14)
System\Windows\clipboard.cs (4)
302/// A <see cref="Func{Type, TypeName}"/> that is used only when deserializing non-OLE formats. It returns the type if 445Func<TypeName, Type?> resolver, 463/// You must use the <see cref="TryGetData{T}(string, Func{TypeName, Type?}, out T)"/> with an explicit resolver. 477/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, out T)"/>
System\Windows\dataobject.cs (3)
142/// <inheritdoc cref="Clipboard.TryGetData{T}(string, Func{TypeName, Type}, out T)"/> 146Func<TypeName, Type?> resolver, 173Func<TypeName, Type?>? resolver,
System\Windows\DataObjectExtensions.cs (2)
56/// <inheritdoc cref="ITypedDataObject.TryGetData{T}(string, Func{Reflection.Metadata.TypeName, Type}, bool, out T)"/> 63Func<Reflection.Metadata.TypeName, Type?> resolver,
System\Windows\Input\ManipulationBoundaryFeedbackEventArgs.cs (1)
71internal Func<Point, Point> CompensateForBoundaryFeedback
System\Windows\Input\ManipulationDevice.cs (1)
508private Func<Point, Point> _compensateForBoundaryFeedback;
System\Windows\ITypedDataObject.cs (2)
41/// <inheritdoc cref="IDataObjectInternal.TryGetData{T}(string, Func{TypeName, Type}, bool, out T)" /> 45Func<TypeName, Type?> resolver,
System\Windows\Ole\DataObjectAdapter.cs (1)
44Func<TypeName, Type?> resolver,
PresentationFramework (52)
MS\Internal\Data\DataBindEngine.cs (1)
326internal ViewRecord GetViewRecord(object collection, CollectionViewSource key, Type collectionViewType, bool createView, Func<object, object> GetSourceItem)
MS\Internal\Data\LiveShapingList.cs (1)
653private void ForEachUntil(Func<LiveShapingItem, bool> action)
MS\Internal\Data\RBTree.cs (1)
443internal void ForEachUntil(Func<T, bool> action)
MS\Internal\Data\ViewManager.cs (3)
493internal ViewRecord GetViewRecord(object collection, CollectionViewSource cvs, Type collectionViewType, bool createView, Func<object, object> GetSourceItem) 619private CollectionRecord EnsureCollectionRecord(object collection, Func<object, object> GetSourceItem = null) 680private ViewRecord GetExistingView(object collection, CollectionViewSource cvs, Type collectionViewType, Func<object, object> GetSourceItem)
MS\Internal\Helper.cs (1)
1290internal static T FindVisualAncestor<T>(DependencyObject element, Func<DependencyObject, bool> shouldContinueFunc) where T : DependencyObject
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (3)
19private static readonly ConcurrentDictionary<string, Func<IInspectable, object>> TypedObjectFactoryCache = new ConcurrentDictionary<string, Func<IInspectable, object>>(); 30public static TReturn MarshalDelegateInvoke<TDelegate, TReturn>(IntPtr thisPtr, Func<TDelegate, TReturn> invoke)
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (32)
356public static readonly Func<T, object> CreateMarshaler; 357private static Func<T, object> BindCreateMarshaler() 360return Expression.Lambda<Func<T, object>>( 365public static readonly Func<object, object> GetAbi; 366private static Func<object, object> BindGetAbi() 369return Expression.Lambda<Func<object, object>>( 386public static readonly Func<object, T> FromAbi; 387private static Func<object, T> BindFromAbi() 390return Expression.Lambda<Func<object, T>>( 395public static readonly Func<T, object> FromManaged; 396private static Func<T, object> BindFromManaged() 399return Expression.Lambda<Func<T, object>>( 629public static unsafe MarshalerArray CreateMarshalerArray(T[] array, Func<T, IObjectReference> createMarshaler) 664public static unsafe T[] FromAbiArray(object box, Func<IntPtr, T> fromAbi) 680public static unsafe (int length, IntPtr data) FromManagedArray(T[] array, Func<T, IntPtr> fromManaged) 780private static Func<T, IObjectReference> _ToAbi; 781private static Func<IntPtr, T> _FromAbi; 782private static Func<IObjectReference, IObjectReference> _As; 870private static Func<IntPtr, T> BindFromAbi() 875return Expression.Lambda<Func<IntPtr, T>>( 880private static Func<T, IObjectReference> BindToAbi() 883return Expression.Lambda<Func<T, IObjectReference>>( 889private static Func<IObjectReference, IObjectReference> BindAs() 893return Expression.Lambda<Func<IObjectReference, IObjectReference>>( 1103public static readonly Func<T, object> CreateMarshaler; 1104public static readonly Func<object, object> GetAbi; 1106public static readonly Func<object, T> FromAbi; 1107public static readonly Func<T, object> FromManaged; 1111public static readonly Func<T[], object> CreateMarshalerArray; 1112public static readonly Func<object, (int, IntPtr)> GetAbiArray; 1113public static readonly Func<object, T[]> FromAbiArray; 1114public static readonly Func<T[], (int, IntPtr)> FromManagedArray;
System\Windows\Controls\ItemCollection.cs (1)
1490internal void SetItemsSource(IEnumerable value, Func<object, object> GetSourceItem = null)
System\Windows\Data\CollectionViewSource.cs (2)
804internal static CollectionView GetDefaultCollectionView(object source, bool createView, Func<object, object> GetSourceItem=null) 820internal static CollectionView GetDefaultCollectionView(object source, DependencyObject d, Func<object, object> GetSourceItem=null)
System\Windows\Data\ListCollectionView.cs (1)
2424internal static IComparer PrepareComparer(IComparer customSort, SortDescriptionCollection sort, Func<object, CollectionView> lazyGetCollectionView, object state)
System\Windows\Input\KeyboardNavigation.cs (1)
3512public void Process(Func<object, bool> action)
System\Windows\Markup\Baml2006\Baml6ConstructorInfo.cs (3)
8public Baml6ConstructorInfo(List<Type> types, Func<Object[], object> ctor) 15private Func<Object[], object> _constructor; 18public Func<Object[], object> Constructor { get { return _constructor; } }
System\Windows\Markup\Baml2006\WpfKnownMember.cs (2)
27private Func<object, object> _getDelegate; 125public Func<object, object> GetDelegate
Roslyn.Diagnostics.Analyzers (440)
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (1)
45Func<CancellationToken, Task<Document>> createChangedDocument;
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (1)
42Func<CancellationToken, Task<Document>> createChangedDocument;
src\7a47995420f988d7\AbstractRemoveUnnecessaryImportsService.cs (2)
22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25Document document, Func<SyntaxNode, bool> predicate, CancellationToken cancellationToken)
src\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (1)
16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\a16f30e1d256badc\AbstractTypeInferenceService.AbstractTypeInferrer.cs (2)
19protected readonly Func<TypeInferenceInfo, bool> IsUsableTypeFunc; 24private static readonly Func<TypeInferenceInfo, bool> s_isNotNull = t => t.InferredType != null;
src\b310f676f7308b7f\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (3)
18private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 24Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 40Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
50Func<string, bool> fileExists) 325public static T RethrowExceptionsAsIOException<T, TArg>(Func<TArg, T> operation, TArg arg) 342public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg) 358internal static Stream CreateFileStreamChecked(Func<string, Stream> factory, string path, string? paramName = null)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (2)
37using var _ = PooledDelegates.GetPooledFunction(valueFactory, factoryArgument, out var boundFunction); 55using var _a = PooledDelegates.GetPooledFunction(addValueFactory, factoryArgument, out var pooledAddValueFactory);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (5)
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg) 66public static int Initialize<TArg>(ref int target, int uninitializedValue, Func<TArg, int> valueFactory, TArg arg) 103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg) 183public static ImmutableArray<T> Initialize<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg) 193private static ImmutableArray<T> Initialize_Slow<T, TArg>(ref ImmutableArray<T> target, Func<TArg, ImmutableArray<T>> createArray, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\SingleInitNullable.cs (1)
48public T Initialize<TArg>(Func<TArg, T> valueFactory, TArg arg)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (3)
18private static readonly Func<char, char> s_toLower = char.ToLower; 19private static readonly Func<char, char> s_toUpper = char.ToUpper; 69Func<char, char> convert)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (4)
49SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken) 55internal static bool IsGeneratedCode(string? filePath, SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 88private static bool BeginsWithAutoGeneratedComment(SyntaxNode root, Func<SyntaxTrivia, bool> isComment) 118SyntaxTree tree, Func<SyntaxTrivia, bool> isComment, CancellationToken cancellationToken)
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (30)
164public static T? FirstOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 182public static T? SingleOrNull<T>(this IEnumerable<T> source, Func<T, bool> predicate) 261public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector) 271/// <seealso cref="Microsoft.CodeAnalysis.ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 273public static bool HasDuplicates<TItem, TValue>(this IEnumerable<TItem> source, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 321private static readonly Func<object, bool> s_notNullTest = x => x != null; 331return source.Where((Func<T?, bool>)s_notNullTest)!; 376public static ImmutableArray<T> WhereAsArray<T>(this IEnumerable<T> values, Func<T, bool> predicate) 407public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, TResult> selector) 417public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this IEnumerable<TItem>? source, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 461public static ImmutableArray<TResult> SelectAsArray<TSource, TResult>(this IReadOnlyCollection<TSource>? source, Func<TSource, TResult> selector) 485public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, IEnumerable<TResult>> selector) 507public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this IReadOnlyCollection<TItem>? source, Func<TItem, IEnumerable<TResult>> selector) 533public static ImmutableArray<TResult> SelectManyAsArray<TSource, TResult>(this IEnumerable<TSource>? source, Func<TSource, OneOrMany<TResult>> selector) 547public static async ValueTask<ImmutableArray<TResult>> SelectAsArrayAsync<TItem, TResult>(this IEnumerable<TItem> source, Func<TItem, ValueTask<TResult>> selector) 764internal static Dictionary<K, ImmutableArray<T>> ToMultiDictionary<K, T>(this IEnumerable<T> data, Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 815public static readonly Func<T, T> Identity = t => t; 816public static readonly Func<T, bool> True = t => true; 840/// Alias for <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 842public static bool Contains<T>(this IEnumerable<T> sequence, Func<T, bool> predicate) 846/// Variant of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 861/// Variant of <see cref="System.Linq.Enumerable.FirstOrDefault{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 875/// Variant of <see cref="System.Linq.Enumerable.Any{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> 889/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 895/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 901/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 907/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 913/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 919/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\roslyn\src\Dependencies\Collections\Extensions\IListExtensions.cs (4)
21public static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector) 31/// <seealso cref="ImmutableArrayExtensions.HasDuplicates{TItem, TValue}(System.Collections.Immutable.ImmutableArray{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 32/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 34internal static bool HasDuplicates<TItem, TValue>(this IReadOnlyList<TItem> list, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer)
src\roslyn\src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (27)
138public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> items, Func<TItem, TResult> map) 198public static ImmutableArray<TResult> SelectAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, TResult> selector) 247public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, IEnumerable<TResult>> selector) 267public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) 287public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, OneOrMany<TResult>> selector) 308public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, IEnumerable<TResult>> selector) 332public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) 356public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, OneOrMany<TResult>> selector) 493public static ImmutableArray<T> WhereAsArray<T>(this ImmutableArray<T> array, Func<T, bool> predicate) 504private static ImmutableArray<T> WhereAsArrayImpl<T, TArg>(ImmutableArray<T> array, Func<T, bool>? predicateWithoutArg, Func<T, TArg, bool>? predicateWithArg, TArg arg) 573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 757public static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector) 767/// <seealso cref="Roslyn.Utilities.EnumerableExtensions.HasDuplicates{TItem, TValue}(IEnumerable{TItem}, Func{TItem, TValue}, IEqualityComparer{TValue})"/> 769internal static bool HasDuplicates<TItem, TValue>(this ImmutableArray<TItem> array, Func<TItem, TValue> selector, IEqualityComparer<TValue> comparer) 990/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.FirstOrDefault{T}(ImmutableArray{T}, Func{T, bool})"/> 1004/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Single{T}(ImmutableArray{T}, Func{T, bool})"/> 1066/// Specialization of <see cref="System.Linq.Enumerable.Count{TSource}(IEnumerable{TSource}, Func{TSource, bool})"/> for <see cref="ImmutableArray{T}"/>. 1068public static int Count<T>(this ImmutableArray<T> items, Func<T, bool> predicate) 1086public static int Sum<T>(this ImmutableArray<T> items, Func<T, int> selector) 1213/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.Any{T}(ImmutableArray{T}, Func{T, bool})"/>. 1227/// Variant of <see cref="System.Linq.ImmutableArrayExtensions.All{T}(ImmutableArray{T}, Func{T, bool})"/>. 1257public static bool Contains<T>(this ImmutableArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\OneOrMany.cs (4)
124public OneOrMany<TResult> Select<TResult>(Func<T, TResult> selector) 143public T? FirstOrDefault(Func<T, bool> predicate) 170public bool All(Func<T, bool> predicate) 179public bool Any(Func<T, bool> predicate)
src\roslyn\src\Dependencies\Collections\RoslynImmutableInterlocked.cs (7)
33public static bool Update<T>(ref ImmutableSegmentedList<T> location, Func<ImmutableSegmentedList<T>, ImmutableSegmentedList<T>> transformer) 154public static bool Update<T>(ref ImmutableSegmentedHashSet<T> location, Func<ImmutableSegmentedHashSet<T>, ImmutableSegmentedHashSet<T>> transformer) 276public static bool Update<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, Func<ImmutableSegmentedDictionary<TKey, TValue>, ImmutableSegmentedDictionary<TKey, TValue>> transformer) 410/// <inheritdoc cref="ImmutableInterlocked.GetOrAdd{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue})"/> 411public static TValue GetOrAdd<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) 458/// <inheritdoc cref="ImmutableInterlocked.AddOrUpdate{TKey, TValue}(ref ImmutableDictionary{TKey, TValue}, TKey, Func{TKey, TValue}, Func{TKey, TValue, TValue})"/> 459public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableSegmentedDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary.cs (6)
68public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) 72public static ImmutableSegmentedDictionary<TKey, TValue> ToImmutableSegmentedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) 86public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 90public static ImmutableSegmentedDictionary<TKey, TSource> ToImmutableSegmentedDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (1)
207/// <inheritdoc cref="ImmutableList{T}.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (1)
79/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.ConvertAll{TOutput}(Func{T, TOutput})"/>
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedListExtensions.cs (4)
17public static bool All<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 49public static bool Any<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 86public static T Last<T>(this ImmutableSegmentedList<T> immutableList, Func<T, bool> predicate) 103public static IEnumerable<TResult> Select<T, TResult>(this ImmutableSegmentedList<T> immutableList, Func<T, TResult> selector)
src\roslyn\src\Dependencies\Collections\TemporaryArrayExtensions.cs (3)
45public static bool Any<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 56public static bool All<T>(this in TemporaryArray<T> array, Func<T, bool> predicate) 70public static T? SingleOrDefault<T>(this in TemporaryArray<T> array, Func<T, bool> predicate)
src\roslyn\src\Dependencies\Contracts\EqualityComparerExtensions.cs (3)
37public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44private sealed class DelegateEqualityComparer<T>(Func<T?, T?, bool> equals, Func<T, int> getHashCode) : EqualityComparer<T> 47private readonly Func<T, int> _getHashCode = getHashCode;
src\roslyn\src\Dependencies\PooledObjects\ArrayBuilder.cs (8)
462public void FreeAll(Func<T, ArrayBuilder<T>?> getNested) 613internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null) 661public void AddRange<U>(ArrayBuilder<U> items, Func<U, T> selector) 689public void AddRange<U>(ImmutableArray<U> items, Func<U, T> selector) 806public ImmutableArray<S> SelectDistinct<S>(Func<T, S> selector) 824public bool Any(Func<T, bool> predicate) 848public bool All(Func<T, bool> predicate) 878public ImmutableArray<TResult> SelectAsArray<TResult>(Func<T, TResult> map)
src\roslyn\src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
105internal ObjectPool(Func<ObjectPool<T>, T> factory, int size
src\roslyn\src\Dependencies\PooledObjects\PooledDelegates.cs (9)
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})"/>, 216/// Gets a <see cref="Func{T, TResult}"/> delegate, which calls <paramref name="unboundFunction"/> with the 246public static Releaser GetPooledFunction<T1, TArg, TResult>(Func<T1, TArg, TResult> unboundFunction, TArg argument, out Func<T1, TResult> boundFunction) 247=> GetPooledDelegate<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>>(unboundFunction, argument, out boundFunction); 412: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<TArg, TResult>, TArg, Func<TArg, TResult>, Func<TResult>> 432: AbstractDelegateWithBoundArgument<FuncWithBoundArgument<T1, TArg, TResult>, TArg, Func<T1, TArg, TResult>, Func<T1, TResult>> 434protected override Func<T1, TResult> Bind()
src\roslyn\src\Dependencies\Threading\AsyncBatchingWorkQueue`0.cs (2)
19Func<CancellationToken, ValueTask> processBatchAsync, 23private static Func<ImmutableSegmentedList<VoidResult>, CancellationToken, ValueTask> Convert(Func<CancellationToken, ValueTask> processBatchAsync)
src\roslyn\src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (7)
122Func<object, Task> taskBody = static async o => 287Func<object, Task> taskBody = static async o => 395private readonly Func<object, Task> _taskBody; 418protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 584IEnumerable<TSource> source, Func<object, Task> taskBody, 610IAsyncEnumerable<TSource> source, Func<object, Task> taskBody, 637T fromExclusive, T toExclusive, Func<object, Task> taskBody,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\BoundedCacheWithFactory.cs (1)
29public TValue GetOrCreateValue(TKey key, Func<TKey, TValue> valueFactory)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
130private static int CalculateDepthOfInheritance(INamedTypeSymbol namedType, Func<INamedTypeSymbol, bool> isExcludedFromInheritanceCount)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeMetricsAnalysisContext.cs (3)
15private readonly Func<SyntaxTree, SemanticModel> _getSemanticModel; 18Func<INamedTypeSymbol, bool>? isExcludedFromInheritanceCountFunc = null) 32public Func<INamedTypeSymbol, bool> IsExcludedFromInheritanceCountFunc { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\DoNotCatchGeneralUnlessRethrown.cs (2)
115private readonly Func<INamedTypeSymbol, bool> _isDisallowedCatchType; 121public DisallowGeneralCatchUnlessRethrowWalker(Func<INamedTypeSymbol, bool> isDisallowedCatchType, bool checkAnonymousFunctions)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (2)
131public static TOperation? GetAncestor<TOperation>(this IOperation root, OperationKind ancestorKind, Func<TOperation, bool>? predicate = null) 166public static IOperation? GetAncestor(this IOperation root, ImmutableArray<OperationKind> ancestorKinds, Func<IOperation, bool>? predicate = null)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\SourceTextExtensions.cs (1)
25public static T Parse<T>(this SourceText text, Func<StreamReader, T> parser)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (2)
458Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, 473static bool TryParse(string s, (Compilation compilation, Func<string, SymbolNamesWithValueOption<TValue>.NameParts> getTypeAndSuffixFunc, string? namePrefix, string? optionForcedValue) arg, out SymbolNamesWithValueOption<TValue> option)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
83Func<string, NameParts> getSymbolNamePartsFunc)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledDictionary.cs (2)
24Func<KeyValuePair<K, V>, TKey> keySelector, Func<KeyValuePair<K, V>, TValue> elementSelector, IEqualityComparer<TKey> comparer)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (1)
203internal bool IsTaskOfType([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol, bool> typeArgumentPredicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
124Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 148Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
178var parser = GetParser(typeAttribute.Value); 192private static Func<string, T> GetParser(string type)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOptions2.cs (2)
24OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null) 28OptionGroup group, string name, CodeStyleOption2<T> defaultValue, Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\VisualBasic\VisualBasicCodeStyleOptions.cs (1)
20Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (5)
246public static VirtualChar? FirstOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 257public static VirtualChar? LastOrNull(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 269public static bool Any(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 280public static bool All(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate) 291public static VirtualCharSequence SkipWhile(this VirtualCharSequence sequence, Func<VirtualChar, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ChildSyntaxListExtensions.cs (2)
12public static SyntaxNodeOrToken First(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate) 24public static SyntaxNodeOrToken Last(this ChildSyntaxList childSyntaxList, Func<SyntaxNodeOrToken, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CollectionExpressionUtilities.cs (1)
122IMethodSymbol? GetAccessibleInstanceConstructor(ImmutableArray<IMethodSymbol> constructors, Func<IMethodSymbol, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ListExtensions.cs (1)
105public static int IndexOf<T>(this IList<T> list, Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.TypeSwitch.cs (161)
11public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TBaseType, TResult>? defaultFunc = null) 25public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TBaseType, TResult>? defaultFunc = null) 41public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TBaseType, TResult>? defaultFunc = null) 59public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TBaseType, TResult>? defaultFunc = null) 79public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TBaseType, TResult>? defaultFunc = null) 119public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TBaseType, TResult>? defaultFunc = null) 161public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TBaseType, TResult>? defaultFunc = null) 213public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TBaseType, TResult>? defaultFunc = null) 299public static TResult? TypeSwitch<TBaseType, TDerivedType1, TDerivedType2, TDerivedType3, TDerivedType4, TDerivedType5, TDerivedType6, TDerivedType7, TDerivedType8, TDerivedType9, TDerivedType10, TDerivedType11, TDerivedType12, TDerivedType13, TDerivedType14, TDerivedType15, TDerivedType16, TDerivedType17, TDerivedType18, TDerivedType19, TDerivedType20, TDerivedType21, TDerivedType22, TDerivedType23, TDerivedType24, TDerivedType25, TDerivedType26, TDerivedType27, TDerivedType28, TDerivedType29, TDerivedType30, TDerivedType31, TDerivedType32, TDerivedType33, TDerivedType34, TDerivedType35, TDerivedType36, TDerivedType37, TDerivedType38, TDerivedType39, TDerivedType40, TResult>(this TBaseType obj, Func<TDerivedType1, TResult> matchFunc1, Func<TDerivedType2, TResult> matchFunc2, Func<TDerivedType3, TResult> matchFunc3, Func<TDerivedType4, TResult> matchFunc4, Func<TDerivedType5, TResult> matchFunc5, Func<TDerivedType6, TResult> matchFunc6, Func<TDerivedType7, TResult> matchFunc7, Func<TDerivedType8, TResult> matchFunc8, Func<TDerivedType9, TResult> matchFunc9, Func<TDerivedType10, TResult> matchFunc10, Func<TDerivedType11, TResult> matchFunc11, Func<TDerivedType12, TResult> matchFunc12, Func<TDerivedType13, TResult> matchFunc13, Func<TDerivedType14, TResult> matchFunc14, Func<TDerivedType15, TResult> matchFunc15, Func<TDerivedType16, TResult> matchFunc16, Func<TDerivedType17, TResult> matchFunc17, Func<TDerivedType18, TResult> matchFunc18, Func<TDerivedType19, TResult> matchFunc19, Func<TDerivedType20, TResult> matchFunc20, Func<TDerivedType21, TResult> matchFunc21, Func<TDerivedType22, TResult> matchFunc22, Func<TDerivedType23, TResult> matchFunc23, Func<TDerivedType24, TResult> matchFunc24, Func<TDerivedType25, TResult> matchFunc25, Func<TDerivedType26, TResult> matchFunc26, Func<TDerivedType27, TResult> matchFunc27, Func<TDerivedType28, TResult> matchFunc28, Func<TDerivedType29, TResult> matchFunc29, Func<TDerivedType30, TResult> matchFunc30, Func<TDerivedType31, TResult> matchFunc31, Func<TDerivedType32, TResult> matchFunc32, Func<TDerivedType33, TResult> matchFunc33, Func<TDerivedType34, TResult> matchFunc34, Func<TDerivedType35, TResult> matchFunc35, Func<TDerivedType36, TResult> matchFunc36, Func<TDerivedType37, TResult> matchFunc37, Func<TDerivedType38, TResult> matchFunc38, Func<TDerivedType39, TResult> matchFunc39, Func<TDerivedType40, TResult> matchFunc40, Func<TBaseType, TResult>? defaultFunc = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectWriterExtensions.cs (1)
23public static ImmutableArray<T> ReadArray<T>(this ObjectReader reader, Func<ObjectReader, T> read)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (3)
341public static bool HasAnyOperationDescendant(this ImmutableArray<IOperation> operationBlocks, Func<IOperation, bool> predicate) 354public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate) 357public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticEquivalence.cs (2)
22Func<SyntaxNode, bool>? predicate = null) 52Func<SyntaxNode, bool>? predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
108this SemanticModel semanticModel, SyntaxNode? container, CancellationToken cancellationToken, Func<SyntaxNode, bool>? descendInto = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\StringExtensions.cs (1)
100public static int IndexOf(this string? text, Func<char, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (6)
104this SyntaxNode node, TextSpan searchSpan, Func<SyntaxNode, bool> predicate) 129public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode 145public static bool IsChildNode<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 162public static bool IsFoundUnder<TParent>(this SyntaxNode node, Func<TParent, SyntaxNode?> childGetter) 201public static SyntaxNode? FindInnermostCommonNode(this IEnumerable<SyntaxNode> nodes, Func<SyntaxNode, bool> predicate) 807public static TNode? FirstAncestorOrSelfUntil<TNode>(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (5)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 42public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTriviaListExtensions.cs (1)
11public static SyntaxTrivia? FirstOrNull(this SyntaxTriviaList triviaList, Func<SyntaxTrivia, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (1)
21private static readonly Func<TextSpan, bool> s_notEmpty = s => !s.IsEmpty;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (2)
111Func<SyntaxToken, int> tokenColumnGetter, 140Func<SyntaxToken, int> tokenColumnGetter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\AbstractUnnecessaryImportsProvider.cs (2)
21SemanticModel model, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 27SemanticModel model, TextSpan? span, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\IUnnecessaryImportsProvider.cs (1)
20Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.cs (2)
86public static void Log<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel = LogLevel.Debug) 183public static IDisposable LogBlock<TArg>(FunctionId functionId, Func<TArg, string> messageGetter, TArg arg, CancellationToken token, LogLevel logLevel = LogLevel.Trace)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\LogMessage.cs (3)
23public static LogMessage Create<TArg>(Func<TArg, string> messageGetter, TArg arg, LogLevel logLevel) 125private Func<TArg0, string>? _messageGetter; 128public static LogMessage Construct(Func<TArg0, string> messageGetter, TArg0 arg, LogLevel logLevel)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
108Func<string, TValue> parser,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\ObjectPools\PooledObject.cs (1)
22public PooledObject(ObjectPool<T> pool, Func<ObjectPool<T>, T> allocator, Action<ObjectPool<T>, T> releaser) : this()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\EditorConfigValueSerializer`1.cs (4)
16Func<string, Optional<T>> parseValue, 17Func<T, string> serializeValue) : IEditorConfigValueSerializer 23public readonly Func<string, Optional<T>> ParseValue = parseValue; 24public readonly Func<T, string> SerializeValue = serializeValue;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
41internal Option2(OptionDefinition<T> definition, string? languageName, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
33internal PerLanguageOption2(OptionDefinition<T> optionDefinition, Func<IOption2, IPublicOption>? publicOptionFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (4)
17public static Option2<T> WithPublicOption<T, TPublicValue>(this Option2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue) 20public static PerLanguageOption2<T> WithPublicOption<T, TPublicValue>(this PerLanguageOption2<T> option, string feature, string name, Func<T, TPublicValue> toPublicValue, Func<TPublicValue, T> toInternalValue)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectReader.cs (2)
259public (char[] array, int length) ReadCharArray(Func<int, char[]>? getArray) 264Func<int, T[]>? getArray = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
43Func<TMemberDeclarationSyntax, bool> membersToKeep, CancellationToken cancellationToken) 79Func<TMemberDeclarationSyntax, bool> membersToKeep) 102void AddSelectedMemberDeclarations(TMemberDeclarationSyntax member, Func<TMemberDeclarationSyntax, bool> membersToKeep)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 33public static AsyncLazy<T> Create<T>(Func<CancellationToken, T> synchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy.cs (1)
15public static CancellableLazy<T> Create<T>(Func<CancellationToken, T> valueFactory)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CancellableLazy`1.cs (3)
14private Func<CancellationToken, T>? _valueFactory; 17public CancellableLazy(Func<CancellationToken, T> valueFactory) 58Interlocked.Exchange<Func<CancellationToken, T>?>(ref _valueFactory, null);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ComparerWithState.cs (2)
26public static int CompareTo<T>(T first, T second, ImmutableArray<Func<T, IComparable>> comparableMethods) 28foreach (var comparableMethod in comparableMethods)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ConcatImmutableArray`1.cs (1)
18public bool Any(Func<T, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
16public static V GetOrAdd<K, V>(this IDictionary<K, V> dictionary, K key, Func<K, V> function)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.cs (1)
38public static Matcher<T> Single<T>(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher.SingleMatcher.cs (1)
12private sealed class SingleMatcher(Func<T, bool> predicate, string description) : Matcher<T>
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Matcher`1.cs (1)
37internal static Matcher<T> Single(Func<T, bool> predicate, string description)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TopologicalSorter.cs (8)
13public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore) 26public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter) 29var combinedItemsBefore = CreateCombinedItemsBefore(items, itemsBefore, itemsAfter); 35Func<T, IEnumerable<T>> itemsBefore, 50private static Func<T, IEnumerable<T>> CreateCombinedItemsBefore<T>(IEnumerable<T> items, Func<T, IEnumerable<T>> itemsBefore, Func<T, IEnumerable<T>> itemsAfter)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (2)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 80Func<SyntaxEditor, Task> editAsync,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
235Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (3)
501Func<SyntaxTrivia, bool> isEndOfLineTrivia, 521Func<SyntaxToken, bool> isComma, 549Func<SyntaxToken, bool> isAccessibilityModifier)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
195Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 196Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
29Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 52Func<TType, TNode> selector, 96Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector, 153Func<TType, (TNode semanticNode, IEnumerable<TNode> additionalNodes)> selector,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
31private static readonly Func<ISymbol, bool> s_LocalNameFilter = s => 76Func<ISymbol, bool>? filter,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (1)
35Func<ISymbol, bool> filter, IEnumerable<string> usedNames, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
35protected static readonly Func<SyntaxNode, bool> s_containsAnnotations = n => n.ContainsAnnotations; 36protected static readonly Func<SyntaxNodeOrToken, bool> s_hasSimplifierAnnotation = n => n.HasAnnotation(Simplifier.Annotation); 40protected abstract ImmutableArray<NodeOrTokenToReduce> GetNodesAndTokensToReduce(SyntaxNode root, Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpans); 51public abstract SyntaxNode Expand(SyntaxNode node, SemanticModel semanticModel, SyntaxAnnotation? annotationForReplacedAliasIdentifier, Func<SyntaxNode, bool>? expandInsideNode, bool expandParameter, CancellationToken cancellationToken); 52public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 283Func<SyntaxNodeOrToken, bool> isNodeOrTokenOutsideSimplifySpan)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
20Func<SyntaxNode, bool>? expandInsideNode, 27Func<SyntaxNode, bool>? expandInsideNode,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NameGenerator.cs (6)
43Func<string, bool>? canUse = null, 63Func<string, bool>? canUse = null, 86Func<string, bool>? canUse = null, 134public static string GenerateUniqueName(string baseName, Func<string, bool> canUse) 140public static string GenerateUniqueName(string baseName, string extension, Func<string, bool> canUse) 160public static string GenerateUniqueName(IEnumerable<string> baseNames, Func<string, bool> canUse)
Roslyn.Diagnostics.CSharp.Analyzers (17)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
24Func<CodeStyleOption2<T>, EditorConfigValueSerializer<CodeStyleOption2<T>>>? serializerFactory = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
669public static IEnumerable<SyntaxNode> GetAncestorsOrThis(this SyntaxNode? node, Func<SyntaxNode, bool> predicate)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (4)
87private static readonly Func<SyntaxKind, bool> s_isDot = k => k is SyntaxKind.DotToken; 88private static readonly Func<SyntaxKind, bool> s_isDotOrArrow = k => k is SyntaxKind.DotToken or SyntaxKind.MinusGreaterThanToken; 89private static readonly Func<SyntaxKind, bool> s_isDotOrArrowOrColonColon = 106this SyntaxTree syntaxTree, int position, Func<SyntaxKind, bool> predicate, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (2)
14Func<string, int> map, 46internal static string ToEditorConfigFlagList(int flags, Func<int, string> map)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Helpers\RemoveUnnecessaryImports\CSharpUnnecessaryImportsProvider.cs (1)
25Func<SyntaxNode, bool>? predicate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (2)
926Func<ExpressionSyntax, TConditionalOrSwitchExpression?> getConditionalOrSwitchExpression, 927Func<TConditionalOrSwitchExpression, ImmutableArray<ExpressionSyntax>> getArmExpressions,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (2)
174Func<SyntaxList<TDeclaration>, TDeclaration?>? after = null, 175Func<SyntaxList<TDeclaration>, TDeclaration?>? before = null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
740private static TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, Func<SyntaxTokenList, SyntaxTokenList> computeNewModifiersList)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
253Func<T, bool> isNegative, Func<T, T> negate,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
39Func<SyntaxNode, bool>? predicate,
rzc (2)
src\sdk\src\Common\CliFolderPathCalculatorCore.cs (2)
11private readonly Func<string, string?> _getEnvironmentVariable; 25public CliFolderPathCalculatorCore(Func<string, string?> getEnvironmentVariable)
SelectTests (1)
Program.cs (1)
1139Func<string, string> display,
Shared (4)
Memoization\Memoize.cs (2)
41public static Func<TParameter, TResult> Function<TParameter, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TResult>(Func<TParameter, TResult> f)
Memoization\MemoizedFunction.cs (2)
60private readonly Func<TParameter, TResult> _function; 66public MemoizedFunction(Func<TParameter, TResult> function)
Shared.Tests (4)
Memoization\MemoizeTests.cs (4)
15Func<int, int> doubler = x => x * 2; 24Func<int, Task<int>> doubler = x => Task.FromResult(x * 2); 43Func<int, int> doubler = x => 61Func<object?, string> toString = x =>
System.Collections.Immutable (47)
System\Collections\Frozen\FrozenDictionary.cs (3)
86this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer = null) 100this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer = null)
System\Collections\Immutable\ImmutableArray.cs (2)
273public static ImmutableArray<TResult> CreateRange<TSource, TResult>(ImmutableArray<TSource> items, Func<TSource, TResult> selector) 305public static ImmutableArray<TResult> CreateRange<TSource, TResult>(ImmutableArray<TSource> items, int start, int length, Func<TSource, TResult> selector)
System\Collections\Immutable\ImmutableDictionary.cs (8)
182public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 215public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 228public static ImmutableDictionary<TKey, TSource> ToImmutableDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull 242public static ImmutableDictionary<TKey, TSource> ToImmutableDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 257public static ImmutableDictionary<TKey, TValue> ToImmutableDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull
System\Collections\Immutable\ImmutableInterlocked.cs (4)
34public static bool Update<T>(ref T location, Func<T, T> transformer) where T : class? 123public static bool Update<T>(ref ImmutableArray<T> location, Func<ImmutableArray<T>, ImmutableArray<T>> transformer) 283public static TValue GetOrAdd<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> valueFactory) where TKey : notnull 344public static TValue AddOrUpdate<TKey, TValue>(ref ImmutableDictionary<TKey, TValue> location, TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory) where TKey : notnull
System\Collections\Immutable\ImmutableList_1.Builder.cs (1)
343public ImmutableList<TOutput> ConvertAll<TOutput>(Func<T, TOutput> converter)
System\Collections\Immutable\ImmutableList_1.cs (2)
567/// A <see cref="Func{T, TResult}"/> delegate that converts each element from 577public ImmutableList<TOutput> ConvertAll<TOutput>(Func<T, TOutput> converter)
System\Collections\Immutable\ImmutableList_1.Node.cs (2)
929/// A <see cref="Func{T, TResult}"/> delegate that converts each element from 938internal ImmutableList<TOutput>.Node ConvertAll<TOutput>(Func<T, TOutput> converter)
System\Collections\Immutable\ImmutableSortedDictionary.cs (6)
138public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 171public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey>? keyComparer) where TKey : notnull 186public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull
System\Linq\ImmutableArrayExtensions.cs (19)
25public static IEnumerable<TResult> Select<T, TResult>(this ImmutableArray<T> immutableArray, Func<T, TResult> selector) 54Func<TSource, IEnumerable<TCollection>> collectionSelector, 83public static IEnumerable<T> Where<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 110public static bool Any<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 136public static bool All<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 308public static TResult Aggregate<TAccumulate, TResult, T>(this ImmutableArray<T> immutableArray, TAccumulate seed, Func<TAccumulate, T, TAccumulate> func, Func<TAccumulate, TResult> resultSelector) 342public static T First<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 387public static T? FirstOrDefault<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 420public static T Last<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 451public static T? LastOrDefault<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 483public static T Single<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 526public static T? SingleOrDefault<T>(this ImmutableArray<T> immutableArray, Func<T, bool> predicate) 557public static Dictionary<TKey, T> ToDictionary<TKey, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector) where TKey : notnull 572public static Dictionary<TKey, TElement> ToDictionary<TKey, TElement, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, Func<T, TElement> elementSelector) where TKey : notnull 586public static Dictionary<TKey, T> ToDictionary<TKey, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 610public static Dictionary<TKey, TElement> ToDictionary<TKey, TElement, T>(this ImmutableArray<T> immutableArray, Func<T, TKey> keySelector, Func<T, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 712Func<TSource, IEnumerable<TCollection>> collectionSelector,
System.CommandLine (42)
Argument.cs (2)
19private List<Func<CompletionContext, IEnumerable<CompletionItem>>>? _completionSources = null; 89public List<Func<CompletionContext, IEnumerable<CompletionItem>>> CompletionSources
Argument{T}.cs (4)
12private Func<ArgumentResult, T?>? _customParser; 13private Func<ArgumentResult, T>? _defaultValueFactory; 31public Func<ArgumentResult, T>? DefaultValueFactory 55public Func<ArgumentResult, T?>? CustomParser
Command.cs (3)
128public void SetAction(Func<ParseResult, int> action) 165public void SetAction(Func<ParseResult, Task> action) 189public void SetAction(Func<ParseResult, Task<int>> action)
CompletionSourceExtensions.cs (3)
21this List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, 22Func<CompletionContext, IEnumerable<string>> completionsDelegate) 43this List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources,
EnumerableExtensions.cs (1)
16Func<T, IEnumerable<T>> children)
Help\HelpBuilder.cs (15)
19private Func<HelpContext, IEnumerable<Func<HelpContext, bool>>>? _getLayout; 51foreach (var writeSection in GetLayout(context)) 68Func<HelpContext, string?>? firstColumnText = null, 69Func<HelpContext, string?>? secondColumnText = null, 70Func<HelpContext, string?>? defaultValue = null) 89public void CustomizeLayout(Func<HelpContext, IEnumerable<Func<HelpContext, bool>>> getLayout) 334private IEnumerable<Func<HelpContext, bool>> GetLayout(HelpContext context) 526Func<HelpContext, string?>? getFirstColumn, 527Func<HelpContext, string?>? getSecondColumn, 528Func<HelpContext, string?>? getDefaultValue) 535public Func<HelpContext, string?>? GetFirstColumn { get; } 536public Func<HelpContext, string?>? GetSecondColumn { get; } 537public Func<HelpContext, string?>? GetDefaultValue { get; }
Help\HelpBuilder.Default.cs (8)
81List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, 172public static IEnumerable<Func<HelpContext, bool>> GetLayout() 185public static Func<HelpContext, bool> SynopsisSection() => 195public static Func<HelpContext, bool> CommandUsageSection() => 205public static Func<HelpContext, bool> CommandArgumentsSection() => 223public static Func<HelpContext, bool> SubcommandsSection() => 229public static Func<HelpContext, bool> OptionsSection() => 289public static Func<HelpContext, bool> AdditionalArgumentsSection() =>
Help\HelpBuilderExtensions.cs (1)
42internal static IEnumerable<T> RecurseWhileNotNull<T>(this T? source, Func<T, T?> next) where T : class
Invocation\AnonymousSynchronousCommandLineAction.cs (2)
8private readonly Func<ParseResult, int> _syncAction; 10internal AnonymousSynchronousCommandLineAction(Func<ParseResult, int> action)
Option.cs (1)
95public List<Func<CompletionContext, IEnumerable<CompletionItem>>> CompletionSources => Argument.CompletionSources;
Option{T}.cs (2)
32public Func<ArgumentResult, T>? DefaultValueFactory 39public Func<ArgumentResult, T?>? CustomParser
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\RangeAttribute.cs (3)
106private Func<object, object?>? Conversion { get; set; } 108private void Initialize(IComparable minimum, IComparable maximum, Func<object, object?> conversion) 240Func<object, object?> conversion;
System\ComponentModel\DataAnnotations\ValidationContext.cs (3)
36private Func<Type, object?>? _serviceProvider; 261/// A <see cref="Func{T, TResult}" /> that can return service instances given the 265public void InitializeServiceProvider(Func<Type, object?> serviceProvider)
System.ComponentModel.Composition (45)
System\ComponentModel\Composition\ConstraintServices.cs (7)
23public static Expression<Func<ExportDefinition, bool>> CreateConstraint(string contractName, string? requiredTypeIdentity, IEnumerable<KeyValuePair<string, Type>> requiredMetadata, CreationPolicy requiredCreationPolicy) 52Expression<Func<ExportDefinition, bool>> constraint = Expression.Lambda<Func<ExportDefinition, bool>>(constraintBody, parameter); 186public static Expression<Func<ExportDefinition, bool>> CreatePartCreatorConstraint(Expression<Func<ExportDefinition, bool>> baseConstraint, ImportDefinition productImportDefinition) 213Expression<Func<ExportDefinition, bool>> constraint = 214Expression.Lambda<Func<ExportDefinition, bool>>(
System\ComponentModel\Composition\ExportServices.cs (6)
47internal static Func<Export, object> CreateStronglyTypedLazyFactory(Type? exportType, Type? metadataViewType) 61return (Func<Export, object>)Delegate.CreateDelegate(typeof(Func<Export, object>), genericMethod); 64internal static Func<Export, Lazy<object, object>> CreateSemiStronglyTypedLazyFactory(Type? exportType, Type? metadataViewType) 70return (Func<Export, Lazy<object, object>>)Delegate.CreateDelegate(typeof(Func<Export, Lazy<object, object>>), genericMethod);
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (1)
266Func<Export, Lazy<object, object>> typedExportFactory = ExportServices.CreateSemiStronglyTypedLazyFactory(type, metadataViewType);
System\ComponentModel\Composition\Hosting\FilteredCatalog.cs (3)
16private readonly Func<ComposablePartDefinition, bool> _filter; 27public FilteredCatalog(ComposablePartCatalog catalog, Func<ComposablePartDefinition, bool> filter) : 32internal FilteredCatalog(ComposablePartCatalog catalog, Func<ComposablePartDefinition, bool> filter, FilteredCatalog? complement)
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependenciesTraversal.cs (2)
17private readonly Func<ImportDefinition, bool> _importFilter; 20public DependenciesTraversal(FilteredCatalog catalog, Func<ImportDefinition, bool> importFilter)
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependentsTraversal.cs (2)
23private readonly Func<ImportDefinition, bool> _importFilter; 26public DependentsTraversal(FilteredCatalog catalog, Func<ImportDefinition, bool> importFilter)
System\ComponentModel\Composition\Hosting\FilteredCatalog.Traversal.cs (2)
28public FilteredCatalog IncludeDependencies(Func<ImportDefinition, bool> importFilter) 51public FilteredCatalog IncludeDependents(Func<ImportDefinition, bool> importFilter)
System\ComponentModel\Composition\Hosting\ImportSourceImportDefinitionHelpers.cs (1)
68public override Expression<Func<ExportDefinition, bool>> Constraint
System\ComponentModel\Composition\Hosting\ScopingExtensions.cs (1)
135public static FilteredCatalog Filter(this ComposablePartCatalog catalog, Func<ComposablePartDefinition, bool> filter)
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (3)
25private Expression<Func<ExportDefinition, bool>>? _constraint; 260/// A <see cref="Expression{TDelegate}"/> containing a <see cref="Func{T, TResult}"/> 272public override Expression<Func<ExportDefinition, bool>> Constraint =>
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (7)
19private readonly Expression<Func<ExportDefinition, bool>>? _constraint; 24private Func<ExportDefinition, bool>? _compiledConstraint; 49/// A <see cref="Expression{TDelegate}"/> containing a <see cref="Func{T, TResult}"/> 81public ImportDefinition(Expression<Func<ExportDefinition, bool>> constraint, string? contractName, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite) 89public ImportDefinition(Expression<Func<ExportDefinition, bool>> constraint, string? contractName, ImportCardinality cardinality, bool isRecomposable, bool isPrerequisite, IDictionary<string, object?>? metadata) 188/// A <see cref="Expression{TDelegate}"/> containing a <see cref="Func{T, TResult}"/> 200public virtual Expression<Func<ExportDefinition, bool>> Constraint
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.cs (4)
23public Func<Export, object> CreateStronglyTypedExportFactoryFactory(Type exportType, Type? metadataViewType) 40Func<Export, object> exportFactoryFactory = (Func<Export, object>)Delegate.CreateDelegate(typeof(Func<Export, object>), this, genericMethod);
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (4)
21private Func<Export, object>? _castSingleValue; 25private static Dictionary<Type, Func<Export, object>?> CastSingleValueCache => field ??= new(); 61public Func<Export, object>? CastExport 155private static bool TryGetCastFunction(Type genericType, bool isOpenGeneric, Type[] arguments, out Func<Export, object>? castFunction)
System\ComponentModel\Composition\ReflectionModel\PartCreatorMemberImportDefinition.cs (1)
38public override Expression<Func<ExportDefinition, bool>> Constraint
System\ComponentModel\Composition\ReflectionModel\PartCreatorParameterImportDefinition.cs (1)
38public override Expression<Func<ExportDefinition, bool>> Constraint
System.ComponentModel.Composition.Registration (29)
System\ComponentModel\Composition\Registration\ExportBuilder.cs (4)
14private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 49public ExportBuilder AddMetadata(string name, Func<Type, object> itemFunc) 51_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 84foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs)
System\ComponentModel\Composition\Registration\PartBuilder.cs (7)
21private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 24private Func<ConstructorInfo[], ConstructorInfo> _constructorFilter; 74public PartBuilder SelectConstructor(Func<ConstructorInfo[], ConstructorInfo> constructorFilter) 79public PartBuilder SelectConstructor(Func<ConstructorInfo[], ConstructorInfo> constructorFilter, 194public PartBuilder AddMetadata(string name, Func<Type, object> itemFunc) 196_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 286foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (18)
18public PropertyExpressionAdapter(Expression<Func<T, object>> propertyFilter, 42private static PropertyInfo SelectProperties(Expression<Func<T, object>> propertyFilter) 60private static Expression<Func<T, object>> Reduce(Expression<Func<T, object>> expr) 64expr = (Expression<Func<T, object>>)expr.Reduce(); 75public ConstructorExpressionAdapter(Expression<Func<ParameterImportBuilder, T>> selectConstructor) 94private void ParseSelectConstructor(Expression<Func<ParameterImportBuilder, T>> constructorFilter) 133private static Expression<Func<ParameterImportBuilder, T>> Reduce(Expression<Func<ParameterImportBuilder, T>> expr) 148public PartBuilder<T> SelectConstructor(Expression<Func<ParameterImportBuilder, T>> constructorFilter) 159public PartBuilder<T> ExportProperty(Expression<Func<T, object>> propertyFilter) 165Expression<Func<T, object>> propertyFilter, 176public PartBuilder<T> ExportProperty<TContract>(Expression<Func<T, object>> propertyFilter) 181public PartBuilder<T> ExportProperty<TContract>(Expression<Func<T, object>> propertyFilter, 192public PartBuilder<T> ImportProperty(Expression<Func<T, object>> propertyFilter) 197public PartBuilder<T> ImportProperty(Expression<Func<T, object>> propertyFilter, 208public PartBuilder<T> ImportProperty<TContract>(Expression<Func<T, object>> propertyFilter) 213public PartBuilder<T> ImportProperty<TContract>(Expression<Func<T, object>> propertyFilter,
System.ComponentModel.TypeConverter (2)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (2)
100private readonly Func<Type, TypeConverter> _constructionFunc; 116public IntrinsicTypeConverterData(Func<Type, TypeConverter> constructionFunc, bool cacheConverterInstance = true)
System.Composition.Convention (40)
System\Composition\Convention\ExportConventionBuilder.cs (6)
21private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 22private Func<Type, string> _getContractNameFromPartType; 71public ExportConventionBuilder AsContractName(Func<Type, string> getContractNameFromPartType) 105public ExportConventionBuilder AddMetadata(string name, Func<Type, object> getValueFromPartType) 115_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 139foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs)
System\Composition\Convention\ImportConventionBuilder.cs (6)
20private Func<Type, string> _getContractNameFromPartType; 22private List<Tuple<string, Func<Type, object>>> _metadataConstraintItemFuncs; 48public ImportConventionBuilder AsContractName(Func<Type, string> getContractNameFromPartType) 113public ImportConventionBuilder AddMetadataConstraint(string name, Func<Type, object> getConstraintValueFromPartType) 123_metadataConstraintItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 163foreach (Tuple<string, Func<Type, object>> item in _metadataConstraintItemFuncs)
System\Composition\Convention\PartConventionBuilder.cs (7)
26private List<Tuple<string, Func<Type, object>>> _metadataItemFuncs; 29private Func<IEnumerable<ConstructorInfo>, ConstructorInfo> _constructorFilter; 107public PartConventionBuilder SelectConstructor(Func<IEnumerable<ConstructorInfo>, ConstructorInfo> constructorSelector) 121public PartConventionBuilder SelectConstructor(Func<IEnumerable<ConstructorInfo>, ConstructorInfo> constructorSelector, 384public PartConventionBuilder AddPartMetadata(string name, Func<Type, object> getValueFromPartType) 394_metadataItemFuncs ??= new List<Tuple<string, Func<Type, object>>>(); 484foreach (Tuple<string, Func<Type, object>> item in _metadataItemFuncs)
System\Composition\Convention\PartConventionBuilderOfT.cs (21)
48private static Expression<Func<T, object>> Reduce(Expression<Func<T, object>> expr) 52expr = (Expression<Func<T, object>>)expr.Reduce(); 74Expression<Func<T, object>> propertySelector, 98private static PropertyInfo SelectProperties(Expression<Func<T, object>> propertySelector) 116private static Expression<Func<T, object>> Reduce(Expression<Func<T, object>> expr) 120expr = (Expression<Func<T, object>>)expr.Reduce(); 131public ConstructorExpressionAdapter(Expression<Func<ParameterImportConventionBuilder, T>> selectConstructor) 154private void ParseSelectConstructor(Expression<Func<ParameterImportConventionBuilder, T>> constructorSelector) 190private static Expression<Func<ParameterImportConventionBuilder, T>> Reduce(Expression<Func<ParameterImportConventionBuilder, T>> expr) 209public PartConventionBuilder<T> SelectConstructor(Expression<Func<ParameterImportConventionBuilder, T>> constructorSelector) 223public PartConventionBuilder<T> ExportProperty(Expression<Func<T, object>> propertySelector) 235Expression<Func<T, object>> propertySelector, 252public PartConventionBuilder<T> ExportProperty<TContract>(Expression<Func<T, object>> propertySelector) 265Expression<Func<T, object>> propertySelector, 280public PartConventionBuilder<T> ImportProperty(Expression<Func<T, object>> propertySelector) 292Expression<Func<T, object>> propertySelector, 308public PartConventionBuilder<T> ImportProperty<TContract>(Expression<Func<T, object>> propertySelector) 321Expression<Func<T, object>> propertySelector,
System.Composition.Hosting (6)
System\Composition\Hosting\Core\ExportDescriptorPromise.cs (1)
41Func<IEnumerable<CompositionDependency>, ExportDescriptor> getDescriptor)
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (1)
42var metadataProvider = MetadataViewProvider.GetMetadataViewProvider<TMetadata>();
System\Composition\Hosting\Providers\Lazy\LazyWithMetadataExportDescriptorProvider.cs (1)
30var metadataProvider = MetadataViewProvider.GetMetadataViewProvider<TMetadata>();
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (3)
19public static Func<IDictionary<string, object>, TMetadata> GetMetadataViewProvider<TMetadata>() 37return Expression.Lambda<Func<IDictionary<string, object>, TMetadata>>( 68return Expression.Lambda<Func<IDictionary<string, object>, TMetadata>>(
System.Configuration.ConfigurationManager (6)
System\Configuration\BaseConfigurationRecord.cs (2)
238internal Func<string, string> TypeStringTransformer => CurrentConfiguration?.TypeStringTransformer; 240internal Func<string, string> AssemblyStringTransformer => CurrentConfiguration?.AssemblyStringTransformer;
System\Configuration\Configuration.cs (4)
21private Func<string, string> _assemblyStringTransformer; 26private Func<string, string> _typeStringTransformer; 120public Func<string, string> TypeStringTransformer 133public Func<string, string> AssemblyStringTransformer
System.Core (1)
System.Core.cs (1)
93[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,>))]
System.Data.Common (42)
System\Data\Common\DataStorage.cs (1)
127private static readonly Func<Type, Tuple<bool, bool, bool, bool>> s_inspectTypeForInterfaces = InspectTypeForInterfaces;
System\Data\DataRowExtensions.cs (4)
145internal static readonly Func<object, T?> s_unbox = Create(); 147private static Func<object, T?> Create() 161static Func<object, T?> CreateWhenDynamicCodeSupported() 167.CreateDelegate<Func<object, T>>();
System\Data\EnumerableRowCollection.cs (13)
38private readonly List<Func<TRow, bool>> _listOfPredicates; 43private readonly Func<TRow, TRow>? _selector; 83_listOfPredicates = new List<Func<TRow, bool>>(); 94_listOfPredicates = new List<Func<TRow, bool>>(); 102internal EnumerableRowCollection(EnumerableRowCollection<TRow>? source, IEnumerable<TRow> enumerableRows, Func<TRow, TRow>? selector) 114_listOfPredicates = new List<Func<TRow, bool>>(source._listOfPredicates); 120_listOfPredicates = new List<Func<TRow, bool>>(); 156Func<DataRow, bool>? finalPredicate = null; // Conjunction of all .Where(..) predicates 170foreach (Func<TRow, bool> pred in _listOfPredicates) 197foreach (Func<TRow, bool> pred in _listOfPredicates) 278internal void AddPredicate(Func<TRow, bool> pred) 287internal void AddSortExpression<TKey>(Func<TRow, TKey> keySelector, bool isDescending, bool isOrderBy) 295internal void AddSortExpression<TKey>(Func<TRow, TKey> keySelector, IComparer<TKey> comparer, bool isDescending, bool isOrderBy)
System\Data\EnumerableRowCollectionExtensions.cs (11)
19public static EnumerableRowCollection<TRow> Where<TRow>(this EnumerableRowCollection<TRow> source, Func<TRow, bool> predicate) 30public static OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this EnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector) 42public static OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this EnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 53public static OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this EnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector) 65public static OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this EnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 77public static OrderedEnumerableRowCollection<TRow> ThenBy<TRow, TKey>(this OrderedEnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector) 89public static OrderedEnumerableRowCollection<TRow> ThenBy<TRow, TKey>(this OrderedEnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 101public static OrderedEnumerableRowCollection<TRow> ThenByDescending<TRow, TKey>(this OrderedEnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector) 113public static OrderedEnumerableRowCollection<TRow> ThenByDescending<TRow, TKey>(this OrderedEnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 127public static EnumerableRowCollection<S> Select<TRow, S>(this EnumerableRowCollection<TRow> source, Func<TRow, S> selector) 134return new EnumerableRowCollection<S>(((object)source) as EnumerableRowCollection<S>, typedEnumerable, ((object)selector) as Func<S, S>);
System\Data\SortExpressionBuilder.cs (7)
41private readonly LinkedList<Func<T, object>> _selectors = new LinkedList<Func<T, object>>(); 44private LinkedListNode<Func<T, object>>? _currentSelector; 50internal void Add(Func<T, object> keySelector, Comparison<object> compare, bool isOrderBy) 80foreach (Func<T, object> selector in _selectors) 132foreach (Func<T, object> selector in _selectors) 167foreach (Func<T, object> selector in _selectors)
System\Data\TypedTableBaseExtensions.cs (6)
18public static EnumerableRowCollection<TRow> Where<TRow>(this TypedTableBase<TRow> source, Func<TRow, bool> predicate) where TRow : DataRow 28public static OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this TypedTableBase<TRow> source, Func<TRow, TKey> keySelector) where TRow : DataRow 40Func<TRow, TKey> keySelector, 51public static OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this TypedTableBase<TRow> source, Func<TRow, TKey> keySelector) where TRow : DataRow 63Func<TRow, TKey> keySelector, 77public static EnumerableRowCollection<S> Select<TRow, S>(this TypedTableBase<TRow> source, Func<TRow, S> selector) where TRow : DataRow
System.Data.Odbc (1)
src\runtime\src\libraries\Common\src\System\Data\ProviderBase\DbReferenceCollection.cs (1)
140internal T? FindItem<T>(int tag, Func<T, bool> filterMethod) where T : class
System.Data.OleDb (4)
ColumnBinding.cs (3)
29private static Func<object, IntPtr>? s_getIDispatchForObject; 1048Volatile.Write(ref delegateInstance, mi.CreateDelegate(typeof(Func<object, IntPtr>))); 1049s_getIDispatchForObject = delegateInstance as Func<object, IntPtr>;
System\Data\ProviderBase\DbReferenceCollection.cs (1)
136internal T? FindItem<T>(int tag, Func<T, bool> filterMethod) where T : class
System.Diagnostics.DiagnosticSource (7)
System\Diagnostics\ActivityListener.cs (1)
51public Func<ActivitySource, bool>? ShouldListenTo { get; set; }
System\Diagnostics\ActivitySource.cs (2)
68Func<ActivitySource, bool>? shouldListenTo = listener.ShouldListenTo; 391var shouldListenTo = ((ActivityListener)obj).ShouldListenTo;
System\Diagnostics\DsesFilterAndTransform.cs (3)
837_propertyFetch = (Func<TObject, TProperty>)property.GetMethod!.CreateDelegate(typeof(Func<TObject, TProperty>)); 844private readonly Func<TObject, TProperty> _propertyFetch;
System\Diagnostics\Metrics\AggregatorStore.cs (1)
416private readonly Func<TObjectSequence, TAggregator?> _createAggregator;
System.Diagnostics.Process (7)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (1)
247Func<UnixProcessStartArguments, int> callback, out ProcessWaitState.Holder? waitStateHolder)
System\Diagnostics\Process.cs (1)
1458Func<UnixProcessStartArguments, int>
System\Diagnostics\Process.Unix.cs (1)
434private bool StartCoreWithCallback(ProcessStartInfo startInfo, SafeFileHandle? stdinHandle, SafeFileHandle? stdoutHandle, SafeFileHandle? stderrHandle, Func<UnixProcessStartArguments, int> callback)
System\Runtime\InteropServices\UnixProcessStartArguments.cs (2)
11/// This ref struct is populated by the <see cref="Start(ProcessStartInfo, Func{UnixProcessStartArguments, int})"/> method. 101public static Process Start(ProcessStartInfo startInfo, Func<UnixProcessStartArguments, int> callback)
System\Runtime\InteropServices\WindowsProcessStartArguments.cs (2)
11/// This ref struct is populated by the <see cref="Start(ProcessStartInfo, Func{WindowsProcessStartArguments, nint})"/> method. 86public static Process Start(ProcessStartInfo startInfo, Func<WindowsProcessStartArguments, nint> callback)
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.cs (1)
232public TReturn Encode<TReturn>(Func<ReadOnlySpan<byte>, TReturn> encodeCallback)
System.Linq (397)
System\Linq\Aggregate.cs (1)
86public static TResult Aggregate<TSource, TAccumulate, TResult>(this IEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, Func<TAccumulate, TResult> resultSelector)
System\Linq\AggregateBy.cs (11)
24/// This method is comparable to the <see cref="GroupBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey})"/> methods 29Func<TSource, TKey> keySelector, 68/// This method is comparable to the <see cref="GroupBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey})"/> methods 73Func<TSource, TKey> keySelector, 74Func<TKey, TAccumulate> seedSelector, 103private static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateByIterator<TSource, TKey, TAccumulate>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 117static Dictionary<TKey, TAccumulate> PopulateDictionary(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) 135private static IEnumerable<KeyValuePair<TKey, TAccumulate>> AggregateByIterator<TSource, TKey, TAccumulate>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 149static Dictionary<TKey, TAccumulate> PopulateDictionary(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, Func<TKey, TAccumulate> seedSelector, Func<TAccumulate, TSource, TAccumulate> func, IEqualityComparer<TKey>? keyComparer)
System\Linq\AnyAll.cs (2)
44public static bool Any<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 80public static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
System\Linq\Average.cs (12)
169public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector) => Average<TSource, int, long, double>(source, selector); 171public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector) => Average<TSource, long, long, double>(source, selector); 173public static float Average<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector) => (float)Average<TSource, float, double, double>(source, selector); 175public static double Average<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) => Average<TSource, double, double, double>(source, selector); 177public static decimal Average<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector) => Average<TSource, decimal, decimal, decimal>(source, selector); 179private static TResult Average<TSource, TSelector, TAccumulator, TResult>(this IEnumerable<TSource> source, Func<TSource, TSelector> selector) 213public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector) => Average<TSource, int, long, double>(source, selector); 215public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector) => Average<TSource, long, long, double>(source, selector); 217public static float? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector) => Average<TSource, float, double, double>(source, selector) is double result ? (float)result : null; 219public static double? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector) => Average<TSource, double, double, double>(source, selector); 221public static decimal? Average<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector) => Average<TSource, decimal, decimal, decimal>(source, selector); 223private static TResult? Average<TSource, TSelector, TAccumulator, TResult>(this IEnumerable<TSource> source, Func<TSource, TSelector?> selector)
System\Linq\Count.cs (2)
46public static int Count<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 156public static long LongCount<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
System\Linq\CountBy.cs (3)
20public static IEnumerable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 39private static IEnumerable<KeyValuePair<TKey, int>> CountByIterator<TSource, TKey>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull 54private static Dictionary<TKey, int> BuildCountDictionary<TSource, TKey>(IEnumerator<TSource> enumerator, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer) where TKey : notnull
System\Linq\Distinct.cs (5)
37/// <para>The <see cref="DistinctBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey})" /> method returns an unordered sequence that contains no duplicate values. The default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para> 39public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => DistinctBy(source, keySelector, null); 51/// <para>The <see cref="DistinctBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IEqualityComparer{TKey}?)" /> method returns an unordered sequence that contains no duplicate values. If <paramref name="comparer" /> is <see langword="null" />, the default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para> 53public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 72private static IEnumerable<TSource> DistinctByIterator<TSource, TKey>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Except.cs (3)
49public static IEnumerable<TSource> ExceptBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector) => ExceptBy(first, second, keySelector, null); 61public static IEnumerable<TSource> ExceptBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 92private static IEnumerable<TSource> ExceptByIterator<TSource, TKey>(IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer)
System\Linq\First.cs (4)
22public static TSource First<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 48public static TSource? FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) => 58public static TSource FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue) 101private static TSource? TryGetFirst<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, out bool found)
System\Linq\FullJoin.cs (10)
29/// The following code example demonstrates how to use <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 96/// In relational database terms, the <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements a full outer equijoin. 101public static IEnumerable<TResult> FullJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer = null) 174public static IEnumerable<(TOuter? Outer, TInner? Inner)> FullJoin<TOuter, TInner, TKey>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer = null) => 177private static IEnumerable<TResult> FullJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\Grouping.cs (24)
12public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => 15public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 35public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) => 38public static IEnumerable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) 63public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector) => 66public static IEnumerable<TResult> GroupBy<TSource, TKey, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 91public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector) => 94public static IEnumerable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 127private readonly Func<TSource, TKey> _keySelector; 128private readonly Func<TSource, TElement> _elementSelector; 135public GroupByResultIterator(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 185private readonly Func<TSource, TKey> _keySelector; 192public GroupByResultIterator(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 241private readonly Func<TSource, TKey> _keySelector; 242private readonly Func<TSource, TElement> _elementSelector; 248public GroupByIterator(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) 296private readonly Func<TSource, TKey> _keySelector; 302public GroupByIterator(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer)
System\Linq\GroupJoin.cs (10)
28public static IEnumerable<IGrouping<TOuter, TInner>> GroupJoin<TOuter, TInner, TKey>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 58public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector) => 61public static IEnumerable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 96private static IEnumerable<IGrouping<TOuter, TInner>> GroupJoinIterator<TOuter, TInner, TKey>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer) 111private static IEnumerable<TResult> GroupJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, IEnumerable<TInner>, TResult> resultSelector, IEqualityComparer<TKey>? comparer)
System\Linq\Intersect.cs (3)
41public static IEnumerable<TSource> IntersectBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector) => IntersectBy(first, second, keySelector, null); 58public static IEnumerable<TSource> IntersectBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 89private static IEnumerable<TSource> IntersectByIterator<TSource, TKey>(IEnumerable<TSource> first, IEnumerable<TKey> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Iterator.cs (2)
90public virtual IEnumerable<TResult> Select<TResult>(Func<TSource, TResult> selector) => 100public virtual IEnumerable<TSource> Where(Func<TSource, bool> predicate) =>
System\Linq\Join.cs (30)
26/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> to perform an inner join of two sequences based on a common key. 96/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> 100/// In relational database terms, the <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method implements an inner equijoin. 104/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method, 106/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method, 110public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector) => 130/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 200/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 204/// In relational database terms, the <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements an inner equijoin. 208/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method, 210/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method, 214public static IEnumerable<TResult> Join<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 249private static IEnumerable<TResult> JoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 297public static IEnumerable<(TOuter Outer, TInner Inner)> Join<TOuter, TInner, TKey>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 327private static IEnumerable<(TOuter Outer, TInner Inner)> JoinIterator<TOuter, TInner, TKey>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Last.cs (4)
22public static TSource Last<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 48public static TSource? LastOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 58public static TSource LastOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue) 108private static TSource? TryGetLast<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, out bool found)
System\Linq\LeftJoin.cs (26)
26/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> to perform aa left outer join of two sequences based on a common key. 97/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> 101/// In relational database terms, the <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method implements an outer left equijoin. 105/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method. 109public static IEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner?, TResult> resultSelector) => 129/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> to perform aa left outer join of two sequences based on a common key. 200/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 204/// In relational database terms, the <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements an outer left equijoin. 208/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method. 212public static IEnumerable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 247private static IEnumerable<TResult> LeftJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter, TInner?, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 297public static IEnumerable<(TOuter Outer, TInner? Inner)> LeftJoin<TOuter, TInner, TKey>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 327private static IEnumerable<(TOuter Outer, TInner? Inner)> LeftJoinIterator<TOuter, TInner, TKey>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Lookup.cs (10)
13public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => 16public static ILookup<TKey, TSource> ToLookup<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 36public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) => 39public static ILookup<TKey, TElement> ToLookup<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) 84internal static Lookup<TKey, TElement> Create<TSource>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) 99internal static Lookup<TKey, TElement> Create(IEnumerable<TElement> source, Func<TElement, TKey> keySelector, IEqualityComparer<TKey>? comparer) 113internal static Lookup<TKey, TElement> CreateForJoin(IEnumerable<TElement> source, Func<TElement, TKey> keySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Max.cs (17)
428public static TSource? MaxBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => MaxBy(source, keySelector, null); 442public static TSource? MaxBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 537public static int Max<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector) => MaxInteger(source, selector); 539public static int? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector) => MaxInteger(source, selector); 541public static long Max<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector) => MaxInteger(source, selector); 543public static long? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector) => MaxInteger(source, selector); 545private static TResult MaxInteger<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector) where TResult : struct, IBinaryInteger<TResult> 577private static TResult? MaxInteger<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult?> selector) where TResult : struct, IBinaryInteger<TResult> 642public static float Max<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector) => MaxFloat(source, selector); 644public static float? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector) => MaxFloat(source, selector); 646public static double Max<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) => MaxFloat(source, selector); 648public static double? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector) => MaxFloat(source, selector); 650private static TResult MaxFloat<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector) where TResult : struct, IFloatingPointIeee754<TResult> 692private static TResult? MaxFloat<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult?> selector) where TResult : struct, IFloatingPointIeee754<TResult> 749public static decimal Max<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector) 781public static decimal? Max<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector) 821public static TResult? Max<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
System\Linq\Min.cs (17)
407public static TSource? MinBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => MinBy(source, keySelector, comparer: null); 421public static TSource? MinBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 516public static int Min<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector) => MinInteger(source, selector); 518public static int? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector) => MinInteger(source, selector); 520public static long Min<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector) => MinInteger(source, selector); 522public static long? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector) => MinInteger(source, selector); 524private static TResult MinInteger<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector) where TResult : struct, IBinaryInteger<TResult> 556private static TResult? MinInteger<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult?> selector) where TResult : struct, IBinaryInteger<TResult> 603public static float Min<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector) => MinFloat(source, selector); 605public static float? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector) => MinFloat(source, selector); 607public static double Min<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) => MinFloat(source, selector); 609public static double? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector) => MinFloat(source, selector); 611private static TResult MinFloat<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector) where TResult : struct, IFloatingPointIeee754<TResult> 661private static TResult? MinFloat<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult?> selector) where TResult : struct, IFloatingPointIeee754<TResult> 713public static decimal Min<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector) 745public static decimal? Min<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector) 785public static TResult? Min<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
System\Linq\OfType.SpeedOpt.cs (3)
146public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) 155Func<object, TResult2> localSelector = 169Func<object, bool> isTResult = static o => o is TResult;
System\Linq\OrderBy.cs (9)
50public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) 53public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 95public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) => 98public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) => 101public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector) 111public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 121public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector) 131public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 168IOrderedEnumerable<TElement> CreateOrderedEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending);
System\Linq\OrderedEnumerable.cs (11)
29IOrderedEnumerable<TElement> IOrderedEnumerable<TElement>.CreateOrderedEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending) => 32public TElement? TryGetLast(Func<TElement, bool> predicate, out bool found) 67private readonly Func<TElement, TKey> _keySelector; 73internal OrderedIterator(IEnumerable<TElement> source, Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending, OrderedIterator<TElement>? parent) : 259protected readonly Func<TElement, TKey> _keySelector; 264public CachingComparer(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending) 293public CachingComparerWithChild(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending, CachingComparer<TElement> child) 331internal static readonly Func<TElement, TElement> IdentityFunc = e => e; 383private readonly Func<TElement, TKey> _keySelector; 389internal EnumerableSorter(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending, EnumerableSorter<TElement>? next) 399Func<TElement, TKey> keySelector = _keySelector;
System\Linq\OrderedEnumerable.SpeedOpt.cs (2)
271Func<TElement, TKey> keySelector = _keySelector; 323Func<TElement, TKey> keySelector = _keySelector;
System\Linq\Range.SpeedOpt.cs (1)
13public override IEnumerable<TResult> Select<TResult>(Func<T, TResult> selector)
System\Linq\RightJoin.cs (26)
26/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> to perform aa left outer join of two sequences based on a common key. 96/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> 100/// In relational database terms, the <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method implements an outer right equijoin. 104/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult})" /> method. 108public static IEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner, TResult> resultSelector) => 128/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> to perform aa left outer join of two sequences based on a common key. 198/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> 202/// In relational database terms, the <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method implements an outer right equijoin. 206/// <see cref="Join{TOuter, TInner, TKey, TResult}(IEnumerable{TOuter}, IEnumerable{TInner}, Func{TOuter, TKey}, Func{TInner, TKey}, Func{TOuter, TInner, TResult}, IEqualityComparer{TKey})" /> method. 210public static IEnumerable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 245private static IEnumerable<TResult> RightJoinIterator<TOuter, TInner, TKey, TResult>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, Func<TOuter?, TInner, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 295public static IEnumerable<(TOuter? Outer, TInner Inner)> RightJoin<TOuter, TInner, TKey>(this IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 325private static IEnumerable<(TOuter? Outer, TInner Inner)> RightJoinIterator<TOuter, TInner, TKey>(IEnumerable<TOuter> outer, IEnumerable<TInner> inner, Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Select.cs (13)
14this IEnumerable<TSource> source, Func<TSource, TResult> selector) 115private readonly Func<TSource, TResult> _selector; 118public IEnumerableSelectIterator(IEnumerable<TSource> source, Func<TSource, TResult> selector) 163public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 176private readonly Func<TSource, TResult> _selector; 178public ArraySelectIterator(TSource[] source, Func<TSource, TResult> selector) 206public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 219private readonly Func<TSource, TResult> _selector; 222public ListSelectIterator(List<TSource> source, Func<TSource, TResult> selector) 256public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 269private readonly Func<TSource, TResult> _selector; 272public IListSelectIterator(IList<TSource> source, Func<TSource, TResult> selector) 318public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) =>
System\Linq\Select.SizeOpt.cs (1)
12private sealed class SizeOptIListSelectIterator<TSource, TResult>(IList<TSource> _source, Func<TSource, TResult> _selector)
System\Linq\Select.SpeedOpt.cs (19)
22Func<TSource, TResult> selector = _selector; 39Func<TSource, TResult> selector = _selector; 164private static void Fill(ReadOnlySpan<TSource> source, Span<TResult> destination, Func<TSource, TResult> func) 254private readonly Func<T, TResult> _selector; 256public RangeSelectIterator(T start, T end, Func<T, TResult> selector) 287public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 307private static void Fill(Span<TResult> results, T start, Func<T, TResult> func) 420private static void Fill(ReadOnlySpan<TSource> source, Span<TResult> destination, Func<TSource, TResult> func) 538private static void Fill(IList<TSource> source, Span<TResult> results, Func<TSource, TResult> func) 637private readonly Func<TSource, TResult> _selector; 640public IteratorSelectIterator(Iterator<TSource> source, Func<TSource, TResult> selector) 685public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 733Func<TSource, TResult> selector = _selector; 773Func<TSource, TResult> selector = _selector; 806private static void Fill(Iterator<TSource> source, Span<TResult> results, Func<TSource, TResult> func) 849private readonly Func<TSource, TResult> _selector; 853public IListSkipTakeSelectIterator(IList<TSource> source, Func<TSource, TResult> selector, int minIndexInclusive, int maxIndexInclusive) 885public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 981private static void Fill(IList<TSource> source, Span<TResult> destination, Func<TSource, TResult> func, int sourceIndex)
System\Linq\SelectMany.cs (5)
11public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector) 110public static IEnumerable<TResult> SelectMany<TSource, TCollection, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) 135private static IEnumerable<TResult> SelectManyIterator<TSource, TCollection, TResult>(IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector) 149private readonly Func<TSource, IEnumerable<TResult>> _selector; 153internal SelectManySingleSelectorIterator(IEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector)
System\Linq\SelectMany.SpeedOpt.cs (2)
37Func<TSource, IEnumerable<TResult>> selector = _selector; 54Func<TSource, IEnumerable<TResult>> selector = _selector;
System\Linq\Single.cs (4)
21public static TSource Single<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 48public static TSource? SingleOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 59public static TSource SingleOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue) 106private static TSource? TryGetSingle<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, out bool found)
System\Linq\Skip.cs (2)
41public static IEnumerable<TSource> SkipWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 61private static IEnumerable<TSource> SkipWhileIterator<TSource>(IEnumerable<TSource> source, Func<TSource, bool> predicate)
System\Linq\SkipTake.SpeedOpt.cs (1)
52public override IEnumerable<TResult> Select<TResult>(Func<TSource, TResult> selector) =>
System\Linq\Sum.cs (12)
207public static int Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, int> selector) => Sum<TSource, int, int>(source, selector); 209public static long Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, long> selector) => Sum<TSource, long, long>(source, selector); 211public static float Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, float> selector) => Sum<TSource, float, double>(source, selector); 213public static double Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, double> selector) => Sum<TSource, double, double>(source, selector); 215public static decimal Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal> selector) => Sum<TSource, decimal, decimal>(source, selector); 217private static TResult Sum<TSource, TResult, TAccumulator>(this IEnumerable<TSource> source, Func<TSource, TResult> selector) 241public static int? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, int?> selector) => Sum<TSource, int, int>(source, selector); 243public static long? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, long?> selector) => Sum<TSource, long, long>(source, selector); 245public static float? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, float?> selector) => Sum<TSource, float, double>(source, selector); 247public static double? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, double?> selector) => Sum<TSource, double, double>(source, selector); 249public static decimal? Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, decimal?> selector) => Sum<TSource, decimal, decimal>(source, selector); 251private static TResult? Sum<TSource, TResult, TAccumulator>(this IEnumerable<TSource> source, Func<TSource, TResult?> selector)
System\Linq\Take.cs (2)
197public static IEnumerable<TSource> TakeWhile<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 217private static IEnumerable<TSource> TakeWhileIterator<TSource>(IEnumerable<TSource> source, Func<TSource, bool> predicate)
System\Linq\ToCollection.cs (9)
136public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull => 139public static Dictionary<TKey, TSource> ToDictionary<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 179private static Dictionary<TKey, TSource> SpanToDictionary<TSource, TKey>(ReadOnlySpan<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 189public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) where TKey : notnull => 192public static Dictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 237private static Dictionary<TKey, TElement> SpanToDictionary<TSource, TKey, TElement>(ReadOnlySpan<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull
System\Linq\Union.cs (3)
42public static IEnumerable<TSource> UnionBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TSource> second, Func<TSource, TKey> keySelector) => UnionBy(first, second, keySelector, null); 58public static IEnumerable<TSource> UnionBy<TSource, TKey>(this IEnumerable<TSource> first, IEnumerable<TSource> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 76private static IEnumerable<TSource> UnionByIterator<TSource, TKey>(IEnumerable<TSource> first, IEnumerable<TSource> second, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer)
System\Linq\Utilities.cs (6)
56public static Func<TSource, bool> CombinePredicates<TSource>(Func<TSource, bool> predicate1, Func<TSource, bool> predicate2) => 70public static Func<TSource, TResult> CombineSelectors<TSource, TMiddle, TResult>(Func<TSource, TMiddle> selector1, Func<TMiddle, TResult> selector2) =>
System\Linq\Where.cs (28)
12public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) 97private readonly Func<TSource, bool> _predicate; 100public IEnumerableWhereIterator(IEnumerable<TSource> source, Func<TSource, bool> predicate) 148public override IEnumerable<TResult> Select<TResult>(Func<TSource, TResult> selector) => 151public override IEnumerable<TSource> Where(Func<TSource, bool> predicate) => 162private readonly Func<TSource, bool> _predicate; 164public ArrayWhereIterator(TSource[] source, Func<TSource, bool> predicate) 195public override IEnumerable<TResult> Select<TResult>(Func<TSource, TResult> selector) => 198public override IEnumerable<TSource> Where(Func<TSource, bool> predicate) => 209private readonly Func<TSource, bool> _predicate; 212public ListWhereIterator(List<TSource> source, Func<TSource, bool> predicate) 249public override IEnumerable<TResult> Select<TResult>(Func<TSource, TResult> selector) => 252public override IEnumerable<TSource> Where(Func<TSource, bool> predicate) => 264private readonly Func<TSource, bool> _predicate; 265private readonly Func<TSource, TResult> _selector; 267public ArrayWhereSelectIterator(TSource[] source, Func<TSource, bool> predicate, Func<TSource, TResult> selector) 300public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 312private readonly Func<TSource, bool> _predicate; 313private readonly Func<TSource, TResult> _selector; 316public ListWhereSelectIterator(List<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector) 355public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) => 367private readonly Func<TSource, bool> _predicate; 368private readonly Func<TSource, TResult> _selector; 371public IEnumerableWhereSelectIterator(IEnumerable<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector) 422public override IEnumerable<TResult2> Select<TResult2>(Func<TResult, TResult2> selector) =>
System\Linq\Where.SizeOpt.cs (3)
14private readonly Func<TSource, bool> _predicate; 17public SizeOptIListWhereIterator(IList<TSource> source, Func<TSource, bool> predicate) 65public override IEnumerable<TSource> Where(Func<TSource, bool> predicate) =>
System\Linq\Where.SpeedOpt.cs (39)
41Func<TSource, bool> predicate = _predicate; 61Func<TSource, bool> predicate = _predicate; 78Func<TSource, bool> predicate = _predicate; 99Func<TSource, bool> predicate = _predicate; 132Func<TSource, bool> predicate = _predicate; 155Func<TSource, bool> predicate = _predicate; 173public static int GetCount(bool onlyIfCheap, ReadOnlySpan<TSource> source, Func<TSource, bool> predicate) 198public static TSource[] ToArray(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate) 219public static List<TSource> ToList(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate) 240Func<TSource, bool> predicate = _predicate; 258Func<TSource, bool> predicate = _predicate; 277Func<TSource, bool> predicate = _predicate; 300Func<TSource, bool> predicate = _predicate; 324Func<TSource, bool> predicate = _predicate; 342Func<TSource, bool> predicate = _predicate; 361Func<TSource, bool> predicate = _predicate; 384Func<TSource, bool> predicate = _predicate; 402public static int GetCount(bool onlyIfCheap, ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector) 431public static TResult[] ToArray(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector) 452public static List<TResult> ToList(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector) 473public static TResult? TryGetFirst(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector, out bool found) 490public static TResult? TryGetLast(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector, out bool found) 507public static TResult? TryGetElementAt(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector, int index, out bool found) 532public static bool Contains(ReadOnlySpan<TSource> source, Func<TSource, bool> predicate, Func<TSource, TResult> selector, TResult value) 597Func<TSource, bool> predicate = _predicate; 598Func<TSource, TResult> selector = _selector; 618Func<TSource, bool> predicate = _predicate; 619Func<TSource, TResult> selector = _selector; 636Func<TSource, bool> predicate = _predicate; 657Func<TSource, bool> predicate = _predicate; 690Func<TSource, bool> predicate = _predicate; 713Func<TSource, bool> predicate = _predicate;
System.Linq.AsyncEnumerable (138)
System\Linq\AggregateAsync.cs (2)
189Func<TAccumulate, TResult> resultSelector, 202Func<TAccumulate, TResult> resultSelector)
System\Linq\AggregateBy.cs (6)
35Func<TSource, TKey> keySelector, 51Func<TSource, TKey> keySelector, 173Func<TSource, TKey> keySelector, 174Func<TKey, TAccumulate> seedSelector, 189Func<TSource, TKey> keySelector, 190Func<TKey, TAccumulate> seedSelector,
System\Linq\AllAsync.cs (2)
26Func<TSource, bool> predicate, 36Func<TSource, bool> predicate)
System\Linq\AnyAsync.cs (2)
50Func<TSource, bool> predicate, 60Func<TSource, bool> predicate)
System\Linq\CountAsync.cs (4)
54Func<TSource, bool> predicate, 64Func<TSource, bool> predicate) 154Func<TSource, bool> predicate, 164Func<TSource, bool> predicate)
System\Linq\CountBy.cs (2)
25Func<TSource, TKey> keySelector, 36IAsyncEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? keyComparer, [EnumeratorCancellation] CancellationToken cancellationToken)
System\Linq\DistinctBy.cs (3)
23/// <para>The <see cref="DistinctBy{TSource, TKey}(IAsyncEnumerable{TSource}, Func{TSource, TKey}, IEqualityComparer{TKey}?)" /> method returns an unordered sequence that contains no duplicate values. If <paramref name="comparer" /> is <see langword="null" />, the default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para> 29Func<TSource, TKey> keySelector, 41Func<TSource, TKey> keySelector,
System\Linq\Empty.cs (1)
36public IOrderedAsyncEnumerable<TResult> CreateOrderedAsyncEnumerable<TKey>(Func<TResult, TKey> keySelector, IComparer<TKey>? comparer, bool descending)
System\Linq\ExceptBy.cs (2)
29Func<TSource, TKey> keySelector, 43Func<TSource, TKey> keySelector,
System\Linq\FirstAsync.cs (5)
57Func<TSource, bool> predicate, 67Func<TSource, bool> predicate) 173Func<TSource, bool> predicate, 205Func<TSource, bool> predicate, 216Func<TSource, bool> predicate,
System\Linq\FullJoin.cs (7)
33Func<TOuter, TKey> outerKeySelector, 34Func<TInner, TKey> innerKeySelector, 54Func<TOuter, TKey> outerKeySelector, 55Func<TInner, TKey> innerKeySelector, 269Func<TOuter, TKey> outerKeySelector, 270Func<TInner, TKey> innerKeySelector, 302Func<TElement, TKey> keySelector,
System\Linq\GroupBy.cs (12)
29Func<TSource, TKey> keySelector, 41Func<TSource, TKey> keySelector, 110Func<TSource, TKey> keySelector, 111Func<TSource, TElement> elementSelector, 124Func<TSource, TKey> keySelector, 125Func<TSource, TElement> elementSelector, 203Func<TSource, TKey> keySelector, 217Func<TSource, TKey> keySelector, 303Func<TSource, TKey> keySelector, 304Func<TSource, TElement> elementSelector, 319Func<TSource, TKey> keySelector, 320Func<TSource, TElement> elementSelector,
System\Linq\GroupJoin.cs (8)
34Func<TOuter, TKey> outerKeySelector, 35Func<TInner, TKey> innerKeySelector, 50Func<TOuter, TKey> outerKeySelector, 51Func<TInner, TKey> innerKeySelector, 154Func<TOuter, TKey> outerKeySelector, 155Func<TInner, TKey> innerKeySelector, 172Func<TOuter, TKey> outerKeySelector, 173Func<TInner, TKey> innerKeySelector,
System\Linq\IntersectBy.cs (2)
34Func<TSource, TKey> keySelector, 48Func<TSource, TKey> keySelector,
System\Linq\Join.cs (8)
36Func<TOuter, TKey> outerKeySelector, 37Func<TInner, TKey> innerKeySelector, 53Func<TOuter, TKey> outerKeySelector, 54Func<TInner, TKey> innerKeySelector, 180Func<TOuter, TKey> outerKeySelector, 181Func<TInner, TKey> innerKeySelector, 195Func<TOuter, TKey> outerKeySelector, 196Func<TInner, TKey> innerKeySelector,
System\Linq\LastAsync.cs (5)
63Func<TSource, bool> predicate, 73Func<TSource, bool> predicate, 216Func<TSource, bool> predicate, 245Func<TSource, bool> predicate, 256Func<TSource, bool> predicate,
System\Linq\LeftJoin.cs (8)
33Func<TOuter, TKey> outerKeySelector, 34Func<TInner, TKey> innerKeySelector, 50Func<TOuter, TKey> outerKeySelector, 51Func<TInner, TKey> innerKeySelector, 173Func<TOuter, TKey> outerKeySelector, 174Func<TInner, TKey> innerKeySelector, 188Func<TOuter, TKey> outerKeySelector, 189Func<TInner, TKey> innerKeySelector,
System\Linq\MaxByAsync.cs (2)
27Func<TSource, TKey> keySelector, 38Func<TSource, TKey> keySelector,
System\Linq\MinByAsync.cs (2)
27Func<TSource, TKey> keySelector, 38Func<TSource, TKey> keySelector,
System\Linq\OrderBy.cs (9)
35Func<TSource, TKey> keySelector, 90Func<TSource, TKey> keySelector, 134Func<TSource, TKey> keySelector, 172Func<TSource, TKey> keySelector, 210public IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending) => 229Debug.Assert(keySelector is Func<TElement, TKey> or Func<TElement, CancellationToken, ValueTask<TKey>>); 278internal static readonly Func<TElement, TElement> IdentityFunc = e => e; 333if (keySelector is Func<TElement, TKey> syncSelector) 443IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending);
System\Linq\RightJoin.cs (8)
33Func<TOuter, TKey> outerKeySelector, 34Func<TInner, TKey> innerKeySelector, 51Func<TOuter, TKey> outerKeySelector, 52Func<TInner, TKey> innerKeySelector, 174Func<TOuter, TKey> outerKeySelector, 175Func<TInner, TKey> innerKeySelector, 190Func<TOuter, TKey> outerKeySelector, 191Func<TInner, TKey> innerKeySelector,
System\Linq\Select.cs (2)
26Func<TSource, TResult> selector) 37Func<TSource, TResult> selector,
System\Linq\SelectMany.cs (10)
29Func<TSource, IEnumerable<TResult>> selector) 40Func<TSource, IEnumerable<TResult>> selector, 109Func<TSource, IAsyncEnumerable<TResult>> selector) 120Func<TSource, IAsyncEnumerable<TResult>> selector, 282Func<TSource, IEnumerable<TCollection>> collectionSelector, 295Func<TSource, IEnumerable<TCollection>> collectionSelector, 382Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 395Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 432Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector, 445Func<TSource, IAsyncEnumerable<TCollection>> collectionSelector,
System\Linq\SingleAsync.cs (5)
67Func<TSource, bool> predicate, 77Func<TSource, bool> predicate, 232Func<TSource, bool> predicate, 270Func<TSource, bool> predicate, 281Func<TSource, bool> predicate,
System\Linq\SkipWhile.cs (2)
29Func<TSource, bool> predicate) 40Func<TSource, bool> predicate,
System\Linq\TakeWhile.cs (2)
25Func<TSource, bool> predicate) 35IAsyncEnumerable<TSource> source, Func<TSource, bool> predicate,
System\Linq\ToDictionaryAsync.cs (6)
78Func<TSource, TKey> keySelector, 89Func<TSource, TKey> keySelector, 160Func<TSource, TKey> keySelector, 161Func<TSource, TElement> elementSelector, 173Func<TSource, TKey> keySelector, 174Func<TSource, TElement> elementSelector,
System\Linq\ToLookupAsync.cs (7)
30Func<TSource, TKey> keySelector, 41Func<TSource, TKey> keySelector, 129Func<TSource, TKey> keySelector, 130Func<TSource, TElement> elementSelector, 142Func<TSource, TKey> keySelector, 143Func<TSource, TElement> elementSelector, 287Func<TElement, TKey> keySelector,
System\Linq\UnionBy.cs (2)
26Func<TSource, TKey> keySelector, 40Func<TSource, TKey> keySelector,
System\Linq\Where.cs (2)
22Func<TSource, bool> predicate) 33Func<TSource, bool> predicate,
System.Linq.Expressions (34)
System\Dynamic\ExpandoObject.cs (1)
783private DynamicMetaObject BindGetOrInvokeMember(DynamicMetaObjectBinder binder, string name, bool ignoreCase, DynamicMetaObject fallback, Func<DynamicMetaObject, DynamicMetaObject>? fallbackInvoke)
System\Dynamic\Utils\DelegateHelpers.cs (11)
19internal static Delegate CreateObjectArrayDelegate(Type delegateType, Func<object?[], object?> handler) 37Func<object?[], object?> invoker); 42private static readonly MethodInfo s_FuncInvoke = typeof(Func<object?[], object?>).GetMethod("Invoke")!; 48public static void ActionThunk(Func<object?[], object?> handler) 53public static void ActionThunk1<T1>(Func<object?[], object?> handler, T1 t1) 58public static void ActionThunk2<T1, T2>(Func<object?[], object?> handler, T1 t1, T2 t2) 63public static TReturn FuncThunk<TReturn>(Func<object?[], object> handler) 68public static TReturn FuncThunk1<T1, TReturn>(Func<object?[], object> handler, T1 t1) 73public static TReturn FuncThunk2<T1, T2, TReturn>(Func<object?[], object> handler, T1 t1, T2 t2) 172private static Delegate CreateObjectArrayDelegateRefEmit(Type delegateType, Func<object?[], object?> handler) 208paramTypes[0] = typeof(Func<object[], object>);
System\Dynamic\Utils\Helpers.cs (1)
12internal static T? CommonNode<T>(T first, T second, Func<T, T> parent) where T : class
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (1)
195return typeof(Func<,>).MakeGenericType(types);
System\Linq\Expressions\ExpressionVisitor.cs (1)
91public static ReadOnlyCollection<T> Visit<T>(ReadOnlyCollection<T> nodes, Func<T, T> elementVisitor)
System\Linq\Expressions\Interpreter\CallInstruction.cs (2)
253var thunk = del.Target as Func<object[], object>;
System\Linq\Expressions\Interpreter\CallInstruction.Generated.cs (3)
419private readonly Func<T0, TRet> _target; 426_target = (Func<T0, TRet>)target.CreateDelegate(typeof(Func<T0, TRet>));
System\Linq\Expressions\Interpreter\ControlFlowInstructions.cs (2)
37public override string ToDebugString(int instructionIndex, object? cookie, Func<int, int> labelIndexer, IReadOnlyList<object>? objects) 164public override string ToDebugString(int instructionIndex, object? cookie, Func<int, int> labelIndexer, IReadOnlyList<object>? objects)
System\Linq\Expressions\Interpreter\Instruction.cs (1)
26public virtual string ToDebugString(int instructionIndex, object? cookie, Func<int, int> labelIndexer, IReadOnlyList<object>? objects) => ToString();
System\Linq\Expressions\Interpreter\InstructionList.cs (1)
112Func<int, int> labelIndexer, IReadOnlyList<KeyValuePair<int, object?>>? debugCookies)
System\Linq\Expressions\Interpreter\LabelInfo.cs (1)
219internal static T? CommonNode<T>(T first, T second, Func<T, T> parent) where T : class
System\Linq\Expressions\Interpreter\LocalAccess.cs (1)
27public override string ToDebugString(int instructionIndex, object? cookie, Func<int, int> labelIndexer, IReadOnlyList<object>? objects)
System\Linq\Expressions\Interpreter\StackOperations.cs (1)
48public override string ToDebugString(int instructionIndex, object? cookie, Func<int, int> labelIndexer, IReadOnlyList<object>? objects) =>
System\Linq\Expressions\StackGuard.cs (1)
61private R RunOnEmptyStackCore<R>(Func<object, R> action, object state)
System\Runtime\CompilerServices\CallSite.cs (6)
54private static CacheDict<Type, Func<CallSiteBinder, CallSite>>? s_siteCtors; 93CacheDict<Type, Func<CallSiteBinder, CallSite>>? ctors = s_siteCtors; 97s_siteCtors = ctors = new CacheDict<Type, Func<CallSiteBinder, CallSite>>(100); 100if (!ctors.TryGetValue(delegateType, out Func<CallSiteBinder, CallSite>? ctor)) 110ctor = (Func<CallSiteBinder, CallSite>)method.CreateDelegate(typeof(Func<CallSiteBinder, CallSite>));
System.Linq.Parallel (180)
System\Linq\Parallel\Enumerables\AggregationMinMaxHelpers.cs (2)
30Func<Pair<bool, T>, T> resultSelector = MakeResultSelectorFunction(); 110private static Func<Pair<bool, T>, T> MakeResultSelectorFunction()
System\Linq\Parallel\Partitioning\HashRepartitionEnumerator.cs (2)
31private readonly Func<TInputOutput, THashKey>? _keySelector; // A key-selector function. 66Func<TInputOutput, THashKey>? keySelector, HashRepartitionStream<TInputOutput, THashKey, int> repartitionStream,
System\Linq\Parallel\Partitioning\OrderedHashRepartitionEnumerator.cs (2)
31private readonly Func<TInputOutput, THashKey>? _keySelector; // A key-selector function. 68Func<TInputOutput, THashKey>? keySelector, OrderedHashRepartitionStream<TInputOutput, THashKey, TOrderKey> repartitionStream, CountdownEvent barrier,
System\Linq\Parallel\Partitioning\OrderedHashRepartitionStream.cs (1)
18PartitionedStream<TInputOutput, TOrderKey> inputStream, Func<TInputOutput, THashKey>? hashKeySelector,
System\Linq\Parallel\Partitioning\UnorderedHashRepartitionStream.cs (1)
23Func<TInputOutput, THashKey>? keySelector, IEqualityComparer<THashKey>? keyComparer, IEqualityComparer<TInputOutput>? elementComparer,
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (2)
60private readonly Func<TIntermediate, TOutput> _resultSelector; 75Func<TIntermediate, TOutput> resultSelector, bool throwIfEmpty, QueryAggregationOptions options)
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (4)
28private readonly Func<TLeftInput, TKey> _leftKeySelector; // The key selection routine for the outer (left) data source. 29private readonly Func<TRightInput, TKey> _rightKeySelector; // The key selection routine for the inner (right) data source. 38Func<TLeftInput, TKey> leftKeySelector, 39Func<TRightInput, TKey> rightKeySelector,
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (4)
44private readonly Func<TLeftInput, TKey> _leftKeySelector; // The key selection routine for the outer (left) data source. 45private readonly Func<TRightInput, TKey> _rightKeySelector; // The key selection routine for the inner (right) data source. 54Func<TLeftInput, TKey> leftKeySelector, 55Func<TRightInput, TKey> rightKeySelector,
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (4)
39private readonly Func<TInput, bool> _predicate; // The predicate used to test membership. 51internal AnyAllSearchOperator(IEnumerable<TInput> child, bool qualification, Func<TInput, bool> predicate) 152private readonly Func<TInput, bool> _predicate; // The predicate. 163Func<TInput, bool> predicate, int partitionIndex, Shared<bool> resultFoundFlag,
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (4)
26private readonly Func<TSource, bool>? _predicate; // The optional predicate used during the search. 36internal FirstQueryOperator(IEnumerable<TSource> child, Func<TSource, bool>? predicate) 124private readonly Func<TSource, bool>? _predicate; // The optional predicate used during the search. 139QueryOperatorEnumerator<TSource, TKey> source, Func<TSource, bool>? predicate,
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (12)
32private readonly Func<TSource, TGroupKey> _keySelector; // Key selection function. 33private readonly Func<TSource, TElement>? _elementSelector; // Optional element selection function. 51Func<TSource, TGroupKey> keySelector, 52Func<TSource, TElement>? elementSelector, 363private readonly Func<TSource, TElement> _elementSelector; // Function to select elements. 371IEqualityComparer<TGroupKey>? keyComparer, Func<TSource, TElement> elementSelector, CancellationToken cancellationToken) : 426private readonly Func<TSource, TGroupKey> _keySelector; // The key selection routine. 443Func<TSource, TGroupKey> keySelector, IEqualityComparer<TGroupKey>? keyComparer, IComparer<TOrderKey> orderComparer, 539Func<TSource, TGroupKey> keySelector, IEqualityComparer<TGroupKey>? keyComparer, IComparer<TOrderKey> orderComparer, 605private readonly Func<TSource, TElement> _elementSelector; // Function to select elements. 612Func<TSource, TGroupKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TGroupKey>? keyComparer, IComparer<TOrderKey> orderComparer,
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (4)
27private readonly Func<TSource, bool>? _predicate; // The optional predicate used during the search. 37internal LastQueryOperator(IEnumerable<TSource> child, Func<TSource, bool>? predicate) 120private readonly Func<TSource, bool>? _predicate; // The optional predicate used during the search. 135QueryOperatorEnumerator<TSource, TKey> source, Func<TSource, bool>? predicate,
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (2)
35private readonly Func<TLeftInput, IEnumerable<TRightInput>>? _rightChildSelector; // To select a new child each iteration. 53Func<TLeftInput, IEnumerable<TRightInput>>? rightChildSelector,
System\Linq\Parallel\QueryOperators\Unary\SelectQueryOperator.cs (5)
26private readonly Func<TInput, TOutput> _selector; 39internal SelectQueryOperator(IEnumerable<TInput> child, Func<TInput, TOutput> selector) 96private readonly Func<TInput, TOutput> _selector; // The actual select function. 102internal SelectQueryOperatorEnumerator(QueryOperatorEnumerator<TInput, TKey> source, Func<TInput, TOutput> selector) 141private readonly Func<TInput, TOutput> _selector; // Selector function
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (4)
27private readonly Func<TSource, bool>? _predicate; // The optional predicate used during the search. 36internal SingleQueryOperator(IEnumerable<TSource> child, Func<TSource, bool>? predicate) 99private readonly Func<TSource, bool>? _predicate; // The optional predicate used during the search. 111Func<TSource, bool>? predicate, Shared<int> totalElementCount)
System\Linq\Parallel\QueryOperators\Unary\SortQueryOperator.cs (6)
25private readonly Func<TInputOutput, TSortKey> _keySelector; // Key selector used when sorting. 32internal SortQueryOperator(IEnumerable<TInputOutput> source, Func<TInputOutput, TSortKey> keySelector, 55Func<TInputOutput, TKey2> key2Selector, IComparer<TKey2>? key2Comparer, bool descending) 65Func<TInputOutput, Pair<TSortKey, TKey2>> pairKeySelector = 171private readonly Func<TInputOutput, TSortKey> _keySelector; // Key selector used when sorting. 178Func<TInputOutput, TSortKey> keySelector)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (4)
45private readonly Func<TResult, bool>? _predicate; 67Func<TResult, bool>? predicate, 208private readonly Func<TResult, bool>? _predicate; // The actual predicate function. 229QueryOperatorEnumerator<TResult, TKey> source, Func<TResult, bool>? predicate, Func<TResult, TKey, bool>? indexedPredicate, bool take,
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (4)
25private readonly Func<TInputOutput, bool> _predicate; 38internal WhereQueryOperator(IEnumerable<TInputOutput> child, Func<TInputOutput, bool> predicate) 105private readonly Func<TInputOutput, bool> _predicate; // The predicate used for filtering. 113internal WhereQueryOperatorEnumerator(QueryOperatorEnumerator<TInputOutput, TKey> source, Func<TInputOutput, bool> predicate,
System\Linq\Parallel\Utils\ExceptionAggregator.cs (2)
120internal static Func<T, U> WrapFunc<T, U>(Func<T, U> f, CancellationState cancellationState)
System\Linq\Parallel\Utils\ExchangeUtilities.cs (2)
90PartitionedStream<TElement, TIgnoreKey> source, Func<TElement, THashKey>? keySelector, IEqualityComparer<THashKey>? keyComparer, 98PartitionedStream<TElement, TOrderKey> source, Func<TElement, THashKey>? keySelector, IEqualityComparer<THashKey>? keyComparer,
System\Linq\ParallelEnumerable.cs (109)
527public static ParallelQuery<TSource> Where<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 571this ParallelQuery<TSource> source, Func<TSource, TResult> selector) 684Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 714Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 744Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 781Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 816Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 847Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 878Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 916Func<TOuter, TKey> outerKeySelector, Func<TInner, TKey> innerKeySelector, 942this ParallelQuery<TSource> source, Func<TSource, IEnumerable<TResult>> selector) 994this ParallelQuery<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, 1065this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector) 1093this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1120this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector) 1147this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1177this OrderedParallelQuery<TSource> source, Func<TSource, TKey> keySelector) 1208this OrderedParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1238this OrderedParallelQuery<TSource> source, Func<TSource, TKey> keySelector) 1269this OrderedParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1297this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector) 1316this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) 1343this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) 1369this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) 1408this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector) 1436this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TKey, IEnumerable<TSource>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 1466this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector) 1497this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, Func<TKey, IEnumerable<TElement>, TResult> resultSelector, IEqualityComparer<TKey>? comparer) 1701Func<TAccumulate, TResult> resultSelector) 1757Func<TAccumulate, TAccumulate, TAccumulate> combineAccumulatorsFunc, Func<TAccumulate, TResult> resultSelector) 1813Func<TAccumulate, TResult> resultSelector) 1890public static int Count<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 1957public static long LongCount<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 2210public static int Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, int> selector) 2234public static int? Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, int?> selector) 2258public static long Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, long> selector) 2282public static long? Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, long?> selector) 2304public static float Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, float> selector) 2326public static float? Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, float?> selector) 2348public static double Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, double> selector) 2370public static double? Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, double?> selector) 2394public static decimal Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal> selector) 2418public static decimal? Sum<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal?> selector) 2707public static int Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, int> selector) 2729public static int? Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, int?> selector) 2754public static long Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, long> selector) 2776public static long? Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, long?> selector) 2801public static float Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, float> selector) 2823public static float? Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, float?> selector) 2848public static double Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, double> selector) 2870public static double? Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, double?> selector) 2895public static decimal Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal> selector) 2917public static decimal? Min<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal?> selector) 2943public static TResult? Min<TSource, TResult>(this ParallelQuery<TSource> source, Func<TSource, TResult> selector) 3221public static int Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, int> selector) 3243public static int? Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, int?> selector) 3268public static long Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, long> selector) 3290public static long? Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, long?> selector) 3315public static float Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, float> selector) 3337public static float? Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, float?> selector) 3362public static double Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, double> selector) 3384public static double? Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, double?> selector) 3409public static decimal Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal> selector) 3431public static decimal? Max<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal?> selector) 3457public static TResult? Max<TSource, TResult>(this ParallelQuery<TSource> source, Func<TSource, TResult> selector) 3721public static double Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, int> selector) 3745public static double? Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, int?> selector) 3772public static double Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, long> selector) 3796public static double? Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, long?> selector) 3821public static float Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, float> selector) 3843public static float? Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, float?> selector) 3868public static double Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, double> selector) 3890public static double? Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, double?> selector) 3915public static decimal Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal> selector) 3937public static decimal? Average<TSource>(this ParallelQuery<TSource> source, Func<TSource, decimal?> selector) 3964public static bool Any<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 4016public static bool All<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 4133public static ParallelQuery<TSource> TakeWhile<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 4215public static ParallelQuery<TSource> SkipWhile<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 4930this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull 4959this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 5021this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) where TKey : notnull 5056this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 5113this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector) where TKey : notnull 5138this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 5192this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector) where TKey : notnull 5224this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey>? comparer) where TKey : notnull 5438public static TSource First<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 5523public static TSource? FirstOrDefault<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 5614public static TSource Last<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 5697public static TSource? LastOrDefault<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 5774public static TSource Single<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate) 5831public static TSource? SingleOrDefault<TSource>(this ParallelQuery<TSource> source, Func<TSource, bool> predicate)
System.Linq.Queryable (283)
System\Linq\Queryable.cs (283)
48public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 56new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, IQueryable<TSource>>(Where).Method, 98public static IQueryable<TResult> Select<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TResult>> selector) 106new Func<IQueryable<TSource>, Expression<Func<TSource, TResult>>, IQueryable<TResult>>(Select).Method, 124public static IQueryable<TResult> SelectMany<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TResult>>> selector) 132new Func<IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TResult>>>, IQueryable<TResult>>(SelectMany).Method, 164public static IQueryable<TResult> SelectMany<TSource, TCollection, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, IEnumerable<TCollection>>> collectionSelector, Expression<Func<TSource, TCollection, TResult>> resultSelector) 173new Func<IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TCollection>>>, Expression<Func<TSource, TCollection, TResult>>, IQueryable<TResult>>(SelectMany).Method, 199/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> to perform an inner join of two sequences based on a common key. 259/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 263/// The <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> method 265/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 271/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 281public static IQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector) 292new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IQueryable<TResult>>(Join).Method, 313/// The following code example demonstrates how to use <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 374/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 378/// The <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 380/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 386/// <see cref="Join{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 396public static IQueryable<TResult> Join<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 407new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(Join).Method, 429public static IQueryable<IGrouping<TOuter, TInner>> GroupJoin<TOuter, TInner, TKey>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 439new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TOuter, TInner>>>(GroupJoin).Method, 457public static IQueryable<(TOuter Outer, TInner Inner)> Join<TOuter, TInner, TKey>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 467new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, IEqualityComparer<TKey>, IQueryable<(TOuter Outer, TInner Inner)>>(Join).Method, 472public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector) 483new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IQueryable<TResult>>(GroupJoin).Method, 488public static IQueryable<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 499new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, IEnumerable<TInner>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupJoin).Method, 519/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 580/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 584/// The <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> method 586/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 592/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 602public static IQueryable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner?, TResult>> resultSelector) 613new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner?, TResult>>, IQueryable<TResult>>(LeftJoin).Method, 634/// The following code example demonstrates how to use <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 695/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 699/// The <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 701/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 707/// <see cref="LeftJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 717public static IQueryable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter, TInner?, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 728new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter, TInner?, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(LeftJoin).Method, 746public static IQueryable<(TOuter Outer, TInner? Inner)> LeftJoin<TOuter, TInner, TKey>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 756new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, IEqualityComparer<TKey>, IQueryable<(TOuter Outer, TInner? Inner)>>(LeftJoin).Method, 769/// of the <see cref="Func{T,TResult}"/> types. 806/// of the <see cref="Func{T,TResult}"/> types. 834public static IOrderedQueryable<TSource> OrderBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 842new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(OrderBy).Method, 847public static IOrderedQueryable<TSource> OrderBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 855new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(OrderBy).Method, 868/// of the <see cref="Func{T,TResult}"/> types. 905/// of the <see cref="Func{T,TResult}"/> types. 933public static IOrderedQueryable<TSource> OrderByDescending<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 941new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(OrderByDescending).Method, 946public static IOrderedQueryable<TSource> OrderByDescending<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 954new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(OrderByDescending).Method, 974/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 1034/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 1038/// The <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> method 1040/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 1046/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}})" /> 1056public static IQueryable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter?, TInner, TResult>> resultSelector) 1067new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner, TResult>>, IQueryable<TResult>>(RightJoin).Method, 1088/// The following code example demonstrates how to use <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> to perform an inner join of two sequences based on a common key. 1148/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 1152/// The <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 1154/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1160/// <see cref="RightJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1170public static IQueryable<TResult> RightJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter?, TInner, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 1181new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(RightJoin).Method, 1199public static IQueryable<(TOuter? Outer, TInner Inner)> RightJoin<TOuter, TInner, TKey>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 1209new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, IEqualityComparer<TKey>, IQueryable<(TOuter? Outer, TInner Inner)>>(RightJoin).Method, 1233/// This method has at least one parameter of type <see cref="Expression{TDelegate}" /> whose type argument is one of the <see cref="Func{T,TResult}" /> types. 1237/// The <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> method 1239/// <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1245/// <see cref="FullJoin{TOuter, TInner, TKey, TResult}(IQueryable{TOuter}, IEnumerable{TInner}, Expression{Func{TOuter, TKey}}, Expression{Func{TInner, TKey}}, Expression{Func{TOuter, TInner, TResult}}, IEqualityComparer{TKey})" /> 1251public static IQueryable<TResult> FullJoin<TOuter, TInner, TKey, TResult>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<TOuter?, TInner?, TResult>> resultSelector, IEqualityComparer<TKey>? comparer = null) 1262new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, Expression<Func<TOuter?, TInner?, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(FullJoin).Method, 1282public static IQueryable<(TOuter? Outer, TInner? Inner)> FullJoin<TOuter, TInner, TKey>(this IQueryable<TOuter> outer, IEnumerable<TInner> inner, Expression<Func<TOuter, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, IEqualityComparer<TKey>? comparer = null) 1292new Func<IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter, TKey>>, Expression<Func<TInner, TKey>>, IEqualityComparer<TKey>, IQueryable<(TOuter? Outer, TInner? Inner)>>(FullJoin).Method, 1297public static IOrderedQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 1305new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(ThenBy).Method, 1310public static IOrderedQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 1318new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(ThenBy).Method, 1323public static IOrderedQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 1331new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IOrderedQueryable<TSource>>(ThenByDescending).Method, 1336public static IOrderedQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 1344new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(ThenByDescending).Method, 1379public static IQueryable<TSource> TakeWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 1387new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, IQueryable<TSource>>(TakeWhile).Method, 1417public static IQueryable<TSource> SkipWhile<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 1425new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, IQueryable<TSource>>(SkipWhile).Method, 1443public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 1451new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method, 1456public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector) 1465new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method, 1470public static IQueryable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 1478new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TSource>>>(GroupBy).Method, 1483public static IQueryable<IGrouping<TKey, TElement>> GroupBy<TSource, TKey, TElement>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, IEqualityComparer<TKey>? comparer) 1492new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, IEqualityComparer<TKey>, IQueryable<IGrouping<TKey, TElement>>>(GroupBy).Method, 1497public static IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector) 1507new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IQueryable<TResult>>(GroupBy).Method, 1512public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector) 1521new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IQueryable<TResult>>(GroupBy).Method, 1526public static IQueryable<TResult> GroupBy<TSource, TKey, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, IEnumerable<TSource>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 1535new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, IEnumerable<TSource>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method, 1540public static IQueryable<TResult> GroupBy<TSource, TKey, TElement, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TSource, TElement>> elementSelector, Expression<Func<TKey, IEnumerable<TElement>, TResult>> resultSelector, IEqualityComparer<TKey>? comparer) 1550new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TSource, TElement>>, Expression<Func<TKey, IEnumerable<TElement>, TResult>>, IEqualityComparer<TKey>, IQueryable<TResult>>(GroupBy).Method, 1586public static IQueryable<TSource> DistinctBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 1594new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(DistinctBy).Method, 1607public static IQueryable<TSource> DistinctBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 1615new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(DistinctBy).Method, 1743public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, Expression<Func<TSource, TKey>> keySelector) 1752new Func<IQueryable<TSource>, IEnumerable<TSource>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(UnionBy).Method, 1766public static IQueryable<TSource> UnionBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TSource> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 1775new Func<IQueryable<TSource>, IEnumerable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(UnionBy).Method, 1836public static IQueryable<TSource> IntersectBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector) 1845new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(IntersectBy).Method, 1861public static IQueryable<TSource> IntersectBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 1870new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(IntersectBy).Method, 1915public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector) 1924new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IQueryable<TSource>>(ExceptBy).Method, 1941public static IQueryable<TSource> ExceptBy<TSource, TKey>(this IQueryable<TSource> source1, IEnumerable<TKey> source2, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer) 1950new Func<IQueryable<TSource>, IEnumerable<TKey>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<TSource>>(ExceptBy).Method, 1970public static TSource First<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 1978new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource>(First).Method, 2013public static TSource? FirstOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2021new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource?>(FirstOrDefault).Method, 2033public static TSource FirstOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, TSource defaultValue) 2041new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource, TSource>(FirstOrDefault).Method, 2058public static TSource Last<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2066new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource>(Last).Method, 2101public static TSource? LastOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2109new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource?>(LastOrDefault).Method, 2121public static TSource LastOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, TSource defaultValue) 2129new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource, TSource>(LastOrDefault).Method, 2147public static TSource Single<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2155new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource>(Single).Method, 2191public static TSource? SingleOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2199new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource?>(SingleOrDefault).Method, 2212public static TSource SingleOrDefault<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate, TSource defaultValue) 2220new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, TSource, TSource>(SingleOrDefault).Method, 2410public static bool Any<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2418new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, bool>(Any).Method, 2423public static bool All<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2431new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, bool>(All).Method, 2448public static int Count<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2456new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, int>(Count).Method, 2469public static IQueryable<KeyValuePair<TKey, int>> CountBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IEqualityComparer<TKey>? comparer = null) where TKey : notnull 2477new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, int>>>(CountBy).Method, 2494public static long LongCount<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, bool>> predicate) 2502new Func<IQueryable<TSource>, Expression<Func<TSource, bool>>, long>(LongCount).Method, 2539public static TResult? Min<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TResult>> selector) 2547new Func<IQueryable<TSource>, Expression<Func<TSource, TResult>>, TResult?>(Min).Method, 2560public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 2568new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TSource?>(MinBy).Method, 2586public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer) 2594new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TSource>, TSource?>(MinBy).Method, 2610public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 2618new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, TSource?>(MinBy).Method, 2656public static TResult? Max<TSource, TResult>(this IQueryable<TSource> source, Expression<Func<TSource, TResult>> selector) 2664new Func<IQueryable<TSource>, Expression<Func<TSource, TResult>>, TResult?>(Max).Method, 2677public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector) 2685new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TSource?>(MaxBy).Method, 2703public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer) 2711new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TSource>, TSource?>(MaxBy).Method, 2727public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 2735new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, TSource?>(MaxBy).Method, 2862public static int Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int>> selector) 2870new Func<IQueryable<TSource>, Expression<Func<TSource, int>>, int>(Sum).Method, 2875public static int? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int?>> selector) 2883new Func<IQueryable<TSource>, Expression<Func<TSource, int?>>, int?>(Sum).Method, 2888public static long Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long>> selector) 2896new Func<IQueryable<TSource>, Expression<Func<TSource, long>>, long>(Sum).Method, 2901public static long? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long?>> selector) 2909new Func<IQueryable<TSource>, Expression<Func<TSource, long?>>, long?>(Sum).Method, 2914public static float Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float>> selector) 2922new Func<IQueryable<TSource>, Expression<Func<TSource, float>>, float>(Sum).Method, 2927public static float? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float?>> selector) 2935new Func<IQueryable<TSource>, Expression<Func<TSource, float?>>, float?>(Sum).Method, 2940public static double Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double>> selector) 2948new Func<IQueryable<TSource>, Expression<Func<TSource, double>>, double>(Sum).Method, 2953public static double? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double?>> selector) 2961new Func<IQueryable<TSource>, Expression<Func<TSource, double?>>, double?>(Sum).Method, 2966public static decimal Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal>> selector) 2974new Func<IQueryable<TSource>, Expression<Func<TSource, decimal>>, decimal>(Sum).Method, 2979public static decimal? Sum<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector) 2987new Func<IQueryable<TSource>, Expression<Func<TSource, decimal?>>, decimal?>(Sum).Method, 3112public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int>> selector) 3120new Func<IQueryable<TSource>, Expression<Func<TSource, int>>, double>(Average).Method, 3125public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, int?>> selector) 3133new Func<IQueryable<TSource>, Expression<Func<TSource, int?>>, double?>(Average).Method, 3138public static float Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float>> selector) 3146new Func<IQueryable<TSource>, Expression<Func<TSource, float>>, float>(Average).Method, 3151public static float? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, float?>> selector) 3159new Func<IQueryable<TSource>, Expression<Func<TSource, float?>>, float?>(Average).Method, 3164public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long>> selector) 3172new Func<IQueryable<TSource>, Expression<Func<TSource, long>>, double>(Average).Method, 3177public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, long?>> selector) 3185new Func<IQueryable<TSource>, Expression<Func<TSource, long?>>, double?>(Average).Method, 3190public static double Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double>> selector) 3198new Func<IQueryable<TSource>, Expression<Func<TSource, double>>, double>(Average).Method, 3203public static double? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, double?>> selector) 3211new Func<IQueryable<TSource>, Expression<Func<TSource, double?>>, double?>(Average).Method, 3216public static decimal Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal>> selector) 3224new Func<IQueryable<TSource>, Expression<Func<TSource, decimal>>, decimal>(Average).Method, 3229public static decimal? Average<TSource>(this IQueryable<TSource> source, Expression<Func<TSource, decimal?>> selector) 3237new Func<IQueryable<TSource>, Expression<Func<TSource, decimal?>>, decimal?>(Average).Method, 3268public static TResult Aggregate<TSource, TAccumulate, TResult>(this IQueryable<TSource> source, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, Expression<Func<TAccumulate, TResult>> selector) 3277new Func<IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, Expression<Func<TAccumulate, TResult>>, TResult>(Aggregate).Method, 3294/// This method is comparable to the <see cref="GroupBy{TSource, TKey}(IQueryable{TSource}, Expression{Func{TSource, TKey}})"/> methods 3298public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, TAccumulate seed, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 3307new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, TAccumulate, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method, 3324/// This method is comparable to the <see cref="GroupBy{TSource, TKey}(IQueryable{TSource}, Expression{Func{TSource, TKey}})"/> methods 3328public static IQueryable<KeyValuePair<TKey, TAccumulate>> AggregateBy<TSource, TKey, TAccumulate>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, Expression<Func<TKey, TAccumulate>> seedSelector, Expression<Func<TAccumulate, TSource, TAccumulate>> func, IEqualityComparer<TKey>? keyComparer = null) where TKey : notnull 3338new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, Expression<Func<TKey, TAccumulate>>, Expression<Func<TAccumulate, TSource, TAccumulate>>, IEqualityComparer<TKey>, IQueryable<KeyValuePair<TKey, TAccumulate>>>(AggregateBy).Method,
System.Net.Http (3)
System\Net\Http\Headers\HttpRequestHeaders.cs (1)
28private T GetSpecializedCollection<T>(int slot, Func<HttpRequestHeaders, T> creationFunc)
System\Net\Http\Headers\HttpResponseHeaders.cs (1)
23private T GetSpecializedCollection<T>(int slot, Func<HttpResponseHeaders, T> creationFunc)
System\Net\Http\HttpContent.cs (1)
772private static async Task<TResult> WaitAndReturnAsync<TState, TResult>(Task waitTask, TState state, Func<TState, TResult> returnFunc)
System.Net.HttpListener (9)
System\Net\Windows\CookieExtensions.cs (9)
13private static Func<Cookie, string>? s_toServerStringFunc; 17s_toServerStringFunc ??= (Func<Cookie, string>)typeof(Cookie).GetMethod("ToServerString", BindingFlags.Instance | BindingFlags.NonPublic)?.CreateDelegate(typeof(Func<Cookie, string>))!; 22private static Func<Cookie, Cookie>? s_cloneFunc; 26s_cloneFunc ??= (Func<Cookie, Cookie>)typeof(Cookie).GetMethod("Clone", BindingFlags.Instance | BindingFlags.NonPublic)?.CreateDelegate(typeof(Func<Cookie, Cookie>))!; 40private static Func<Cookie, CookieVariant>? s_getVariantFunc; 44s_getVariantFunc ??= (Func<Cookie, CookieVariant>)typeof(Cookie).GetProperty("Variant", BindingFlags.Instance | BindingFlags.NonPublic)?.GetGetMethod(true)?.CreateDelegate(typeof(Func<Cookie, CookieVariant>))!;
System.Net.NameResolution (3)
System\Net\DnsResolver.cs (3)
457private static async Task<DnsResult<T>> ResolveWithTelemetry<T, TState>(string name, TState state, Func<TState, Task<DnsResult<T>>> resolve, Func<DnsResult<T>, string[]> getAnswers) 473private static string[] MapAnswers<T>(DnsResult<T> result, Func<T, string> selector)
System.Net.Quic (3)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
52Func<TExteriorHandle, TInteriorHandle> accessor,
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
51internal THandle GetOrCreate<TContext>(TKey key, Func<TContext, THandle> factory, TContext factoryContext)
System\Net\Quic\Internal\MsQuicBuffers.cs (1)
68public void Initialize<T>(IList<T> inputs, Func<T, ReadOnlyMemory<byte>> toBuffer)
System.Net.Security (3)
src\runtime\src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (1)
52Func<TExteriorHandle, TInteriorHandle> accessor,
src\runtime\src\libraries\Common\src\System\Net\SafeHandleCache.cs (1)
51internal THandle GetOrCreate<TContext>(TKey key, Func<TContext, THandle> factory, TContext factoryContext)
System\Net\Security\TlsSession.cs (1)
2237private TlsOperationStatus DriveBufferedOpOverSocket(Func<Span<byte>, (TlsOperationStatus status, int written)> op)
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
1790private void HandleCompletion<TAsyncCompletedEventArgs, TCompletionDelegate, T>(TaskCompletionSource<T> tcs, TAsyncCompletedEventArgs e, Func<TAsyncCompletedEventArgs, T> getResult, TCompletionDelegate handler, Action<WebClient, TCompletionDelegate> unregisterHandler)
System.Net.WebHeaderCollection (5)
System\Net\HeaderInfo.cs (2)
10internal readonly Func<string, string[]> Parser; 19internal HeaderInfo(string name, bool requestRestricted, bool responseRestricted, bool multi, Func<string, string[]> parser)
System\Net\HeaderInfoTable.cs (3)
12private static readonly Func<string, string[]> s_singleParser = value => new[] { value }; 13private static readonly Func<string, string[]> s_multiParser = value => ParseValueHelper(value, isSetCookie: false); 14private static readonly Func<string, string[]> s_setCookieParser = value => ParseValueHelper(value, isSetCookie: true);
System.Private.CoreLib (184)
Internal\Reflection\Extensions\NonPortable\CustomAttributeSearcher.cs (2)
50Func<Type, bool> passesFilter; 112private IEnumerable<CustomAttributeData> GetMatchingCustomAttributesIterator(E element, Func<Type, bool> passesFilter, bool inherit)
Internal\Runtime\Augments\DynamicDelegateAugments.cs (1)
28public static Delegate CreateObjectArrayDelegate(Type delegateType, Func<object?[], object?> invoker)
Internal\Runtime\CompilerHelpers\ReflectionHelpers.cs (1)
25public static Type ExtensibleGetType(string typeName, string callingAssemblyName, Func<AssemblyName, Assembly?> assemblyResolver, Func<Assembly?, string, bool, Type?>? typeResolver, bool throwOnError, bool ignoreCase)
src\runtime\src\coreclr\tools\Common\Internal\LowLevelLinq\LowLevelEnumerable.cs (2)
20public static IEnumerable<U> Select<T, U>(this IEnumerable<T> values, Func<T, U> func) 29public static IEnumerable<T> Where<T>(this IEnumerable<T> source, Func<T, bool> filter)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
src\runtime\src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
308Func<AssemblyName, Assembly> resolver = alc.LoadFromAssemblyName;
src\runtime\src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
262public void Handle(Func<Exception, bool> predicate)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (2)
1182public TValue GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) 1376public TValue AddOrUpdate(TKey key, Func<TKey, TValue> addValueFactory, Func<TKey, TValue, TValue> updateValueFactory)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (4)
28public static EqualityComparer<T> Create(Func<T?, T?, bool> equals, Func<T, int>? getHashCode = null) 44public static EqualityComparer<T> Create<TKey>(Func<T?, TKey?> keySelector, IEqualityComparer<TKey>? keyComparer = null) 112private readonly Func<T, int> _getHashCode; 114public DelegateEqualityComparer(Func<T?, T?, bool> equals, Func<T, int> getHashCode)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyAnalysis.cs (1)
16internal readonly Func<PropertyValue, PropertyValue> getter;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (31)
124public static Func<object?, PropertyValue> GetFactory(Type type) 179public static Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property) 193private static Func<PropertyValue, PropertyValue> GetBoxedValueTypePropertyGetter(PropertyInfo property) 200Func<object?, PropertyValue> factory = GetFactory(type); 214private static Func<PropertyValue, PropertyValue> GetReferenceTypePropertyGetter(PropertyInfo property) 222public abstract Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property); 228return property.GetMethod!.CreateDelegate(typeof(Func<,>).MakeGenericType(property.DeclaringType!, propertyType)); 234private static Func<TContainer, TProperty> GetGetMethod<TProperty>(PropertyInfo property) where TProperty : struct => 235property.GetMethod!.CreateDelegate<Func<TContainer, TProperty>>(); 237public override Func<PropertyValue, PropertyValue> GetPropertyGetter(PropertyInfo property) 243var getter = (Func<TContainer, object?>)GetGetMethod(property, type); 251if (type == typeof(bool)) { var f = GetGetMethod<bool>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 252if (type == typeof(byte)) { var f = GetGetMethod<byte>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 253if (type == typeof(sbyte)) { var f = GetGetMethod<sbyte>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 254if (type == typeof(char)) { var f = GetGetMethod<char>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 255if (type == typeof(short)) { var f = GetGetMethod<short>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 256if (type == typeof(ushort)) { var f = GetGetMethod<ushort>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 257if (type == typeof(int)) { var f = GetGetMethod<int>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 258if (type == typeof(uint)) { var f = GetGetMethod<uint>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 259if (type == typeof(long)) { var f = GetGetMethod<long>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 260if (type == typeof(ulong)) { var f = GetGetMethod<ulong>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 261if (type == typeof(IntPtr)) { var f = GetGetMethod<IntPtr>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 262if (type == typeof(UIntPtr)) { var f = GetGetMethod<UIntPtr>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 263if (type == typeof(float)) { var f = GetGetMethod<float>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 264if (type == typeof(double)) { var f = GetGetMethod<double>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 265if (type == typeof(Guid)) { var f = GetGetMethod<Guid>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 266if (type == typeof(DateTime)) { var f = GetGetMethod<DateTime>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 267if (type == typeof(DateTimeOffset)) { var f = GetGetMethod<DateTimeOffset>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 268if (type == typeof(TimeSpan)) { var f = GetGetMethod<TimeSpan>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); } 269if (type == typeof(decimal)) { var f = GetGetMethod<decimal>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); }
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingTypeInfo.cs (2)
22private readonly Func<object?, PropertyValue> propertyValueFactory; 88internal Func<object?, PropertyValue> PropertyValueFactory => this.propertyValueFactory;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Gen2GcCallback.cs (3)
17private readonly Func<object, bool>? _callback1; 25private Gen2GcCallback(Func<object, bool> callback, object targetObj) 48public static void Register(Func<object, bool> callback, object targetObj)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
658Func<object?, int> function, object? state,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (4)
231/// the table and returned by all the racing <see cref="GetOrAdd(TKey, Func{TKey, TValue})"/> calls. This rule permits the 234public TValue GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) 299/// Consider using <see cref="GetOrAdd(TKey, Func{TKey, TValue})"/> (or one of its overloads) instead. 343/// Consider using <see cref="GetOrAdd(TKey, Func{TKey, TValue})"/> (or one of its overloads) instead.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionHandling.cs (2)
13private static Func<Exception, bool>? s_handler; 36public static void SetUnhandledExceptionHandler(Func<Exception, bool> handler)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelSpinWaiter.cs (1)
19public bool SpinWaitForCondition(Func<object, bool> condition, object state, int spinCount, int sleep0Threshold)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.cs (12)
193public Task(Func<object?, TResult> function, object? state) 214public Task(Func<object?, TResult> function, object? state, CancellationToken cancellationToken) 239public Task(Func<object?, TResult> function, object? state, TaskCreationOptions creationOptions) 269public Task(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions) 328internal static Task<TResult> StartNew(Task? parent, Func<object?, TResult> function, object? state, CancellationToken cancellationToken, 490if (m_action is Func<object?, TResult> funcWithState) 996public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction) 1025public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken) 1055public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler) 1097public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskContinuationOptions continuationOptions) 1150public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken, 1157internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (6)
4188public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction) 4217public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 4247public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler) 4283public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 4329public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken, 4336private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (4)
64Debug.Assert(function is Func<Task, TResult> || function is Func<Task, object?, TResult>, 86if (m_action is Func<Task, TResult> func) 156Debug.Assert(function is Func<Task<TAntecedentResult>, TResult> || function is Func<Task<TAntecedentResult>, object?, TResult>, 178if (m_action is Func<Task<TAntecedentResult>, TResult> func)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (47)
378public Task<TResult> StartNew(Func<object?, TResult> function, object? state) 407public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken) 438public Task<TResult> StartNew(Func<object?, TResult> function, object? state, TaskCreationOptions creationOptions) 480public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) 493Func<IAsyncResult, TResult>? endFunction, 561public Task<TResult> FromAsync(IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod) 587Func<IAsyncResult, TResult> endMethod, 620Func<IAsyncResult, TResult> endMethod, 631Func<IAsyncResult, TResult>? endFunction, 718Func<IAsyncResult, TResult> endMethod, object? state) 747Func<IAsyncResult, TResult> endMethod, object? state, TaskCreationOptions creationOptions) 755Func<IAsyncResult, TResult>? endFunction, Action<IAsyncResult>? endAction, 829Func<IAsyncResult, TResult> endMethod, 863Func<IAsyncResult, TResult> endMethod, 872Func<IAsyncResult, TResult>? endFunction, Action<IAsyncResult>? endAction, 950Func<IAsyncResult, TResult> endMethod, 988Func<IAsyncResult, TResult> endMethod, 997Func<IAsyncResult, TResult>? endFunction, Action<IAsyncResult>? endAction, 1079Func<IAsyncResult, TResult> endMethod, 1121Func<IAsyncResult, TResult> endMethod, 1130Func<IAsyncResult, TResult>? endFunction, Action<IAsyncResult>? endAction, 1351public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction) 1379public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken) 1413public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions) 1457public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, 1482public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction) 1511public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1547public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1593public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1605Func<Task<TAntecedentResult>[], TResult>? continuationFunction, Action<Task<TAntecedentResult>[]>? continuationAction, 1632static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>[], TResult>)continuationFunction!)(starter.Result), 1652Func<Task[], TResult>? continuationFunction, Action<Task[]>? continuationAction, 1682Debug.Assert(state is Func<Task[], TResult>); 1683return ((Func<Task[], TResult>)state)(completedTasks.Result); 1721public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction) 1749public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 1783public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 1827public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, 1852public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction) 1881public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1917public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1963public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1974Func<Task, TResult>? continuationFunction, Action<Task>? continuationAction, 2002Debug.Assert(state is Func<Task, TResult>); 2003return ((Func<Task, TResult>)state)(completedTask.Result); 2025Func<Task<TAntecedentResult>, TResult>? continuationFunction, Action<Task<TAntecedentResult>>? continuationAction, 2050static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>, TResult>)continuationFunction!)(starter.Result),
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (31)
654public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state) 687public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state, CancellationToken cancellationToken) 721public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state, TaskCreationOptions creationOptions) 766public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, 1154IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod) 1182IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod, TaskCreationOptions creationOptions) 1214IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod, TaskCreationOptions creationOptions, TaskScheduler scheduler) 1241Func<IAsyncResult, TResult> endMethod, object? state) 1273Func<IAsyncResult, TResult> endMethod, object? state, TaskCreationOptions creationOptions) 1304Func<IAsyncResult, TResult> endMethod, TArg1 arg1, object? state) 1339Func<IAsyncResult, TResult> endMethod, TArg1 arg1, object? state, TaskCreationOptions creationOptions) 1373Func<IAsyncResult, TResult> endMethod, TArg1 arg1, TArg2 arg2, object? state) 1413Func<IAsyncResult, TResult> endMethod, TArg1 arg1, TArg2 arg2, object? state, TaskCreationOptions creationOptions) 1452Func<IAsyncResult, TResult> endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object? state) 1496Func<IAsyncResult, TResult> endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, object? state, TaskCreationOptions creationOptions) 1969public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction) 2002public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken) 2040public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions) 2088public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken, 2118public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction) 2151public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 2191public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 2241public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 2549public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction) 2581public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 2619public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 2667public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken, 2696public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction) 2729public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 2769public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 2819public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction,
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
1094private static ReadOnlySpan<char> TZif_ParsePosixString(ReadOnlySpan<char> posixFormat, scoped ref int index, Func<char, bool> breakCondition)
System\Delegate.cs (1)
370internal static unsafe Delegate CreateObjectArrayDelegate(Type t, Func<object?[], object?> handler)
System\Reflection\Runtime\BindingFlagSupport\QueriedMemberList.cs (1)
74public QueriedMemberList<M> Filter(Func<M, bool> predicate)
System\Reflection\Runtime\Dispensers\DispenserFactory.cs (2)
19public static Dispenser<K, V> CreateDispenser<K, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] V>(DispenserScenario scenario, Func<K, V> factory) 37public static Dispenser<K, V> CreateDispenserV<K, V>(DispenserScenario scenario, Func<K, V> factory)
System\Reflection\Runtime\Dispensers\DispenserThatAlwaysCreates.cs (2)
16public DispenserThatAlwaysCreates(Func<K, V> factory) 26private readonly Func<K, V> _factory;
System\Reflection\Runtime\Dispensers\DispenserThatAlwaysReuses.cs (3)
17public DispenserThatAlwaysReuses(Func<K, V> factory) 29public FactoryConcurrentUnifier(Func<K, V> factory) 39private readonly Func<K, V> _factory;
System\Reflection\Runtime\Dispensers\DispenserThatReusesAsLongAsKeyIsAlive.cs (2)
15public DispenserThatReusesAsLongAsKeyIsAlive(Func<K, V> factory) 26private readonly Func<K, V> _factory;
System\Reflection\Runtime\Dispensers\DispenserThatReusesAsLongAsValueIsAlive.cs (3)
17public DispenserThatReusesAsLongAsValueIsAlive(Func<K, V> factory) 29public FactoryConcurrentUnifierW(Func<K, V> factory) 39private readonly Func<K, V> _factory;
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.BindingFlags.cs (1)
171private QueryResult<M> Query<M>(MemberPolicies<M> policies, string optionalName, BindingFlags bindingAttr, Func<M, bool> optionalPredicate) where M : MemberInfo
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.GetMember.cs (2)
33Func<MemberInfo, bool>? predicate = null; 97private M[] QuerySpecificMemberTypeIfRequested<M>(MemberPolicies<M> policies, MemberTypes memberType, string optionalName, BindingFlags bindingAttr, Func<MemberInfo, bool> optionalPredicate, MemberTypes targetMemberType, out QueryResult<M> queryResult) where M : MemberInfo
System\Reflection\TypeNameResolver.NativeAot.cs (2)
17private Func<AssemblyName, Assembly?>? _assemblyResolver; 37Func<AssemblyName, Assembly?>? assemblyResolver,
System\Runtime\InteropServices\PInvokeMarshal.cs (1)
81private static Func<Delegate, PInvokeDelegateThunk> s_AllocateThunk;
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.Private.DataContractSerialization (11)
System\Runtime\Serialization\AccessorBuilder.cs (6)
72var createGetterGeneric = s_createGetterInternal.MakeGenericMethod(declaringType, propertyType).CreateDelegate<Func<PropertyInfo, Getter>>(); 129var createSetterGeneric = s_createSetterInternal.MakeGenericMethod(propInfo.DeclaringType!, propInfo.PropertyType).CreateDelegate<Func<PropertyInfo, Setter>>(); 179var getMethod = propInfo.GetMethod!.CreateDelegate<Func<DeclaringType, PropertyType>>();
System\Runtime\Serialization\ContextAware.cs (1)
58internal TValue GetOrAdd(TKey t, Func<TKey, TValue> f)
System\Runtime\Serialization\ReflectionReader.cs (4)
555Func<object, object?> objectToKeyValuePairGetKey = MakeGenericMethod(s_objectToKeyValuePairGetKey, keyType, valueType).CreateDelegate<Func<object, object?>>(); 556Func<object, object?> objectToKeyValuePairGetValue = MakeGenericMethod(s_objectToKeyValuePairGetValue, keyType, valueType).CreateDelegate<Func<object, object?>>();
System.Private.Reflection.Execution (3)
src\runtime\src\coreclr\tools\Common\Internal\LowLevelLinq\LowLevelEnumerable.cs (2)
20public static IEnumerable<U> Select<T, U>(this IEnumerable<T> values, Func<T, U> func) 29public static IEnumerable<T> Where<T>(this IEnumerable<T> source, Func<T, bool> filter)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
System.Private.TypeLoader (1)
src\runtime\src\coreclr\tools\Common\System\Collections\Generic\ArrayBuilder.cs (1)
133public readonly bool Any(Func<T, bool> func)
System.Private.Windows.Core (15)
System\Collections\Generic\ListConverter.cs (2)
18private readonly Func<TIn, TOut> _converter; 20public ListConverter(IList values, Func<TIn, TOut> converter)
System\Private\Windows\Ole\Composition.cs (1)
193Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
719Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\DataRequest.cs (1)
30public Func<TypeName, Type?>? Resolver { get; init; } = null;
System\Private\Windows\Ole\DataStore.cs (1)
199Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\FormatEnumerator.cs (1)
31public FormatEnumerator(IDataObjectInternal dataObject, Func<string, int> getFormatId)
System\Private\Windows\Ole\IDataObjectInternal.cs (4)
96/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 103/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 112/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, bool, out T)"/> 151Func<TypeName, Type?> resolver,
System\Private\Windows\Ole\TypeBinder.cs (1)
43private readonly Func<TypeName, Type?>? _resolver;
Windows\Win32\System\Com\WinFormsComWrappers.cs (3)
58internal static HRESULT UnwrapAndInvoke<TThis, TInterface>(TThis* @this, Func<TInterface, HRESULT> func) 73internal static TReturnType UnwrapAndInvoke<TThis, TInterface, TReturnType>(TThis* @this, Func<TInterface, TReturnType> func) 94/// <inheritdoc cref="UnwrapAndInvoke{TThis, TInterface}(TThis*, Func{TInterface, HRESULT})"/>
System.Private.Xml (17)
System\Xml\AsyncHelper.cs (6)
53public static Task CallTaskFuncWhenFinishAsync<TArg>(this Task task, Func<TArg, Task> func, TArg arg) 60private static async Task CallTaskFuncWhenFinishCoreAsync<TArg>(Task task, Func<TArg, Task> func, TArg arg) 66public static Task<bool> CallBoolTaskFuncWhenFinishAsync<TArg>(this Task task, Func<TArg, Task<bool>> func, TArg arg) 73private static async Task<bool> CallBoolTaskFuncWhenFinishCoreAsync<TArg>(this Task task, Func<TArg, Task<bool>> func, TArg arg) 79public static Task<bool> ContinueBoolTaskFuncWhenFalseAsync<TArg>(this Task<bool> task, Func<TArg, Task<bool>> func, TArg arg) 91private static async Task<bool> ContinueBoolTaskFuncWhenFalseCoreAsync<TArg>(Task<bool> task, Func<TArg, Task<bool>> func, TArg arg)
System\Xml\Core\XmlWellFormedWriterAsync.cs (2)
151private Task SequenceRun<TArg>(Task task, Func<TArg, Task> nextTaskFun, TArg arg) 163private async Task _SequenceRun<TArg>(Task task, Func<TArg, Task> nextTaskFun, TArg arg)
System\Xml\Serialization\ContextAwareTables.cs (1)
23internal T GetOrCreateValue(Type t, Func<Type, T> f)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
657var getSetMemberValueDelegateWithType = getSetMemberValueDelegateWithTypeMi.CreateDelegate<Func<MemberInfo, ReflectionXmlSerializationReaderHelper.SetMemberValueDelegate>>(); 972Func<object, string> readFunc = (state) => ((XmlReader)state).ReadElementContentAsString(); 1273private object WritePrimitive(TypeMapping mapping, Func<object, string> readFunc, object funcState) 1359private object WriteEnumMethod(EnumMapping mapping, Func<object, string> readFunc, object funcState) 1940Func<object, string> functor = (state) =>
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
281private bool TryWritePrimitiveItems<T>(object o, ElementAccessor element, PrimitiveMapping mapping, Func<T, string> formatter) 334Func<T, string> formatter)
System.Reflection.Context (10)
System\Reflection\Context\CustomReflectionContext.cs (3)
137/// Override this method to specify which properties should be added to a given type. To create the properties, use the <see cref="CreateProperty(Type, string, Func{object, object?}?, Action{object, object?}?)"/> method. 159Func<object, object?>? getter, 190Func<object, object?>? getter,
System\Reflection\Context\Projection\Projector.cs (4)
13public IList<T>? Project<T>(IList<T>? values, Func<T, T> project) 24public T[]? Project<T>(T[]? values, Func<T, T> project) 32public T Project<T>(T value, Func<T, T> project) 123private T[] ProjectAll<T>(IList<T> values, Func<T, T> project)
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (1)
20Func<object, object?>? getter,
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertyGetter.cs (2)
15private readonly Func<object, object?> _getter; 18public PropertyGetter(VirtualPropertyBase property, Func<object, object?> getter, IEnumerable<Attribute>? getterAttributes)
System.Reflection.Metadata (12)
System\Reflection\Internal\Utilities\EnumerableExtensions.cs (1)
15public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
System\Reflection\Metadata\BlobContentId.cs (1)
117public static Func<IEnumerable<Blob>, BlobContentId> GetTimeBasedProvider()
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
24public Func<IEnumerable<Blob>, BlobContentId> IdProvider { get; } 52Func<IEnumerable<Blob>, BlobContentId>? idProvider = null)
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (2)
48Func<IEnumerable<Blob>, BlobContentId>? deterministicIdProvider = null) 228public void Sign(BlobBuilder peImage, Func<IEnumerable<Blob>, byte[]> signatureProvider)
System\Reflection\PortableExecutable\PEBuilder.cs (3)
16public Func<IEnumerable<Blob>, BlobContentId> IdProvider { get; } 62protected PEBuilder(PEHeaderBuilder header, Func<IEnumerable<Blob>, BlobContentId>? deterministicIdProvider) 471internal void Sign(BlobBuilder peImage, Blob strongNameSignatureFixup, Func<IEnumerable<Blob>, byte[]> signatureProvider)
System\Reflection\PortableExecutable\PEReader.cs (3)
710public bool TryOpenAssociatedPortablePdb(string peImagePath, Func<string, Stream?> pdbFileStreamProvider, out MetadataReaderProvider? pdbReaderProvider, out string? pdbPath) 768private bool TryOpenCodeViewPortablePdb(DebugDirectoryEntry codeViewEntry, string peImageDirectory, Func<string, Stream?> pdbFileStreamProvider, out MetadataReaderProvider? provider, out string? pdbPath, ref Exception? errorToReport) 803private static bool TryOpenPortablePdbFile(string path, BlobContentId id, Func<string, Stream?> pdbFileStreamProvider, out MetadataReaderProvider? provider, ref Exception? errorToReport)
System.Reflection.MetadataLoadContext (9)
System\Reflection\Runtime\BindingFlagSupport\QueriedMemberList.cs (1)
83public QueriedMemberList<M> Filter(Func<M, bool> predicate)
System\Reflection\TypeLoading\General\Helpers.cs (1)
295Func<AssemblyName, Assembly> assemblyResolver =
System\Reflection\TypeLoading\Modules\RoModule.Unifier.cs (4)
20private static readonly Func<RoType, RoArrayType> s_szArrayTypeFactory = (e) => new RoArrayType(e, multiDim: false, rank: 1); 34private static readonly Func<RoArrayType.Key, RoArrayType> s_mdArrayTypeFactory = (k) => new RoArrayType(k.ElementType, multiDim: true, rank: k.Rank); 47private static readonly Func<RoType, RoByRefType> s_byrefTypeFactory = (e) => new RoByRefType(e); 68private static readonly Func<RoConstructedGenericType.Key, RoConstructedGenericType> s_constructedGenericTypeFactory =
System\Reflection\TypeLoading\RuntimeTypeInfo.BindingFlags.cs (1)
177private QueryResult<M> Query<M>(string? optionalName, BindingFlags bindingAttr, Func<M, bool>? optionalPredicate) where M : MemberInfo
System\Reflection\TypeLoading\RuntimeTypeInfo.GetMember.cs (2)
31Func<MemberInfo, bool>? predicate = null; 88private M[]? QuerySpecificMemberTypeIfRequested<M>(MemberTypes memberType, string? optionalName, BindingFlags bindingAttr, Func<MemberInfo, bool>? optionalPredicate, MemberTypes targetMemberType, out QueryResult<M> queryResult) where M : MemberInfo
System.Resources.Writer (1)
System\Resources\ResourceWriter.core.cs (1)
20public Func<Type, string>? TypeNameConverter { get; set; }
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
203[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Func<,>))]
System.Runtime.InteropServices.JavaScript (5)
System\Runtime\InteropServices\JavaScript\JSMarshalerType.cs (2)
380/// <param name="arg1">Metadata about the type of the first argument of the <see cref="System.Func{TRes,T1}"/>.</param> 381/// <param name="result">Metadata about the type of the result of the <see cref="System.Func{TRes,T1}"/>.</param>
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Func.cs (3)
443public void ToManaged<T, TResult>(out Func<T, TResult>? value, ArgumentToJSCallback<T> arg1Marshaler, ArgumentToManagedCallback<TResult> resMarshaler) 634public unsafe void ToJS<T, TResult>(Func<T, TResult> value, ArgumentToManagedCallback<T> arg1Marshaler, ArgumentToJSCallback<TResult> resMarshaler) 636Func<T, TResult> cpy = value;
System.Security.Claims (2)
System\Security\Claims\ClaimsPrincipal.cs (2)
30private static Func<IEnumerable<ClaimsIdentity>, ClaimsIdentity?> s_identitySelector = SelectPrimaryIdentity; 75public static Func<IEnumerable<ClaimsIdentity>, ClaimsIdentity?> PrimaryIdentitySelector
System.Security.Cryptography (12)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptExportKey.cs (1)
48internal static T BCryptExportKey<T>(SafeBCryptKeyHandle key, string blobType, Func<byte[], T> callback)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\ECCng.ImportExport.NamedCurve.cs (1)
18internal static T EncodeEccKeyBlob<T>(KeyBlobMagicNumber magic, byte[] x, byte[] y, byte[]? d, Func<byte[], T> encodeCallback, bool clearBlob = true)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\CertificateHelpers.Windows.cs (2)
77internal static T? GetPrivateKey<T>(TCertificate certificate, Func<CspParameters, T> createCsp, Func<CngKey, T?> createCng)
System\Security\Cryptography\X509Certificates\CertificatePal.Windows.PrivateKey.cs (2)
285private T? GetPrivateKey<T>(Func<CspParameters, T> createCsp, Func<CngKey, T?> createCng)
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (5)
1893Func<ReadOnlySpan<char>, TAlg> factory, 1894Func<TAlg, X509Certificate2> import) where TAlg : IDisposable 1914Func<ReadOnlySpan<char>, TAlg> factory, 1915Func<TAlg, X509Certificate2> import) where TAlg : IDisposable 1934Func<TAlg, X509Certificate2> import) where TAlg : IDisposable
System\Security\Cryptography\X509Certificates\X509Pal.Windows.PublicKey.cs (1)
75Func<CngKey, TAlgorithm> factory,
System.Security.Cryptography.Pkcs (1)
System\Security\Cryptography\Pkcs\CmsSignature.cs (1)
152Func<X509Certificate2, T?> getCertPublicKey,
System.Security.Cryptography.Xml (3)
System\Security\Cryptography\Xml\SignedXml.cs (2)
33private Func<SignedXml, bool> _signatureFormatValidator = DefaultSignatureFormatValidator; 155public Func<SignedXml, bool> SignatureFormatValidator
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (1)
314internal static void LogBeginCheckSignatureFormat(SignedXml signedXml, Func<SignedXml, bool> formatValidator)
System.ServiceModel.Federation (2)
System\Runtime\OperationWithTimeoutAsyncResult.cs (2)
63private Func<IAsyncResult, bool> _checkSyncValidationFunc; 263protected void SetCheckSyncValidationFunc(Func<IAsyncResult, bool> checkSyncValidationFunc)
System.ServiceModel.Http (2)
System\ServiceModel\Channels\HttpChannelFactory.cs (2)
40private Func<HttpClientHandler, HttpMessageHandler> _httpMessageHandlerFactory; 129_httpMessageHandlerFactory = context.BindingParameters.Find<Func<HttpClientHandler, HttpMessageHandler>>();
System.ServiceModel.Primitives (18)
Internals\System\Runtime\ActionItem.cs (7)
34public static void Schedule(Func<object, Task> callback, object state) 80private static void ScheduleCallback(Func<object, Task> callback, object state) 94private void ScheduleCallback(Func<object, Task> callback) 102private static Func<object, Task> s_invokeAsyncCallback; 122public static Func<object, Task> InvokeAsyncCallbackFunc 149private Func<object, Task> _asyncCallback; 171public DefaultActionItem(Func<object, Task> callback, object state)
Internals\System\Runtime\AsyncResult.cs (2)
21private Func<IAsyncResult, bool> _checkSyncValidationFunc; 225protected void SetCheckSyncValidationFunc(Func<IAsyncResult, bool> checkSyncValidationFunc)
Internals\System\Runtime\IOThreadTimer.cs (3)
36private Func<object, Task> asyncCallback; 44public IOThreadTimer(Func<object, Task> asyncCallback, object callbackState, bool isTypicallyCanceledShortlyAfterBeingSet) 55public IOThreadTimer(Action<object> callback, Func<object, Task> asyncCallback, object callbackState, bool isTypicallyCanceledShortlyAfterBeingSet, int maxSkewInMilliseconds)
System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
46Func<KeyInfoSerializer, IEnumerable<SerializerEntries>> additionalEntries)
System\ServiceModel\Channels\ClientReliableDuplexSessionChannel.cs (2)
26protected static Func<object, Task> s_startReceivingAsyncStatic = new Func<object, Task>(StartReceivingAsyncStatic); 1078private static Func<object, Task> s_onReconnectTimerElapsed = new Func<object, Task>(OnReconnectTimerElapsed);
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (1)
115private static Func<object, Task> s_onTimerElapsedAsync = new Func<object, Task>(OnTimerElapsedAsync);
System\ServiceModel\Channels\ReliableOutputConnection.cs (1)
19private static Func<object, Task> s_sendRetries = new Func<object, Task>(SendRetries);
System\ServiceModel\Security\WSKeyInfoSerializer.cs (1)
16private static Func<KeyInfoSerializer, IEnumerable<SerializerEntries>> CreateAdditionalEntries(SecurityVersion securityVersion, SecureConversationVersion secureConversationVersion)
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
742private static unsafe T[] GetServices<T>(string machineName, int serviceType, string? group, Func<Interop.Advapi32.ENUM_SERVICE_STATUS_PROCESS, T> selector)
System.Text.Json (123)
src\runtime\src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
69internal static void StableSortByKey<T, TKey>(this List<T> items, Func<T, TKey> keySelector) 105public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null)
System\Text\Json\Nodes\JsonArray.IList.cs (1)
125public int RemoveAll(Func<JsonNode?, bool> match)
System\Text\Json\Serialization\Converters\Collection\ImmutableDictionaryOfTKeyTValueConverter.cs (2)
43Func<IEnumerable<KeyValuePair<TKey, TValue>>, TDictionary>? creator = 44(Func<IEnumerable<KeyValuePair<TKey, TValue>>, TDictionary>?)state.Current.JsonTypeInfo.CreateObjectWithArgs;
System\Text\Json\Serialization\Converters\Collection\ImmutableEnumerableOfTConverter.cs (2)
32Func<IEnumerable<TElement>, TCollection>? creator = (Func<IEnumerable<TElement>, TCollection>?)typeInfo.CreateObjectWithArgs;
System\Text\Json\Serialization\Converters\FSharp\FSharpListConverter.cs (1)
14private readonly Func<IEnumerable<TElement>, TList> _listConstructor;
System\Text\Json\Serialization\Converters\FSharp\FSharpMapConverter.cs (1)
16private readonly Func<IEnumerable<Tuple<TKey, TValue>>, TMap> _mapConstructor;
System\Text\Json\Serialization\Converters\FSharp\FSharpOptionConverter.cs (2)
20private readonly Func<TOption, TElement> _optionValueGetter; 21private readonly Func<TElement?, TOption> _optionConstructor;
System\Text\Json\Serialization\Converters\FSharp\FSharpSetConverter.cs (1)
14private readonly Func<IEnumerable<TElement>, TSet> _setConstructor;
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (1)
85Func<object, int> tagReader = proxy.CreateUnionTagReader(typeToConvert);
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (6)
25private readonly Func<object, int> _tagReader; 34Func<object, int> tagReader, 521Func<object, object[]> fieldReader, 522Func<object[], object> constructor, 546public Func<object, object[]> FieldReader { get; } 547public Func<object[], object> Constructor { get; }
System\Text\Json\Serialization\Converters\FSharp\FSharpValueOptionConverter.cs (1)
21private readonly Func<TElement?, TValueOption> _optionConstructor;
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.Large.cs (2)
44Func<object[], T> createObject = (Func<object[], T>)frame.JsonTypeInfo.CreateObjectWithArgs;
System\Text\Json\Serialization\Converters\Union\JsonUnionConverter.cs (1)
169Func<TUnion, (Type?, object?)>? deconstructor = typeInfo.UnionDeconstructor;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (4)
221Func<TUnion, object?> valueAccessor = MemberAccessor.CreatePropertyGetter<TUnion, object?>(valueProperty); 432Func<object?, TUnion> constructor = MemberAccessor.CreateSingleParameterConstructor<TUnion>(constructorInfo); 438public UnionCaseEntry(Type caseType, Func<object?, TUnion> constructor, bool isNullable) 447public Func<object?, TUnion> Constructor { get; }
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (22)
215Func<object, object[]> fieldReader = ConvertFSharpFunc<object, object[]>( 219Func<object[], object> constructor = ConvertFSharpFunc<object[], object>( 234public Func<object, int> CreateUnionTagReader(Type unionType) 245public Func<TFSharpOption, T> CreateFSharpOptionValueGetter<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TFSharpOption, T>() 249return CreateDelegate<Func<TFSharpOption, T>>(valueGetter); 254public Func<TElement?, TFSharpOption> CreateFSharpOptionSomeConstructor<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TFSharpOption, TElement>() 258return CreateDelegate<Func<TElement?, TFSharpOption>>(methodInfo); 273public Func<TElement?, TFSharpOption> CreateFSharpValueOptionSomeConstructor<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] TFSharpOption, TElement>() 277return CreateDelegate<Func<TElement?, TFSharpOption>>(methodInfo); 282public Func<IEnumerable<TElement>, TFSharpList> CreateFSharpListConstructor<TFSharpList, TElement>() 285return CreateDelegate<Func<IEnumerable<TElement>, TFSharpList>>(EnsureMemberExists(_fsharpListCtor, "Microsoft.FSharp.Collections.ListModule.OfSeq<T>(IEnumerable<T> source)").MakeGenericMethod(typeof(TElement))); 290public Func<IEnumerable<TElement>, TFSharpSet> CreateFSharpSetConstructor<TFSharpSet, TElement>() 293return CreateDelegate<Func<IEnumerable<TElement>, TFSharpSet>>(EnsureMemberExists(_fsharpSetCtor, "Microsoft.FSharp.Collections.SetModule.OfSeq<T>(IEnumerable<T> source)").MakeGenericMethod(typeof(TElement))); 298public Func<IEnumerable<Tuple<TKey, TValue>>, TFSharpMap> CreateFSharpMapConstructor<TFSharpMap, TKey, TValue>() 301return CreateDelegate<Func<IEnumerable<Tuple<TKey, TValue>>, TFSharpMap>>(EnsureMemberExists(_fsharpMapCtor, "Microsoft.FSharp.Collections.MapModule.OfSeq<TKey, TValue>(IEnumerable<Tuple<TKey, TValue>> source)").MakeGenericMethod(typeof(TKey), typeof(TValue))); 334private static Func<TArg, TResult> ConvertFSharpFunc<TArg, TResult>(object fsharpFunc) 339return (Func<TArg, TResult>)Delegate.CreateDelegate(typeof(Func<TArg, TResult>), fsharpFunc, invokeMethod); 380Func<object, object[]> fieldReader, 381Func<object[], object> constructor) 395public Func<object, object[]> FieldReader { get; } 396public Func<object[], object> Constructor { get; }
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Collections.cs (2)
83Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> createRangeFunc) 149Func<IEnumerable<TElement>, TCollection> createRangeFunc)
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
164internal static void PopulateProperties(JsonTypeInfo typeInfo, JsonTypeInfo.JsonPropertyInfoList propertyList, Func<JsonSerializerContext, JsonPropertyInfo[]> propInitFunc)
System\Text\Json\Serialization\Metadata\JsonObjectInfoValuesOfT.cs (2)
27public Func<object[], T>? ObjectWithParameterizedConstructorCreator { get; init; } 33public Func<JsonSerializerContext, JsonPropertyInfo[]>? PropertyMetadataInitializer { get; init; }
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (2)
67public Func<object, object?>? Get 97private protected Func<object, object?>? _untypedGet;
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (8)
16private Func<object, T>? _typedGet; 24internal new Func<object, T>? Get 38Debug.Assert(getter is null or Func<object, object?> or Func<object, T>); 46else if (getter is Func<object, T> typedGetter) 49_untypedGet = getter is Func<object, object?> untypedGet ? untypedGet : obj => typedGetter(obj); 53Func<object, object?> untypedGet = (Func<object, object?>)getter;
System\Text\Json\Serialization\Metadata\JsonPropertyInfoValuesOfT.cs (1)
49public Func<object, T?>? Getter { get; init; }
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (6)
270internal Func<JsonSerializerContext, JsonPropertyInfo[]>? SourceGenDelayedPropertyInitializer 281private Func<JsonSerializerContext, JsonPropertyInfo[]>? _sourceGenDelayedPropertyInitializer; 479public Func<object, (Type? CaseType, object? CaseValue)>? UnionDeconstructor 491Debug.Assert(deconstructor is null or Func<object, (Type?, object?)>); 492_unionDeconstructor = (Func<object, (Type?, object?)>?)deconstructor; 495private protected Func<object, (Type?, object?)>? _unionDeconstructor;
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (9)
134public new Func<T, (Type? CaseType, object? CaseValue)>? UnionDeconstructor 146Debug.Assert(deconstructor is null or Func<object, (Type?, object?)> or Func<T, (Type?, object?)>); 153else if (deconstructor is Func<T, (Type?, object?)> typedDelegate) 156_unionDeconstructor = deconstructor is Func<object, (Type?, object?)> untypedDelegate 162Debug.Assert(deconstructor is Func<object, (Type?, object?)>); 163var untypedDelegate = (Func<object, (Type?, object?)>)deconstructor; 169private Func<T, (Type?, object?)>? _typedUnionDeconstructor;
System\Text\Json\Serialization\Metadata\JsonUnionInfoValuesOfT.cs (1)
38public Func<T, (Type? CaseType, object? CaseValue)>? UnionDeconstructor { get; init; }
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (7)
52public abstract Func<object?[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor); 56public abstract Func<object?, T> CreateSingleParameterConstructor<T>(ConstructorInfo constructor); 60public abstract Func<IEnumerable<TElement>, TCollection> CreateImmutableEnumerableCreateRangeDelegate<TCollection, TElement>(); 62public abstract Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>(); 64public abstract Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo); 66public abstract Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo); 70public abstract Func<object, TProperty> CreateFieldGetter<TProperty>(FieldInfo fieldInfo);
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (2)
29public TValue GetOrAdd<TValue>(TKey key, Func<TKey, TValue> valueFactory) where TValue : class? 34static (TKey key, Func<TKey, TValue> valueFactory) => new(valueFactory(key)),
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.cs (7)
36public override Func<object, TProperty> CreateFieldGetter<TProperty>(FieldInfo fieldInfo) => 46public override Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>() => 51public override Func<IEnumerable<TElement>, TCollection> CreateImmutableEnumerableCreateRangeDelegate<TCollection, TElement>() => 56public override Func<object?[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor) => 66public override Func<object?, T> CreateSingleParameterConstructor<T>(ConstructorInfo constructor) => 71public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 76public override Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo) =>
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (14)
71public override Func<object?[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor) => 72CreateDelegate<Func<object?[], T>>(CreateParameterizedConstructor(constructor)); 181public override Func<object?, T> CreateSingleParameterConstructor<T>(ConstructorInfo constructor) => 182CreateDelegate<Func<object?, T>>(CreateSingleParameterConstructor(constructor)); 361public override Func<IEnumerable<TElement>, TCollection> CreateImmutableEnumerableCreateRangeDelegate<TCollection, TElement>() => 362CreateDelegate<Func<IEnumerable<TElement>, TCollection>>( 385public override Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>() => 386CreateDelegate<Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection>>( 409public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) => 410CreateDelegate<Func<object, TProperty>>(CreatePropertyGetter(propertyInfo, typeof(TProperty))); 412public override Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo) => 413CreateDelegate<Func<TDeclaringType, TProperty>>(CreatePropertyGetter(propertyInfo, typeof(TDeclaringType), typeof(TProperty))); 547public override Func<object, TProperty> CreateFieldGetter<TProperty>(FieldInfo fieldInfo) => 548CreateDelegate<Func<object, TProperty>>(CreateFieldGetter(fieldInfo, typeof(TProperty)));
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (12)
45public override Func<object?[], T> CreateParameterizedConstructor<T>(ConstructorInfo constructor) 135public override Func<object?, T> CreateSingleParameterConstructor<T>(ConstructorInfo constructor) 166public override Func<IEnumerable<TElement>, TCollection> CreateImmutableEnumerableCreateRangeDelegate<TCollection, TElement>() 169return (Func<IEnumerable<TElement>, TCollection>)createRange.CreateDelegate( 170typeof(Func<IEnumerable<TElement>, TCollection>)); 173public override Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection> CreateImmutableDictionaryCreateRangeDelegate<TCollection, TKey, TValue>() 176return (Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection>)createRange.CreateDelegate( 177typeof(Func<IEnumerable<KeyValuePair<TKey, TValue>>, TCollection>)); 180public override Func<object, TProperty> CreatePropertyGetter<TProperty>(PropertyInfo propertyInfo) 193public override Func<TDeclaringType, TProperty> CreatePropertyGetter<TDeclaringType, TProperty>(PropertyInfo propertyInfo) 205return getMethodInfo.CreateDelegate<Func<TDeclaringType, TProperty>>(); 220public override Func<object, TProperty> CreateFieldGetter<TProperty>(FieldInfo fieldInfo) =>
System.Text.Json.SourceGeneration (6)
Helpers\RoslynExtensions.cs (4)
19private static readonly Func<ITypeSymbol, bool>? s_isClosedTypeAccessor = CreateIsClosedTypeAccessor(); 851private static Func<ITypeSymbol, bool>? CreateIsClosedTypeAccessor() 857: (Func<ITypeSymbol, bool>)getter.CreateDelegate(typeof(Func<ITypeSymbol, bool>));
src\runtime\src\libraries\System.Text.Json\Common\JsonHelpers.cs (2)
69internal static void StableSortByKey<T, TKey>(this List<T> items, Func<T, TKey> keySelector) 105public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null)
System.Text.RegularExpressions (1)
System\Threading\StackHelper.cs (1)
131public static TResult CallOnEmptyStack<TArg1, TResult>(Func<TArg1, TResult> func, TArg1 arg1) =>
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Threading\StackHelper.cs (1)
131public static TResult CallOnEmptyStack<TArg1, TResult>(Func<TArg1, TResult> func, TArg1 arg1) =>
System.Threading.Channels (1)
System\Threading\Channels\ChannelUtilities.cs (1)
328internal static void AssertAll<TAsyncOp>(TAsyncOp? head, Func<TAsyncOp, bool> condition, string message)
System.Threading.RateLimiting (16)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (3)
15private readonly Func<TResource, RateLimitPartition<TKey>> _partitioner; 35public DefaultPartitionedRateLimiter(Func<TResource, RateLimitPartition<TKey>> partitioner, 42private DefaultPartitionedRateLimiter(Func<TResource, RateLimitPartition<TKey>> partitioner,
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
30private readonly Func<long?, TimeSpan?> _getElapsedTime = RateLimiterHelper.GetElapsedTime;
System\Threading\RateLimiting\PartitionedRateLimiter.cs (1)
27Func<TResource, RateLimitPartition<TPartitionKey>> partitioner,
System\Threading\RateLimiting\PartitionedRateLimiter.T.cs (1)
135public PartitionedRateLimiter<TOuter> WithTranslatedKey<TOuter>(Func<TOuter, TResource> keyAdapter, bool leaveOpen)
System\Threading\RateLimiting\RateLimitPartition.cs (5)
23Func<TKey, RateLimiter> factory) 37Func<TKey, ConcurrencyLimiterOptions> factory) 66Func<TKey, TokenBucketRateLimiterOptions> factory) 100Func<TKey, SlidingWindowRateLimiterOptions> factory) 134Func<TKey, FixedWindowRateLimiterOptions> factory)
System\Threading\RateLimiting\RateLimitPartition.T.cs (2)
17public RateLimitPartition(TKey partitionKey, Func<TKey, RateLimiter> factory) 31public Func<TKey, RateLimiter> Factory { get; }
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
32private readonly Func<long?, TimeSpan?> _getElapsedTime = RateLimiterHelper.GetElapsedTime;
System\Threading\RateLimiting\TranslatingLimiter.cs (2)
11private readonly Func<TResource, TInner> _keyAdapter; 16public TranslatingLimiter(PartitionedRateLimiter<TInner> inner, Func<TResource, TInner> keyAdapter, bool leaveOpen)
System.Threading.Tasks.Dataflow (40)
Base\DataflowBlock.cs (2)
2069internal static readonly Func<object?, int> s_processBranchFunction = state => 2380Target = new ActionBlock<TOutput>((Func<TOutput, Task>)ProcessItemAsync, DataflowBlock._nonGreedyExecutionOptions);
Blocks\ActionBlock.cs (7)
48/// <summary>Initializes the <see cref="ActionBlock{T}"/> with the specified <see cref="System.Func{T,Task}"/>.</summary> 51public ActionBlock(Func<TInput, Task> action) : 55/// <summary>Initializes the <see cref="ActionBlock{T}"/> with the specified <see cref="System.Func{T,Task}"/> and <see cref="ExecutionDataflowBlockOptions"/>.</summary> 60public ActionBlock(Func<TInput, Task> action, ExecutionDataflowBlockOptions dataflowBlockOptions) : 105var asyncAction = action as Func<TInput, Task>; 151private void ProcessMessageWithTask(Func<TInput, Task> action, KeyValuePair<TInput, long> messageWithId)
Blocks\BroadcastBlock.cs (4)
54public BroadcastBlock(Func<T, T>? cloningFunction) : 65public BroadcastBlock(Func<T, T>? cloningFunction, DataflowBlockOptions dataflowBlockOptions) 515private readonly Func<TOutput, TOutput>? _cloningFunction; 543Func<TOutput, TOutput>? cloningFunction,
Blocks\TransformBlock.cs (14)
20/// <summary>Provides a dataflow block that invokes a provided <see cref="System.Func{TInput,TOutput}"/> delegate for every data element received.</summary> 44/// <summary>Initializes the <see cref="TransformBlock{TInput,TOutput}"/> with the specified <see cref="System.Func{TInput,TOutput}"/>.</summary> 47public TransformBlock(Func<TInput, TOutput> transform) : 52/// Initializes the <see cref="TransformBlock{TInput,TOutput}"/> with the specified <see cref="System.Func{TInput,TOutput}"/> and 59public TransformBlock(Func<TInput, TOutput> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) : 63/// <summary>Initializes the <see cref="TransformBlock{TInput,TOutput}"/> with the specified <see cref="System.Func{TInput,TOutput}"/>.</summary> 66public TransformBlock(Func<TInput, Task<TOutput>> transform) : 71/// Initializes the <see cref="TransformBlock{TInput,TOutput}"/> with the specified <see cref="System.Func{TInput,TOutput}"/> 78public TransformBlock(Func<TInput, Task<TOutput>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) : 83/// Initializes the <see cref="TransformBlock{TInput,TOutput}"/> with the specified <see cref="System.Func{TInput,TOutput}"/> 91private TransformBlock(Func<TInput, TOutput>? transformSync, Func<TInput, Task<TOutput>>? transformAsync, ExecutionDataflowBlockOptions dataflowBlockOptions) 171private void ProcessMessage(Func<TInput, TOutput> transform, KeyValuePair<TInput, long> messageWithId) 223private void ProcessMessageWithTask(Func<TInput, Task<TOutput>> transform, KeyValuePair<TInput, long> messageWithId)
Blocks\TransformManyBlock.cs (7)
22/// <summary>Provides a dataflow block that invokes a provided <see cref="System.Func{T,TResult}"/> delegate for every data element received.</summary> 55public TransformManyBlock(Func<TInput, IEnumerable<TOutput>> transform) : 68public TransformManyBlock(Func<TInput, IEnumerable<TOutput>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) 80public TransformManyBlock(Func<TInput, Task<IEnumerable<TOutput>>> transform) : 92public TransformManyBlock(Func<TInput, Task<IEnumerable<TOutput>>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) 170private void ProcessMessage(Func<TInput, IEnumerable<TOutput>> transformFunction, KeyValuePair<TInput, long> messageWithId) 195private void ProcessMessageWithTask(Func<TInput, Task<IEnumerable<TOutput>>> function, KeyValuePair<TInput, long> messageWithId)
Blocks\TransformManyBlock.netstandard21.cs (3)
18public TransformManyBlock(Func<TInput, IAsyncEnumerable<TOutput>> transform) : 30public TransformManyBlock(Func<TInput, IAsyncEnumerable<TOutput>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) 54private async Task ProcessMessageAsync(Func<TInput, IAsyncEnumerable<TOutput>> transformFunction, KeyValuePair<TInput, long> messageWithId)
Blocks\WriteOnceBlock.cs (3)
30private readonly Func<T, T>? _cloningFunction; 52public WriteOnceBlock(Func<T, T>? cloningFunction) : 63public WriteOnceBlock(Func<T, T>? cloningFunction, DataflowBlockOptions dataflowBlockOptions)
System.Threading.Tasks.Parallel (8)
System\Threading\Tasks\Parallel.ForEachAsync.cs (8)
96Func<object, Task> taskBody = static async o => 260Func<object, Task> taskBody = static async o => 415Func<object, Task> taskBody = static async o => 519private readonly Func<object, Task> _taskBody; 540protected ForEachAsyncState(Func<object, Task> taskBody, bool needsLock, int dop, TaskScheduler scheduler, CancellationToken cancellationToken, Func<TSource, CancellationToken, ValueTask> body) 691IEnumerable<TSource> source, Func<object, Task> taskBody, 713IAsyncEnumerable<TSource> source, Func<object, Task> taskBody, 736T fromExclusive, T toExclusive, Func<object, Task> taskBody,
System.Windows.Controls.Ribbon (5)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (2)
2053Func<T, int> getFocusedItemIndex, 2145Func<T, int> getFocusedItemIndex) where T : Control
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
541internal static bool NavigateToFirstItem(ItemsControl itemsControl, Action<int> bringIntoViewCallback, Func<FrameworkElement, bool> additionalCheck) 552internal static bool NavigateToLastItem(ItemsControl itemsControl, Action<int> bringIntoViewCallback, Func<FrameworkElement, bool> additionalCheck) 563internal static FrameworkElement FindContainer(ItemsControl itemsControl, int startIndex, int direction, Action<int> bringIntoViewCallback, Func<FrameworkElement, bool> additionalCheck)
System.Windows.Forms (37)
misc\MultitargetUtil.cs (1)
15public static string? GetAssemblyQualifiedName(Type type, Func<Type, string>? typeNameConverter)
System\Resources\ResXDataNode.cs (4)
47private Func<Type?, string>? _typeNameConverter; 76public ResXDataNode(string name, object? value, Func<Type?, string>? typeNameConverter) 105public ResXDataNode(string name, ResXFileRef fileRef, Func<Type?, string>? typeNameConverter) 291Func<Type?, string>? typeNameConverter)
System\Resources\ResXResourceWriter.cs (4)
95private readonly Func<Type?, string>? _typeNameConverter; // no public property to be consistent with ResXDataNode class. 108public ResXResourceWriter(string fileName, Func<Type?, string> typeNameConverter) 119public ResXResourceWriter(Stream stream, Func<Type?, string> typeNameConverter) 131public ResXResourceWriter(TextWriter textWriter, Func<Type?, string> typeNameConverter)
System\Resources\ResXSerializationBinder.cs (3)
22private readonly Func<Type?, string>? _typeNameConverter; 32/// constructors on <see cref="ResXDataNode"/> such as <see cref="ResXDataNode(string, object?, Func{Type?, string}?)"/> 34internal ResXSerializationBinder(Func<Type?, string>? typeNameConverter) => _typeNameConverter = typeNameConverter;
System\Windows\Forms\Control_InvokeAsync.cs (7)
29/// <see cref="InvokeAsync(Func{CancellationToken, ValueTask}, CancellationToken)"/> or 30/// <see cref="InvokeAsync{T}(Func{CancellationToken, ValueTask{T}}, CancellationToken)"/>. 148/// <see cref="InvokeAsync(Func{CancellationToken, ValueTask}, CancellationToken)"/> or 149/// <see cref="InvokeAsync{T}(Func{CancellationToken, ValueTask{T}}, CancellationToken)"/>. 155/// <see cref="Func{CancellationToken, ValueTask}"/> (or <see cref="ValueTask{T}"/>). 275Func<CancellationToken, ValueTask> callback, 380Func<CancellationToken, ValueTask<T>> callback,
System\Windows\Forms\ControlMutationExtensions.cs (1)
63Func<Control, bool> suspendLayoutContainerFilter)
System\Windows\Forms\OLE\Clipboard.cs (4)
164/// A <see cref="Func{Type, TypeName}"/> that is used only when deserializing non-OLE formats. It returns the type if 307Func<TypeName, Type?> resolver, 325/// You must use the <see cref="TryGetData{T}(string, Func{TypeName, Type?}, out T)"/> with an explicit resolver. 339/// <inheritdoc cref="TryGetData{T}(string, Func{TypeName, Type}, out T)"/>
System\Windows\Forms\OLE\DataObject.cs (5)
150/// <inheritdoc cref="Clipboard.TryGetData{T}(string, Func{TypeName, Type}, out T)"/> 154Func<TypeName, Type?> resolver, 183/// <inheritdoc cref="ITypedDataObject.TryGetData{T}(string, Func{TypeName, Type}, bool, out T)" /> 187Func<TypeName, Type?>? resolver, 265Func<TypeName, Type?>? resolver,
System\Windows\Forms\OLE\DataObjectAdapter.cs (1)
41Func<TypeName, Type?> resolver,
System\Windows\Forms\OLE\DataObjectExtensions.cs (2)
52/// <inheritdoc cref="ITypedDataObject.TryGetData{T}(string, Func{Reflection.Metadata.TypeName, Type}, bool, out T)"/> 59Func<Reflection.Metadata.TypeName, Type?> resolver,
System\Windows\Forms\OLE\ITypedDataObject.cs (2)
39/// <inheritdoc cref="IDataObjectInternal.TryGetData{T}(string, Func{TypeName, Type}, bool, out T)" /> 43Func<TypeName, Type?> resolver,
System\Windows\Forms\SuspendPaintingScope.cs (3)
70Func<Control, bool> suspendLayoutContainerFilter) 148Func<Control, bool> suspendLayoutContainerFilter) 165Func<Control, bool> suspendLayoutContainerFilter)
System.Xaml (15)
System\Xaml\Context\XamlContext.cs (2)
16private Func<string, string> _resolvePrefixCachedDelegate; 294internal Func<string, string> ResolvePrefixCachedDelegate
System\Xaml\Context\XamlParserContext.cs (1)
19public Func<string, string> XmlNamespaceResolver { get; set; }
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
231Func<string, string> namespaceResolver = myXmlReader.LookupNamespace;
System\Xaml\Parser\GenericTypeNameParser.cs (3)
29private Func<string, string> _prefixResolver; 32public GenericTypeNameParser(Func<string, string> prefixResolver) 37public static XamlTypeName ParseIfTrivalName(string text, Func<string, string> prefixResolver, out string error)
System\Xaml\Parser\NamespacePrefixLookup.cs (2)
13private readonly Func<string, string> _nsResolver; 14public NamespacePrefixLookup(out IEnumerable<NamespaceDeclaration> newNamespaces, Func<string, string> nsResolver)
System\Xaml\XamlTypeName.cs (6)
150internal static string ConvertListToStringInternal(IList<XamlTypeName> typeNameList, Func<string, string> prefixGenerator) 157internal static void ConvertListToStringInternal(StringBuilder result, IList<XamlTypeName> typeNameList, Func<string, string> prefixGenerator) 175internal static XamlTypeName ParseInternal(string typeName, Func<string, string> prefixResolver, out string error) 188internal static IList<XamlTypeName> ParseListInternal(string typeNameList, Func<string, string> prefixResolver, out string error) 195internal string ConvertToStringInternal(Func<string, string> prefixGenerator) 202internal void ConvertToStringInternal(StringBuilder result, Func<string, string> prefixGenerator)
TestProject.IntegrationServiceA (1)
ResilienceUtils.cs (1)
11public static ResiliencePipelineBuilder GetDefaultResiliencePipelineBuilder<TException>(Func<OnRetryArguments<object>, ValueTask> onRetry, int overallTimeoutSecs = 90) where TException : Exception
UnitTests.Common (1)
MockRequestChannel.cs (1)
20public Func<IAsyncResult, Message> EndRequestOverride { get; set; }
vbc (2)
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (2)
20internal static T RunWithUtf8Output<T>(Func<TextWriter, T> func) 41internal static T RunWithUtf8Output<T>(bool utf8Output, TextWriter textWriter, Func<TextWriter, T> func)
VBCSCompiler (2)
src\roslyn\src\Compilers\Shared\ConsoleUtil.cs (2)
20internal static T RunWithUtf8Output<T>(Func<TextWriter, T> func) 41internal static T RunWithUtf8Output<T>(bool utf8Output, TextWriter textWriter, Func<TextWriter, T> func)
vstest.console (3)
Processors\EnableBlameArgumentProcessor.cs (3)
140Func<string, bool> isDumpCollect = a => Constants.BlameCollectDumpKey.Equals(a, StringComparison.OrdinalIgnoreCase); 141Func<string, bool> isHangDumpCollect = a => Constants.BlameCollectHangDumpKey.Equals(a, StringComparison.OrdinalIgnoreCase); 142Func<string, bool> isMonitorPostmortemDebugger = a => Constants.BlameCollectMonitorPostMortemDebuggerKey.Equals(a, StringComparison.OrdinalIgnoreCase);
vstest.console.arm64 (3)
src\vstest\src\vstest.console\Processors\EnableBlameArgumentProcessor.cs (3)
140Func<string, bool> isDumpCollect = a => Constants.BlameCollectDumpKey.Equals(a, StringComparison.OrdinalIgnoreCase); 141Func<string, bool> isHangDumpCollect = a => Constants.BlameCollectHangDumpKey.Equals(a, StringComparison.OrdinalIgnoreCase); 142Func<string, bool> isMonitorPostmortemDebugger = a => Constants.BlameCollectMonitorPostMortemDebuggerKey.Equals(a, StringComparison.OrdinalIgnoreCase);