📄 entityboundcollection.cs
字号:
using System;
using System.Collections;
namespace EnterpriseObjects
{
/// <summary>
/// Summary description for EntityBoundCollection.
/// </summary>
public class EntityBoundCollection : IList
{
// members...
public EntitySet EntitySet;
public int TableIndex;
public EntityBoundCollection()
{
}
public class EntityBoundCollectionCannotBeChangedException : ApplicationException
{
}
public int Add(object val)
{
throw new EntityBoundCollectionCannotBeChangedException();
}
public void Clear()
{
throw new EntityBoundCollectionCannotBeChangedException();
}
public bool Contains(object val)
{
throw new NotImplementedException();
}
public void CopyTo(Array array, int index)
{
throw new NotImplementedException();
}
public int Count
{
get
{
return EntitySet.GetCount(TableIndex);
}
}
public IEnumerator GetEnumerator()
{
return EntitySet.GetEnumerator(TableIndex);
}
public int IndexOf(object val)
{
throw new NotImplementedException();
}
public void Insert(int index, object val)
{
throw new EntityBoundCollectionCannotBeChangedException();
}
public bool IsFixedSize
{
get
{
return true;
}
}
public bool IsReadOnly
{
get
{
return true;
}
}
public bool IsSynchronized
{
get
{
throw new NotImplementedException();
}
}
public object this[int index]
{
get
{
return EntitySet.GetEntity(TableIndex, index);
}
set
{
throw new EntityBoundCollectionCannotBeChangedException();
}
}
public void Remove(object val)
{
throw new EntityBoundCollectionCannotBeChangedException();
}
public void RemoveAt(int index)
{
throw new EntityBoundCollectionCannotBeChangedException();
}
public object SyncRoot
{
get
{
throw new NotImplementedException();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -