/// <summary> /// Initializes macro editor for macro rule, loads its default value. /// </summary> private void InitMacroSettings() { if ((Rule != null) && !RequestHelper.IsPostBack()) { macroEditor.Text = RuleHelper.GetMacroConditionFromRule(Rule); } }
/// <summary> /// Check whether all macros in macro rule are optimized. /// Shows warning when not. /// </summary> private void CheckMacros() { var macroCondition = RuleHelper.GetMacroConditionFromRule(Rule); if (string.IsNullOrEmpty(macroCondition)) { return; } var macroTree = CachedMacroRuleTrees.GetParsedTree(macroCondition); if ((macroTree == null) || !MacroRuleTreeAnalyzer.CanTreeBeTranslated(macroTree)) { ShowWarning(ResHelper.GetString("om.macros.macro.slow")); } }
/// <summary> /// Check whether all macros in macro rule are optimized. /// Shows warning when not. /// </summary> private void CheckMacros() { var macroCondition = RuleHelper.GetMacroConditionFromRule(Rule); if (string.IsNullOrEmpty(macroCondition)) { return; } var macroTree = CachedMacroRuleTrees.GetParsedTree(macroCondition); if ((macroTree == null) || !MacroRuleTreeAnalyzer.CanTreeBeTranslated(macroTree)) { var text = string.Format(ResHelper.GetString("om.macros.macro.slow"), DocumentationHelper.GetDocumentationTopicUrl("om_macro_performance")); ShowWarning(text); } }