Esempio n. 1
0
 public SimpleRemoveDelayedOperation(PersistentSet enclosingInstance, object value)
 {
     this.enclosingInstance = enclosingInstance;
     this.value             = value;
 }
Esempio n. 2
0
		public void DisassembleAndAssemble()
		{
			using (ISession s = OpenSession())
			{
				ISessionImplementor si = (ISessionImplementor) s;
				PersistentSet set = new PersistentSet(si, new ListSet());

				set.Add(10);
				set.Add(20);

				CollectionPersisterStub collectionPersister = new CollectionPersisterStub();
				collectionPersister.ElementType = NHibernateUtil.Int32;

				object disassembled = set.Disassemble(collectionPersister);

				PersistentSet assembledSet = new PersistentSet(si);
				assembledSet.InitializeFromCache(collectionPersister, disassembled, null);

				Assert.AreEqual(2, assembledSet.Count);
				Assert.IsTrue(assembledSet.Contains(10));
				Assert.IsTrue(assembledSet.Contains(20));
			}
		}
Esempio n. 3
0
 public ClearDelayedOperation(PersistentSet enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }