RulesetRegistryExtensions 类
- 程序集
- 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
IServiceCollectionid
string规则ID,例如“classisland.example”。
name
string规则名称。/
iconKind
PackIconKind规则图标。
onHandle
RuleRegistryInfo.HandleDelegate规则处理程序。
返回
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
IServiceCollectionid
string规则ID,例如“classisland.example”。
name
string规则名称。/
iconKind
PackIconKind规则图标。
onHandle
RuleRegistryInfo.HandleDelegate规则处理程序。
返回
类型参数
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
IServiceCollectionid
string规则ID,例如“classisland.example”。
name
string规则名称。/
iconKind
PackIconKind规则图标。
onHandle
RuleRegistryInfo.HandleDelegate规则处理程序。
返回
类型参数
TSettings
规则设置类型。
TSettingsControl
规则设置控件类型。