|
// -- FILE ------------------------------------------------------------------
// name : ILookupValueCollection.cs
// project : Itenso Web User Forms
// created : Jani Giannoudis - 2008.10.30
// language : c#
// environment: .NET 2.0
// copyright : (c) 2008-2012 by Itenso GmbH, Switzerland
// --------------------------------------------------------------------------
using System.Collections.Generic;
namespace Itenso.WebUserForms.Data.Lookup
{
// ------------------------------------------------------------------------
public interface ILookupValueCollection : IEnumerable<ILookupValue>
{
// ----------------------------------------------------------------------
/// <summary>
/// Access to the name of the lookup value collection.
/// </summary>
/// <value>the number of items in the collection</value>
string Name { get; }
// ----------------------------------------------------------------------
/// <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>
ILookupValue this[ int index ] { get; }
// ----------------------------------------------------------------------
/// <summary>
/// Index access to the items of this collection.
/// </summary>
/// <param name="key">the key of the item to retrieve</param>
/// <returns>the item at the given position</returns>
ILookupValue this[ string key ] { 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( ILookupValue 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( ILookupValue[] array, int index );
// ----------------------------------------------------------------------
/// <summary>
/// Adds the given item.
/// </summary>
/// <param name="item">the item to add</param>
/// <returns>the insertion position</returns>
int Add( ILookupValue 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( ILookupValue 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<ILookupValue> items );
// ----------------------------------------------------------------------
/// <summary>
/// Removes the given item.
/// </summary>
/// <param name="item">the item to remove</param>
void Remove( ILookupValue 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();
} // interface ILookupValueCollection
} // namespace Itenso.WebUserForms.Data.Lookup
// -- EOF -------------------------------------------------------------------
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
👨 Senior .NET Software Engineer
🚀 My Open Source Projects
-
Time Period Library 👉
GitHub
-
Payroll Engine 👉
GitHub
Feedback and contributions are welcome.