📄 ipersistentlist.cs
字号:
using System;
#if USE_GENERICS
using System.Collections.Generic;
#else
using System.Collections;
#endif
namespace Perst
{
///<summary>
/// Interface for ordered collection (sequence).
/// The user can access elements by their integer index (position in
/// the list), and search for elements in the list.
/// </summary>
#if USE_GENERICS
public interface IPersistentList<T> : IPersistent, IResource, ITable<T>, IList<T> where T:class,IPersistent
#else
public interface IPersistentList : IPersistent, IResource, ITable, IList
#endif
{
/// <summary> Get relation members as array of objects
/// </summary>
/// <returns>created array</returns>
#if USE_GENERICS
T[] ToArray();
#else
IPersistent[] ToArray();
#endif
/// <summary> Get relation members as array with specifed element type
/// </summary>
/// <param name="elemType">element type of created array</param>
/// <returns>created array</returns>
Array ToArray(Type elemType);
/// <summary>
/// Get bidirectional enumerator started with specified current position
/// </summary>
/// <param name="start">position of the first element.
/// After creation of this enumerator <code>IEnumerator.Current</code> property points to the list
/// element with index <code>start</code> (if any), following <code>IEnumerator.MoveNext</code> moves
/// enumerator current position to the element with index <code>star+1</code> and
/// <code>IEnumerator.MovePrevious</code> - to the element with index <code>start-1</code>.
/// Standard enumerator is equivalent to <code>start == -1</code>.
/// </param>
/// <returns>iterator through the list elements starting from element with specified position</returns>
#if USE_GENERICS
IBidirectionalEnumerator<T> GetEnumerator(int start);
#else
IBidirectionalEnumerator GetEnumerator(int start);
#endif
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -