📄 collectioncacheentry.cs
字号:
using System;
using NHibernate.Collection;
using NHibernate.Persister.Collection;
using NHibernate.Util;
namespace NHibernate.Cache.Entry
{
[Serializable]
public class CollectionCacheEntry
{
private readonly object state;
public CollectionCacheEntry(IPersistentCollection collection, ICollectionPersister persister)
{
state = collection.Disassemble(persister);
}
internal CollectionCacheEntry(object state)
{
this.state = state;
}
public virtual object[] State
{
get { return (object[])state; }//TODO: assumes all collections disassemble to an array!
}
public virtual void Assemble(IPersistentCollection collection, ICollectionPersister persister, object owner)
{
collection.InitializeFromCache(persister, state, owner);
collection.AfterInitialize(persister);
}
public override string ToString()
{
return "CollectionCacheEntry" + ArrayHelper.ToString(State);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -