IRulesetService 接口
- 程序集
- ClassIsland.Core.dll
规则集服务。
public interface IRulesetService
属性
Rules
已经注册的规则列表。
public static ObservableDictionary<string, RuleRegistryInfo> Rules { get; }
属性值
方法
IsRulesetSatisfied(Ruleset)
判断指定的规则集Ruleset是否成立。
bool IsRulesetSatisfied(Ruleset ruleset)
参数
ruleset
Ruleset要检验的规则集。
返回
- bool
如果成立,则返回 true。
NotifyStatusChanged()
通知当前状态发生变化,需要重新判定规则集。
void NotifyStatusChanged()
RegisterRuleHandler(string, HandleDelegate)
注册规则处理程序。
void RegisterRuleHandler(string id, RuleRegistryInfo.HandleDelegate handler)
参数
id
string要注册的规则ID
handler
RuleRegistryInfo.HandleDelegate规则处理程序。
事件
ForegroundWindowChanged
当前置窗口发生变化时触发。
event EventHandler? ForegroundWindowChanged
事件类型
StatusUpdated
当当前状态更新,需要重新判定规则集时触发。
event EventHandler? StatusUpdated