/// <summary> /// Callback function to be applied on a node after a rule has been applied /// that has modified the node /// </summary> /// <param name="node">current node</param> /// <param name="rule">the rule that modified the node</param> internal virtual void PostProcess(Node node, Rule rule) { }
/// <summary> /// Callback function to invoke *after* rules are applied /// Recomputes the node info, if this node has changed /// If the rule is among the rules after which projection pruning may be beneficial, /// m_projectionPrunningRequired is set to true. /// If the rule is among the rules after which reapplying the nullability rules may be beneficial, /// m_reapplyNullabilityRules is set to true. /// </summary> /// <param name="n"></param> /// <param name="rule">the rule that was applied</param> internal override void PostProcess(Node n, Rule rule) { if (rule != null) { #if DEBUG appliedRules.Append(rule.MethodName); appliedRules.AppendLine(); #endif if (!m_projectionPrunningRequired && TransformationRules.RulesRequiringProjectionPruning.Contains(rule)) { m_projectionPrunningRequired = true; } if (!m_reapplyNullabilityRules && TransformationRules.RulesRequiringNullabilityRulesToBeReapplied.Contains(rule)) { m_reapplyNullabilityRules = true; } Command.RecomputeNodeInfo(n); } }