本文整理汇总了C#中Db4objects.Db4o.Foundation.Collection4类的典型用法代码示例。如果您正苦于以下问题:C# Collection4类的具体用法?C# Collection4怎么用?C# Collection4使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Collection4类属于Db4objects.Db4o.Foundation命名空间,在下文中一共展示了Collection4类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Process
internal virtual void Process(ClassMetadata newClassMetadata)
{
if (_pending.Contains(newClassMetadata))
{
return;
}
ClassMetadata ancestor = newClassMetadata.GetAncestor();
if (ancestor != null)
{
Process(ancestor);
}
_pending.Add(newClassMetadata);
_members.Add(newClassMetadata);
if (_running)
{
return;
}
_running = true;
try
{
CheckInits();
_pending = new Collection4();
}
finally
{
_running = false;
}
}
示例2: CommitCapturingUpdatedObjects
private Collection4 CommitCapturingUpdatedObjects(IExtObjectContainer container)
{
var updated = new Collection4();
EventRegistryFor(container).Updated += new _IEventListener4_51(updated).OnEvent;
container.Commit();
return updated;
}
示例3: _IRunnable_23
public _IRunnable_23(DynamicVariableTestCase _enclosing, DynamicVariable variable
, Collection4 failures)
{
this._enclosing = _enclosing;
this.variable = variable;
this.failures = failures;
}
示例4: TestContainsAll
public virtual void TestContainsAll()
{
var a = new Item(42);
var b = new Item(a.id + 1);
var c = new Item(b.id + 1);
var a_ = new Item(a.id);
var needle = new Collection4();
var haystack = new Collection4();
haystack.Add(a);
needle.Add(a);
needle.Add(b);
Assert.IsFalse(haystack.ContainsAll(needle));
needle.Remove(b);
Assert.IsTrue(haystack.ContainsAll(needle));
needle.Add(b);
haystack.Add(b);
Assert.IsTrue(haystack.ContainsAll(needle));
needle.Add(a_);
Assert.IsTrue(haystack.ContainsAll(needle));
needle.Add(c);
Assert.IsFalse(haystack.ContainsAll(needle));
needle.Clear();
Assert.IsTrue(haystack.ContainsAll(needle));
haystack.Clear();
Assert.IsTrue(haystack.ContainsAll(needle));
}
示例5: Test
public virtual void Test()
{
Collection4 expected = new Collection4(new object[] { "PING", true, 42 });
MessagingTestCaseBase.MessageCollector recipient = new MessagingTestCaseBase.MessageCollector
();
IObjectServer server = OpenServerWith(recipient);
try
{
IObjectContainer client = OpenClient("client", server);
try
{
IMessageSender sender = MessageSender(client);
SendAll(expected, sender);
}
finally
{
client.Close();
}
}
finally
{
server.Close();
}
Assert.AreEqual(expected.ToString(), recipient.messages.ToString());
}
示例6: CacheDirty
internal virtual void CacheDirty(Collection4 col)
{
if (!BitIsTrue(Const4.CachedDirty))
{
BitTrue(Const4.CachedDirty);
col.Add(this);
}
}
示例7: CommitCapturingUpdatedObjects
private Collection4 CommitCapturingUpdatedObjects(IExtObjectContainer container)
{
Collection4 updated = new Collection4();
EventRegistryFor(container).Updated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
(new _IEventListener4_51(updated).OnEvent);
container.Commit();
return updated;
}
示例8: CollectKnownClasses
private void CollectKnownClasses(Collection4 collector, IEnumerator knownClasses)
{
while (knownClasses.MoveNext())
{
IReflectClass clazz = (IReflectClass)knownClasses.Current;
CollectKnownClass(collector, clazz);
}
}
示例9: AddListener
public virtual void AddListener(IDiagnosticListener listener)
{
if (_listeners == null)
{
_listeners = new Collection4();
}
_listeners.Add(listener);
}
示例10: TestMultiThread
public virtual void TestMultiThread()
{
DynamicVariable variable = new DynamicVariable();
Collection4 failures = new Collection4();
variable.With("mine", new _IRunnable_23(this, variable, failures));
Assert.IsNull(variable.Value);
Assert.IsTrue(failures.IsEmpty(), failures.ToString());
}
示例11: 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);
}
}
示例12: TestFieldTraversal
public virtual void TestFieldTraversal()
{
Collection4 expectedNames = new Collection4(new ArrayIterator4(new string[] { "_id"
, "_name", "_age" }));
ClassMetadata classMetadata = ClassMetadataFor(typeof(ClassMetadataIntegrationTestCase.SubClazz
));
classMetadata.TraverseAllAspects(new _TraverseFieldCommand_31(expectedNames));
Assert.IsTrue(expectedNames.IsEmpty());
}
示例13: ExcludingReflector
public ExcludingReflector(Type[] excludedClasses)
{
_excludedClasses = new Collection4();
for (var claxxIndex = 0; claxxIndex < excludedClasses.Length; ++claxxIndex)
{
var claxx = excludedClasses[claxxIndex];
_excludedClasses.Add(claxx.FullName);
}
}
示例14: Range
private Collection4 Range(int end)
{
var range = new Collection4();
for (var i = 0; i < end; ++i)
{
range.Add(i);
}
return range;
}
示例15: NewIterator
private CompositeIterator4 NewIterator()
{
Collection4 iterators = new Collection4();
iterators.Add(IntArrays4.NewIterator(new int[] { 1, 2, 3 }));
iterators.Add(IntArrays4.NewIterator(new int[] { }));
iterators.Add(IntArrays4.NewIterator(new int[] { 4 }));
iterators.Add(IntArrays4.NewIterator(new int[] { 5, 6 }));
CompositeIterator4 iterator = new CompositeIterator4(iterators.GetEnumerator());
return iterator;
}