public void MergeWith(IControl 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); }
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); }