📄 entitysetenumerator.cs
字号:
using System;
using System.Collections;
namespace EnterpriseObjects
{
/// <summary>
/// Summary description for EntitySetEnumerator.
/// </summary>
public class EntitySetEnumerator : IEnumerator
{
// members...
public int TableIndex;
public EntitySet EntitySet;
public int Position = -1;
// constructor...
public EntitySetEnumerator(EntitySet entitySet) : this(0, entitySet)
{
}
public EntitySetEnumerator(int tableIndex, EntitySet entitySet)
{
this.TableIndex = tableIndex;
this.EntitySet = entitySet;
}
public object Current
{
get
{
return EntitySet.GetEntity(TableIndex, Position);
}
}
public bool MoveNext()
{
if(Position == EntitySet.GetCount(TableIndex) - 1)
return false;
Position += 1;
return true;
}
public void Reset()
{
Position = -1;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -