public LogicRulePreChain(int pri, ILogicRule mr, ISettingDelegate[] reqs) { this.d = reqs; this.c = pri; this.a = mr; this.b = new MyList <ILogicRule>(100); }
Type LogicRuleObjectType(ILogicRule logicRule) { var typesInfo = _module.Application.TypesInfo; var type = _modelLogics.Where(logicWrapper => logicWrapper.RuleType.IsInstanceOfType(logicRule)).Select(wrapper => wrapper.RuleType).First(); return(typesInfo.FindTypeInfo <LogicRule>().Descendants.Single(info => !info.Type.IsAbstract && type.IsAssignableFrom(info.Type)).Type); }
public LogicRulePreChain(int pri, ILogicRule mr, ISettingDelegate[] reqs, params ILogicRule[] pr) { this.d = reqs; this.c = pri; this.a = mr; this.b = new MyList <ILogicRule>(100); foreach (ILogicRule rule in pr) { this.b.Add(rule); } }
public static void a(ILogicRule A_0) { if (A_0 != null) { dm.b("VTank", "Macro Action", A_0.FriendlyName); } else { dm.b("VTank", "Macro Action", "[None]"); } }
public bool AddLogicRuleAfterSentinel(ILogicRule lr, string sentmarker) { for (int i = 0; i < this.l.Count; i++) { LogicRuleSentinel sentinel = this.l[i] as LogicRuleSentinel; if ((sentinel != null) && (sentinel.Marker == sentmarker)) { this.l.Insert(i + 1, lr); return(true); } } return(false); }
protected LogicRule(ILogicRule logicRule) { ExecutionContextGroup=logicRule.ExecutionContextGroup; Description=logicRule.Description; FrameTemplateContext = logicRule.FrameTemplateContext; ID = logicRule.Id; Index = logicRule.Index; IsRootView = logicRule.IsRootView; Nesting = logicRule.Nesting; TypeInfo = logicRule.TypeInfo; View = logicRule.View; ViewType = logicRule.ViewType; ViewContextGroup = logicRule.ViewContextGroup; FrameTemplateContextGroup=logicRule.FrameTemplateContextGroup; }
protected LogicRulePermissionRequest(string operation,ILogicRule logicRule) : base(operation) { Description = logicRule.Description; ExecutionContextGroup = logicRule.ExecutionContextGroup; FrameTemplateContext = logicRule.FrameTemplateContext; FrameTemplateContextGroup = logicRule.FrameTemplateContextGroup; ID = logicRule.Id; Index = logicRule.Index; IsRootView = logicRule.IsRootView; Nesting = logicRule.Nesting; ((ILogicRule)this).View = logicRule.View; ViewContextGroup = logicRule.ViewContextGroup; ViewEditMode = logicRule.ViewEditMode; ViewType = logicRule.ViewType; }
protected LogicRulePermissionRequest(string operation, ILogicRule logicRule) : base(operation) { Description = logicRule.Description; ExecutionContextGroup = logicRule.ExecutionContextGroup; FrameTemplateContext = logicRule.FrameTemplateContext; FrameTemplateContextGroup = logicRule.FrameTemplateContextGroup; ID = logicRule.Id; Index = logicRule.Index; IsRootView = logicRule.IsRootView; Nesting = logicRule.Nesting; ((ILogicRule)this).View = logicRule.View; ViewContextGroup = logicRule.ViewContextGroup; ViewEditMode = logicRule.ViewEditMode; ViewType = logicRule.ViewType; }
protected LogicRule(ILogicRule logicRule) { ExecutionContextGroup = logicRule.ExecutionContextGroup; Description = logicRule.Description; FrameTemplateContext = logicRule.FrameTemplateContext; ID = logicRule.Id; Index = logicRule.Index; IsRootView = logicRule.IsRootView; Nesting = logicRule.Nesting; TypeInfo = logicRule.TypeInfo; View = logicRule.View; ViewType = logicRule.ViewType; ViewEditMode = logicRule.ViewEditMode; ViewContextGroup = logicRule.ViewContextGroup; FrameTemplateContextGroup = logicRule.FrameTemplateContextGroup; }
public void Dispose() { if (!this.e) { this.e = true; GC.SuppressFinalize(this); if (this.a != null) { this.a.Dispose(); this.a = null; } foreach (ILogicRule rule in this.b) { rule.Dispose(); } this.b.Clear(); } }
public static ITypeInfo Get_TypeInfo(ILogicRule modelNode) { return(((IModelLogicRule)modelNode).ModelClass.TypeInfo); }
public static string Get_ExecutionContextGroup(ILogicRule modelNode) { return(DefaultExecutionContextGroup); }
protected LogicRule(ILogicRule logicRule){ _logicRule = logicRule; }
public static string Get_ExecutionContextGroup(ILogicRule modelNode) { return(LogicDefaultGroupContextNodeUpdater.Default); }
public static ITypeInfo Get_TypeInfo(ILogicRule modelNode) { return ((IModelLogicRule)modelNode).ModelClass.TypeInfo; }
public void AddLogicRule_MacroDisabled(int pPos, ILogicRule lr) { this.m.Insert(pPos, lr); }
public void AddLogicRule_MacroDisabled(ILogicRule lr) { this.m.Add(lr); }
public void AddLogicRule(int pPos, ILogicRule lr) { this.l.Insert(pPos, lr); }
public void AddLogicRule(ILogicRule lr) { this.l.Add(lr); }
public static string Get_ExecutionContextGroup(ILogicRule modelNode) { return LogicDefaultGroupContextNodeUpdater<IModelLogic,IModelNode>.Default; }
Type LogicRuleObjectType(ILogicRule logicRule) { var typesInfo = _module.Application.TypesInfo; var type = _modelLogics.Where(logicWrapper => logicWrapper.RuleType.IsInstanceOfType(logicRule)).Select(wrapper => wrapper.RuleType).First(); return typesInfo.FindTypeInfo<LogicRule>().Descendants.Single(info => !info.Type.IsAbstract&&type.IsAssignableFrom(info.Type)).Type; }
private void a(MyList <ILogicRule> A_0, MyList <ILogicRule> A_1) { try { if (!PluginCore.cq.n.k) { fj.b("!!!! Evaluate Meta Rules"); if (PluginCore.cq.n.b && er.j("EnableMeta")) { [email protected](); a2.e(); } fj.a("!!!! Evaluate Meta Rules", 20.0); } if (A_1 != null) { fj.b("!!!! Evaluate Always Rules"); foreach (ILogicRule rule in A_1) { if (rule.ValidNow) { rule.Running = true; } else { rule.Running = false; } } fj.a("!!!! Evaluate Always Rules", 20.0); } if (PluginCore.cq.n.k) { return; } PluginCore.cq.n.a("----------- Primary logic loop started (" + A_0.Count.ToString() + " rules) -----------", e8.b); fj.b("Primary logic loop"); ILogicRule rule2 = null; fj.b("!!!! Logic loop - find valid rule"); foreach (ILogicRule rule3 in A_0) { string str = "!!!! Logic loop - validnow - " + rule3.FriendlyName; fj.b(str); bool validNow = rule3.ValidNow; fj.a(str, 20.0); if (validNow) { PluginCore.cq.n.a("Picked " + rule3.FriendlyName + " P: " + rule3.Priority.ToString() + " I=" + PluginCore.cq.n.n.b(ActionLockType.ItemUse).ToString() + ", N=" + PluginCore.cq.n.n.b(ActionLockType.Navigation).ToString() + ", S=" + PluginCore.cq.n.n.b(ActionLockType.Salvage).ToString(), e8.b); rule2 = rule3; PluginCore.cq.n.q = rule3.Priority; goto Label_031D; } } PluginCore.cq.n.a("All rules inactive. I=" + PluginCore.cq.n.n.b(ActionLockType.ItemUse).ToString() + ", N=" + PluginCore.cq.n.n.b(ActionLockType.Navigation).ToString() + ", S=" + PluginCore.cq.n.n.b(ActionLockType.Salvage).ToString(), e8.b); PluginCore.cq.n.q = 0; Label_031D: fj.a("!!!! Logic loop - find valid rule", 20.0); fj.b("!!!! Logic loop - clear rules"); foreach (ILogicRule rule4 in A_0) { if (rule4 != rule2) { rule4.Running = false; } } fj.a("!!!! Logic loop - clear rules", 20.0); if (rule2 != null) { string str2 = "!!!! Logic loop - activate rule " + rule2.FriendlyName; fj.b(str2); rule2.Running = true; fj.a(str2, 20.0); } this.h = rule2; l.a(rule2); fj.a("Primary logic loop"); } catch (Exception exception) { ad.a(exception); } finally { DateTimeOffset now = DateTimeOffset.Now; TimeSpan span = (TimeSpan)(now - this.d); if (span.TotalSeconds > 30.0) { this.d = now; string str3 = "!!!! Logic finally - forcegc F"; fj.b(str3); GC.WaitForPendingFinalizers(); GC.Collect(); fj.a(str3, 80.0); } } }
public static string Get_ExecutionContextGroup(ILogicRule modelNode) { return DefaultExecutionContextGroup; }
public bool RemoveLogicRule(ILogicRule lr) { return(this.l.Remove(lr)); }