// foamliu, 2008/11/21, comment it, as it is ref-count == 0, :-) //public Production(Rete engine) //{ // this.m_lhs = new List<Condition>(); // this.m_rhs = new List<ReAction>(); // this.m_variablenames = new Dictionary<string, Variable>(); // this.m_p_node = new P_Node(); // this.m_p_node.Production = this; // this.m_engine = engine; //} #endregion #region Methods public void FireOnActivation(bool activated) { if (null != this.OnActivation) { Activation activation = new Activation(this); ActivationEventArgs eventArgs = new ActivationEventArgs(activation, activated); this.OnActivation(this, eventArgs); } }
public void ActivationEventHandler(object sender, ActivationEventArgs e) { if (e.Activated) { if (this.m_activatedProductions.Contains(e.Activation.Production)) { return; } this.m_conflictSet.Insert(e.Activation.Production); } //else //{ // this.m_conflictSet.Remove(e.Activation.Production); //} }