IActionService 接口
- 程序集
- ClassIsland.Core.dll
行动服务。负责管理行动提供方、提供行动的运行方法。
public interface IActionService
字段
ActionInfos
所有行动提供方信息。 键为行动提供方 ID,值为行动提供方信息。
public static readonly Dictionary<string, ActionInfo> ActionInfos
字段值
ActionMenuTree
「添加行动」层叠菜单。 键为菜单元素中文名,值为菜单元素。
public static readonly ActionMenuTreeNodeCollection ActionMenuTree
字段值
ObsoleteActionHandlers
[Obsolete("注意!行动 v2 注册方法已过时,请参阅 ClassIsland 开发文档进行迁移。")]
public static readonly Dictionary<string, (Type, Action<object, string>?, Action<object, string>?)> ObsoleteActionHandlers
字段值
属性
IListActionMenuTree
列表类型的只读「添加行动」层叠菜单。
public static IReadOnlyList<ActionMenuTreeNode> IListActionMenuTree { get; }
属性值
方法
InterruptActionSetAsync(ActionSet)
中断行动组运行。此方法会等待行动组运行生命周期结束。
Task InterruptActionSetAsync(ActionSet actionSet)
参数
actionSetActionSet
返回
InvokeActionSetAsync(ActionSet, bool)
触发行动组。行动错误已被捕获。
Task InvokeActionSetAsync(ActionSet actionSet, bool isRevertable = true)
参数
返回
RegisterActionHandler(string, Action<object, string>)
[Obsolete("注意!行动 v2 注册方法已过时,请参阅 ClassIsland 开发文档进行迁移。")]
void RegisterActionHandler(string id, Action<object, string> i2)
参数
RegisterRevertHandler(string, Action<object, string>)
[Obsolete("注意!行动 v2 注册方法已过时,请参阅 ClassIsland 开发文档进行迁移。")]
void RegisterRevertHandler(string id, Action<object, string> i3)
参数
RevertActionSetAsync(ActionSet)
恢复行动组。行动错误已被捕获。
Task RevertActionSetAsync(ActionSet actionSet)
参数
actionSetActionSet