- // -- FILE ------------------------------------------------------------------
- // name : IUserFormCollection.cs
- // project : Itenso Web User Forms
- // created : Jani Giannoudis - 2008.10.30
- // language : c#
- // environment: .NET 2.0
- // copyright : (c) 2008 by Itenso GmbH, Switzerland
- // --------------------------------------------------------------------------
- using System;
- using System.Collections.Generic;
- namespace Itenso.WebUserForms.Controls
- {
- // ------------------------------------------------------------------------
- public interface IUserFormCollection : IEnumerable<IUserForm>
- {
- // ----------------------------------------------------------------------
- /// <summary>
- /// Access to the number of items.
- /// </summary>
- /// <value>the number of items in the collection</value>
- int Count { get; }
- // ----------------------------------------------------------------------
- /// <summary>
- /// Index access to the items of this collection.
- /// </summary>
- /// <param name="index">the index of the item to retrieve</param>
- /// <returns>the item at the given position</returns>
- IUserForm this[ int index ] { get; }
- // ----------------------------------------------------------------------
- /// <summary>
- /// Provides the index of an element in this collection.
- /// </summary>
- /// <param name="item">The element whose index is to be returned.</param>
- /// <returns>The index of an element in this collection, or -1 if the element does not exist.</returns>
- int IndexOf( IUserForm item );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Copies this collections items to the given array.
- /// </summary>
- /// <param name="array">the target array</param>
- /// <param name="index">the target index</param>
- void CopyTo( IUserForm[] array, int index );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Adds the given item.
- /// </summary>
- /// <param name="item">the item to add</param>
- /// <returns>the insertion position</returns>
- int Add( IUserForm item );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Adds the given item at the given position.
- /// </summary>
- /// <param name="item">the item to add</param>
- /// <param name="pos">the position to insert the new item into</param>
- void Add( IUserForm item, int pos );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Adds all items in the given list to this instance.
- /// </summary>
- /// <param name="items">the items to add</param>
- void AddAll( IEnumerable<IUserForm> items );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Removes the given item.
- /// </summary>
- /// <param name="item">the item to remove</param>
- void Remove( IUserForm item );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Removes the item at the given position.
- /// </summary>
- /// <param name="index">the index of the item to remove</param>
- void RemoveAt( int index );
- // ----------------------------------------------------------------------
- /// <summary>
- /// Removes all entries from this instance.
- /// </summary>
- void Clear();
- // ----------------------------------------------------------------------
- /// <summary>
- /// Provides convenience search access to an individual form of this instance.
- /// </summary>
- /// <param name="formName">the name of the form to find</param>
- /// <returns>the item within this instance with the given name or null if
- /// no such form could be found</returns>
- IUserForm FindByFormName( string formName );
- } // interface IUserFormCollection
- } // namespace Itenso.WebUserForms.Controls
- // -- EOF -------------------------------------------------------------------