public void MergeWith(IControlCollection control) { if (!(control is IMenu)) { throw new TempException("Invalid control type"); } _undrelyingControls.Add((IMenu)control); CompositeAggregator.MergeUnsafe(this, control); }
public void MergeWith(IControlCollection control) { if (!(control is T)) { throw new TempException("Invalid control type"); } if (UndrelyingControls.Count > 0 && !string.Equals(Id, control.Id, StringComparison.Ordinal)) { throw new TempException("Invalid Id"); } UndrelyingControls.Add((T)control); CompositeAggregator.MergeUnsafe(this, control); }