Class IndenterSettingsImportFlow
- Namespace
- RDCore.SDK.Formatting
- Assembly
- RDCore.SDK.dll
Imports the indenter settings of Rubberduck from a client that reads them: asks it what it found, maps that to Formatting settings
(IndenterSettingsImport), and asks it to take them as its own.
public static class IndenterSettingsImportFlow
- Inheritance
-
IndenterSettingsImportFlow
- Inherited Members
Remarks
A client owns its configuration, and the platform writes none of it: the client reads Rubberduck's settings (RubberduckIndenterSettingsParams) and stores the mapped ones itself (RubberduckIndenterSettingsApplyParams). Only a client that expects RubberduckIndenterSettings is asked.
Methods
ApplyAsync(IndenterSettingsImport, Func<RubberduckIndenterSettingsApplyParams, CancellationToken, Task<RubberduckIndenterSettingsApplyResult>>, CancellationToken)
Asks the client to take the settings as its own.
public static Task<IndenterSettingsImportOutcome> ApplyAsync(IndenterSettingsImport import, Func<RubberduckIndenterSettingsApplyParams, CancellationToken, Task<RubberduckIndenterSettingsApplyResult>> apply, CancellationToken token)
Parameters
importIndenterSettingsImportThe settings.
applyFunc<RubberduckIndenterSettingsApplyParams, CancellationToken, Task<RubberduckIndenterSettingsApplyResult>>Sends RubberduckIndenterSettingsApplyParams to the client.
tokenCancellationTokenA token that cancels the request.
Returns
FindAsync(Func<CancellationToken, Task<RubberduckIndenterSettingsResult>>, CancellationToken)
Asks the client what it found of Rubberduck's indenter settings.
public static Task<IndenterSettingsImport?> FindAsync(Func<CancellationToken, Task<RubberduckIndenterSettingsResult>> read, CancellationToken token)
Parameters
readFunc<CancellationToken, Task<RubberduckIndenterSettingsResult>>Sends RubberduckIndenterSettingsParams to the client.
tokenCancellationTokenA token that cancels the request.
Returns
- Task<IndenterSettingsImport>
The settings, mapped; null when the client found none.
ImportAsync(Func<CancellationToken, Task<RubberduckIndenterSettingsResult>>, Func<RubberduckIndenterSettingsApplyParams, CancellationToken, Task<RubberduckIndenterSettingsApplyResult>>, CancellationToken)
Imports the settings the client has, when it has any.
public static Task<IndenterSettingsImportOutcome> ImportAsync(Func<CancellationToken, Task<RubberduckIndenterSettingsResult>> read, Func<RubberduckIndenterSettingsApplyParams, CancellationToken, Task<RubberduckIndenterSettingsApplyResult>> apply, CancellationToken token)
Parameters
readFunc<CancellationToken, Task<RubberduckIndenterSettingsResult>>Sends RubberduckIndenterSettingsParams to the client.
applyFunc<RubberduckIndenterSettingsApplyParams, CancellationToken, Task<RubberduckIndenterSettingsApplyResult>>Sends RubberduckIndenterSettingsApplyParams to the client.
tokenCancellationTokenA token that cancels the requests.