public override void Dispose()
 {
     foreach (T control in UndrelyingControls)
     {
         control.TryDispose();
     }
     UndrelyingControls.Clear();
     base.Dispose();
 }
 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);
 }
Exemple #3
0
 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);
 }