RelatedEnd.ValidateEntityForAttach<TEntity> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷物件是否能附加到本地集合或參考中。
protected public:
generic <typename TEntity>
void ValidateEntityForAttach(TEntity entity, int index, bool allowCollection);
protected internal void ValidateEntityForAttach<TEntity>(TEntity entity, int index, bool allowCollection);
member this.ValidateEntityForAttach : 'Entity * int * bool -> unit
Protected Friend Sub ValidateEntityForAttach(Of TEntity) (entity As TEntity, index As Integer, allowCollection As Boolean)
類型參數
- TEntity
要驗證的物件類型。
參數
- entity
- TEntity
被驗證的物件。
- index
- Int32
被驗證物件在集合中的位置。
- allowCollection
- Boolean
表示該物件是否屬於集合。
例外狀況
備註
ValidateEntityForAttach<TEntity>此方法由物件服務在連接操作中呼叫。