RulesetRegistryExtensions 类
- 程序集
- ClassIsland.Core.dll
注册规则的IServiceCollection扩展。
public static class RulesetRegistryExtensions
- 继承
-
RulesetRegistryExtensions
- 继承成员
方法
AddRule(IServiceCollection, string, string, string, HandleDelegate?)
注册规则。
public static IServiceCollection AddRule(this IServiceCollection services, string id, string name = "", string iconGlyph = "", RuleRegistryInfo.HandleDelegate? onHandle = null)
参数
servicesIServiceCollectionidstring规则ID,例如“classisland.example”。
namestring规则名称。/
iconGlyphstring规则图标。
onHandleRuleRegistryInfo.HandleDelegate规则处理程序。
返回
AddRule<TSettings>(IServiceCollection, string, string, string, HandleDelegate?)
注册规则。
public static IServiceCollection AddRule<TSettings>(this IServiceCollection services, string id, string name = "", string iconGlyph = "", RuleRegistryInfo.HandleDelegate? onHandle = null)
参数
servicesIServiceCollectionidstring规则ID,例如“classisland.example”。
namestring规则名称。/
iconGlyphstring规则图标。
onHandleRuleRegistryInfo.HandleDelegate规则处理程序。
返回
类型参数
TSettings规则设置类型。
AddRule<TSettings, TSettingsControl>(IServiceCollection, string, string, string, HandleDelegate?)
注册规则。
public static IServiceCollection AddRule<TSettings, TSettingsControl>(this IServiceCollection services, string id, string name = "", string iconGlyph = "", RuleRegistryInfo.HandleDelegate? onHandle = null) where TSettingsControl : RuleSettingsControlBase
参数
servicesIServiceCollectionidstring规则ID,例如“classisland.example”。
namestring规则名称。/
iconGlyphstring规则图标。
onHandleRuleRegistryInfo.HandleDelegate规则处理程序。
返回
类型参数
TSettings规则设置类型。
TSettingsControl规则设置控件类型。