/// <summary>
        /// Gets corresponding rule editing context for a given model item.
        /// </summary>
        /// <param name="modelItem">the model item</param>
        /// <returns>Corresponding rule editing context for the model item</returns>
        public static RuleEditingContext GetRuleEditingContext(this ModelItem modelItem)
        {
            RuleEditingContextService service = modelItem.GetRuleEditingContextService();

            Debug.Assert(service != null, "Something must be broken."); // NOXLATE
            return(service.GetEditingContext(modelItem));
        }
        /// <summary>
        /// Overrides rule editing context for the model item and its descendants.
        /// </summary>
        /// <param name="modelItem">the model item</param>
        /// <param name="context">the context to override</param>
        public static void OverrideRuleEditingContext(this ModelItem modelItem, RuleEditingContext context)
        {
            RuleEditingContextService service = modelItem.GetRuleEditingContextService();

            service.OverrideEditingContext(modelItem, context);
        }
        /// <summary>
        /// Gets the root rule editing context for given model item.
        /// </summary>
        /// <returns>Root rule editing context</returns>
        public static RuleEditingContext GetRootRuleEditingContext(this ModelItem modelItem)
        {
            RuleEditingContextService service = modelItem.GetRuleEditingContextService();

            return(service.GetRootEditingContext());
        }