Table of Contents

Class CLActions

Namespace
SunamoCl
Assembly
SunamoCl.dll

Provides methods for merging synchronous and asynchronous action dictionaries and executing selected actions

public class CLActions
Inheritance
CLActions
Inherited Members
Extension Methods

Methods

MergeActions(Dictionary<string, Action>, Dictionary<string, Func<Task>>)

Merges synchronous and asynchronous action dictionaries into a single dictionary with object values

public static Dictionary<string, object> MergeActions(Dictionary<string, Action> actions, Dictionary<string, Func<Task>> actionsAsync)

Parameters

actions Dictionary<string, Action>

Dictionary of synchronous actions

actionsAsync Dictionary<string, Func<Task>>

Dictionary of asynchronous actions

Returns

Dictionary<string, object>

Merged dictionary containing both synchronous and asynchronous actions

PerformActionAsync(Dictionary<string, object>)

Presents all actions to the user for selection and executes the chosen one

public static Task<string?> PerformActionAsync(Dictionary<string, object> actions)

Parameters

actions Dictionary<string, object>

Dictionary of named actions (synchronous or asynchronous)

Returns

Task<string>

Name of the executed action, or null if cancelled