public virtual long CollectFor(LocalObjectContainer db, int id, ISlotMap slotMap) { object bigSet = db.GetByID(id); db.Activate(bigSet, 1); BTree btree = (BTree)Reflection4.GetFieldValue(bigSet, "_bTree"); return(FileUsageStatsCollector.BTreeUsage(db, btree, slotMap)); }
private void AssertRetrievedItem(IDictionary <string, int> dict) { #if CF Assert.IsFalse(Db().IsActive(dict)); string[] keys = (string[])Reflection4.GetFieldValue(dict, "_keys"); AssertInitalArray(keys, 16); int[] values = (int[])Reflection4.GetFieldValue(dict, "_values"); AssertInitalArray(values, 16); #else Assert.IsNull(Reflection4.GetFieldValue(dict, "_keys")); Assert.IsNull(Reflection4.GetFieldValue(dict, "_values")); #endif Assert.AreEqual(default(int), Reflection4.GetFieldValue(dict, "_size")); }
private void WithCache(IProcedure4 procedure) { IClientSlotCache clientSlotCache = null; try { clientSlotCache = (IClientSlotCache)Reflection4.GetFieldValue(Container(), "_clientSlotCache" ); } catch (ReflectException e) { Assert.Fail("Can't get field _clientSlotCache on container. " + e.ToString()); } procedure.Apply(clientSlotCache); }
private static object GetField(object obj, string fieldName) { return(Reflection4.GetFieldValue(obj, fieldName)); }
private static object FieldValue(object parent, string fieldName) { return((object)Reflection4.GetFieldValue(parent, fieldName)); }
/// <exception cref="System.MemberAccessException"></exception> public static BTree BTree(Db4objects.Db4o.Collections.ISet <BigSetTestCase.Item> set ) { return((BTree)Reflection4.GetFieldValue(set, "_bTree")); }
/// <exception cref="System.MemberAccessException"></exception> public static BTree BTree(Db4o.Collections.ISet <Item> set ) { return((BTree)Reflection4.GetFieldValue(set, "_bTree")); }