Table of Contents

ActionRegistryExtensions 类

命名空间
ClassIsland.Core.Extensions.Registry
程序集
ClassIsland.Core.dll

注册行动的IServiceCollection扩展。

public static class ActionRegistryExtensions
继承
ActionRegistryExtensions
继承成员

方法

AddAction(IServiceCollection, string, string, PackIconKind, HandleDelegate?)

注册无设置行动。

public static IServiceCollection AddAction(this IServiceCollection services, string id, string name = "", PackIconKind iconKind = PackIconKind.BacteriaOutline, ActionRegistryInfo.HandleDelegate? onHandle = null)

参数

services IServiceCollection

IServiceCollection对象。

id string

行动ID,例如“classisland.example”。

name string

行动名称。/

iconKind PackIconKind

行动图标。

onHandle ActionRegistryInfo.HandleDelegate

行动处理程序。

返回

IServiceCollection

IServiceCollection对象。

AddAction<TSettings, TSettingsControl>(IServiceCollection, string, string, PackIconKind, HandleDelegate?)

注册行动。

public static IServiceCollection AddAction<TSettings, TSettingsControl>(this IServiceCollection services, string id, string name = "", PackIconKind iconKind = PackIconKind.BacteriaOutline, ActionRegistryInfo.HandleDelegate? onHandle = null) where TSettingsControl : ActionSettingsControlBase

参数

services IServiceCollection

IServiceCollection对象。

id string

行动ID,例如“classisland.example”。

name string

行动名称。/

iconKind PackIconKind

行动图标。

onHandle ActionRegistryInfo.HandleDelegate

行动处理程序。

返回

IServiceCollection

IServiceCollection对象。

类型参数

TSettings

行动设置类型。

TSettingsControl

行动设置控件类型。