Table of Contents

RulesetRegistryExtensions 类

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

注册规则的IServiceCollection扩展。

public static class RulesetRegistryExtensions
继承
RulesetRegistryExtensions
继承成员

方法

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

注册规则。

public static IServiceCollection AddRule(this IServiceCollection services, string id, string name = "", PackIconKind iconKind = PackIconKind.CogOutline, RuleRegistryInfo.HandleDelegate? onHandle = null)

参数

services IServiceCollection

IServiceCollection对象。

id string

规则ID,例如“classisland.example”。

name string

规则名称。/

iconKind PackIconKind

规则图标。

onHandle RuleRegistryInfo.HandleDelegate

规则处理程序。

返回

IServiceCollection

IServiceCollection对象。

AddRule<TSettings>(IServiceCollection, string, string, PackIconKind, HandleDelegate?)

注册规则。

public static IServiceCollection AddRule<TSettings>(this IServiceCollection services, string id, string name = "", PackIconKind iconKind = PackIconKind.CogOutline, RuleRegistryInfo.HandleDelegate? onHandle = null)

参数

services IServiceCollection

IServiceCollection对象。

id string

规则ID,例如“classisland.example”。

name string

规则名称。/

iconKind PackIconKind

规则图标。

onHandle RuleRegistryInfo.HandleDelegate

规则处理程序。

返回

IServiceCollection

IServiceCollection对象。

类型参数

TSettings

规则设置类型。

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

注册规则。

public static IServiceCollection AddRule<TSettings, TSettingsControl>(this IServiceCollection services, string id, string name = "", PackIconKind iconKind = PackIconKind.CogOutline, RuleRegistryInfo.HandleDelegate? onHandle = null) where TSettingsControl : RuleSettingsControlBase

参数

services IServiceCollection

IServiceCollection对象。

id string

规则ID,例如“classisland.example”。

name string

规则名称。/

iconKind PackIconKind

规则图标。

onHandle RuleRegistryInfo.HandleDelegate

规则处理程序。

返回

IServiceCollection

IServiceCollection对象。

类型参数

TSettings

规则设置类型。

TSettingsControl

规则设置控件类型。