Ejemplo n.º 1
0
 /// <summary>
 /// Raises the <see cref="E:RemovingAtRule" /> event.
 /// </summary>
 /// <param name="e">The <see cref="RemovingAtRuleEventArgs"/> instance containing the event data.</param>
 protected virtual void OnRemovingAtRule(RemovingAtRuleEventArgs e)
 {
     if (RemovingAtRule != null)
     {
         RemovingAtRule(this, e);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Removes an at-rule from the document.
        /// </summary>
        /// <param name="tag">Tag the style belongs to</param>
        /// <param name="rule">Rule to be removed</param>
        /// <returns>true, if the rule can be removed; false, otherwise.</returns>
        private bool RemoveAtRule(IElement tag, ICssRule rule)
        {
            var e = new RemovingAtRuleEventArgs {
                Tag = tag, Rule = rule
            };

            OnRemovingAtRule(e);
            return(!e.Cancel);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the <see cref="E:RemovingAtRule" /> event.
 /// </summary>
 /// <param name="e">The <see cref="RemovingAtRuleEventArgs"/> instance containing the event data.</param>
 protected virtual void OnRemovingAtRule(RemovingAtRuleEventArgs e)
 {
     RemovingAtRule?.Invoke(this, e);
 }