本文整理汇总了C#中Db4objects.Db4o.Foundation.ByRef类的典型用法代码示例。如果您正苦于以下问题:C# ByRef类的具体用法?C# ByRef怎么用?C# ByRef使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ByRef类属于Db4objects.Db4o.Foundation命名空间,在下文中一共展示了ByRef类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _IVisitor4_29
public _IVisitor4_29(OverlapMap _enclosing, ByRef prevSlot, Sharpen.Util.ISet overlaps
)
{
this._enclosing = _enclosing;
this.prevSlot = prevSlot;
this.overlaps = overlaps;
}
示例2: _ICodeBlock_34
public _ICodeBlock_34(SaveAsStorageTestCase _enclosing, string oldFileName, ByRef
newPath)
{
this._enclosing = _enclosing;
this.oldFileName = oldFileName;
this.newPath = newPath;
}
示例3: TestOnDiscard
public virtual void TestOnDiscard()
{
CacheTestUnit.TestPuppet puppet = new CacheTestUnit.TestPuppet();
puppet.FillCache();
ByRef discarded = new ByRef();
puppet.Produce(42, new _IProcedure4_19(discarded));
Assert.AreEqual("0", ((string)discarded.value));
}
示例4: ExcludingReflector
public ExcludingReflector(ByRef loaderClass, Type[] excludedClasses)
{
_excludedClasses = new Collection4();
for (int claxxIndex = 0; claxxIndex < excludedClasses.Length; ++claxxIndex)
{
Type claxx = excludedClasses[claxxIndex];
_excludedClasses.Add(claxx.FullName);
}
}
示例5: TestReentrantUpdateThrows
public virtual void TestReentrantUpdateThrows()
{
var updatedTriggered = new ByRef();
updatedTriggered.value = false;
var registry = EventRegistryFactory.ForObjectContainer(Db());
registry.Updated += new _IEventListener4_102(this, updatedTriggered).OnEvent;
var items = QueryItemsByName("foo");
Assert.AreEqual(1, items.Count);
Assert.IsFalse((((bool) updatedTriggered.value)));
Store(items.Next());
Assert.IsTrue((((bool) updatedTriggered.value)));
}
示例6: Test
//COR-1839
#if !SILVERLIGHT
/// <exception cref="System.Exception"></exception>
public virtual void Test()
{
if (!Platform4.HasWeakReferences())
{
return;
}
WeakReferenceCollectionTestCase.Item item = new WeakReferenceCollectionTestCase.Item
();
Store(item);
Commit();
ByRef reference = new ByRef();
ReferenceSystem().TraverseReferences(new _IVisitor4_30(reference));
Assert.IsNotNull(((ObjectReference)reference.value));
item = null;
long timeout = 10000;
long startTime = Runtime.CurrentTimeMillis();
while (true)
{
long currentTime = Runtime.CurrentTimeMillis();
if (currentTime - startTime >= timeout)
{
Assert.Fail("Timeout waiting for WeakReference collection.");
}
Runtime.Gc();
Runtime.RunFinalization();
Thread.Sleep(1);
if (((ObjectReference)reference.value).GetObject() == null)
{
break;
}
}
startTime = Runtime.CurrentTimeMillis();
while (true)
{
long currentTime = Runtime.CurrentTimeMillis();
if (currentTime - startTime >= timeout)
{
Assert.Fail("Timeout waiting for removal of ObjectReference from ReferenceSystem."
);
}
BooleanByRef found = new BooleanByRef();
ReferenceSystem().TraverseReferences(new _IVisitor4_63(reference, found));
if (!found.value)
{
return;
}
Thread.Sleep(10);
}
}
示例7: TestReflectField
/// <exception cref="System.Exception"></exception>
public virtual void TestReflectField()
{
Store(new OldVersionReflectFieldAfterRefactorTestCase.ItemBefore(IdValue));
Reopen();
FileSession().StoredClass(typeof(OldVersionReflectFieldAfterRefactorTestCase.ItemBefore
)).Rename(typeof(OldVersionReflectFieldAfterRefactorTestCase.ItemAfter).FullName
);
Reopen();
ClassMetadata classMetadata = Container().ClassMetadataForName(typeof(OldVersionReflectFieldAfterRefactorTestCase.ItemAfter
).FullName);
ByRef originalField = new ByRef();
classMetadata.TraverseDeclaredFields(new _IProcedure4_37(originalField));
Assert.AreEqual(typeof(int).FullName, ((FieldMetadata)originalField.value).GetStoredType
().GetName());
}
示例8: TestExistingFileWillNotBeOverWritten
public virtual void TestExistingFileWillNotBeOverWritten()
{
Db().Store(new Item(1));
var oldFileName = FileSession().FileName();
var newPath = new ByRef();
try
{
newPath.value = Path.GetTempFileName();
Assert.IsTrue(File.Exists(((string) newPath.value)));
Assert.Expect(typeof (InvalidOperationException), new _ICodeBlock_34(this, oldFileName
, newPath));
AssertItems(Db(), 1);
}
finally
{
File4.Delete(((string) newPath.value));
}
}
示例9: TestReentrantUpdateThrows
public virtual void TestReentrantUpdateThrows()
{
ByRef updatedTriggered = new ByRef();
updatedTriggered.value = false;
IEventRegistry registry = EventRegistryFactory.ForObjectContainer(Db());
registry.Updated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
(new _IEventListener4_102(this, updatedTriggered).OnEvent);
IObjectSet items = QueryItemsByName("foo");
Assert.AreEqual(1, items.Count);
Assert.IsFalse((((bool)updatedTriggered.value)));
Store(items.Next());
Assert.IsTrue((((bool)updatedTriggered.value)));
}
示例10: _IVisitor4_32
public _IVisitor4_32(ByRef mergedSlot, IList mergedSlots)
{
this.mergedSlot = mergedSlot;
this.mergedSlots = mergedSlots;
}
示例11: NewInstance
public static ByRef NewInstance(object initialValue)
{
ByRef instance = new ByRef();
instance.value = initialValue;
return instance;
}
示例12: _IVisitor4_160
public _IVisitor4_160(bool[] innerRes, bool isNot, ByRef pending)
{
this.innerRes = innerRes;
this.isNot = isNot;
this.pending = pending;
}
示例13: _IVisitor4_173
public _IVisitor4_173(ByRef pending)
{
this.pending = pending;
}
示例14: _TraverseFieldCommand_1056
public _TraverseFieldCommand_1056(string name, ByRef byReference)
{
this.name = name;
this.byReference = byReference;
}
示例15: _IVisitor4_107
public _IVisitor4_107(ByRef ids)
{
this.ids = ids;
}