/// <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); }
/// <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); }
/// <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)); }
protected override void OnChildAdd(object sender, ParentBaseEventArgs parentBaseEventArgs) { base.OnChildAdd(sender, parentBaseEventArgs); }
/// <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); }