Ejemplo n.º 1
0
        /// <summary>
        ///     Raises the <see cref="E:ChildAddInvoker" /> event.
        /// </summary>
        /// <param name="eventArgs">The <see cref="PareParentBaseentBaseEventArgs" /> instance containing the event data.</param>
        protected override void OnChildAddInvoker(ParentBaseEventArgs eventArgs)
        {
            if (eventArgs.Child is SuperParent)
            {
                throw new InvalidOperationException("A Super-Parent can't add other Super-Parents");
            }

            base.OnChildAddInvoker(eventArgs);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Raises the <see cref="E:ChildRemoveInvoker" /> event.
 /// </summary>
 /// <param name="eventArgs">The <see cref="ParentBaseEventArgs" /> instance containing the event data.</param>
 protected virtual void OnChildRemoveInvoker(ParentBaseEventArgs eventArgs)
 {
     this.OnChildRemoveEvent?.Invoke(this, eventArgs);
 }
Ejemplo n.º 3
0
        /// <summary>
        ///     Called when [child add].
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="eventArgs">The <see cref="ParentBaseEventArgs" /> instance containing the event data.</param>
        protected virtual void OnChildAdd(object sender, ParentBaseEventArgs eventArgs)
        {
            var child = eventArgs.Child;

            this.Children.Add(child, new Tuple <bool, bool>(false, false));
        }
Ejemplo n.º 4
0
 protected override void OnChildAdd(object sender, ParentBaseEventArgs parentBaseEventArgs)
 {
     base.OnChildAdd(sender, parentBaseEventArgs);
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Called when [child add].
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="eventArgs">The <see cref="ParentBase.ParentBaseEventArgs" /> instance containing the event data.</param>
 protected override void OnChildAdd(object sender, ParentBaseEventArgs eventArgs)
 {
     base.OnChildAdd(sender, eventArgs);
 }