本文整理汇总了C#中Db4objects.Db4o.Foundation.List4类的典型用法代码示例。如果您正苦于以下问题:C# List4类的具体用法?C# List4怎么用?C# List4使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
List4类属于Db4objects.Db4o.Foundation命名空间,在下文中一共展示了List4类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
internal void Add(WeakReferenceHandler reference)
{
lock (this)
{
_list = new List4(_list, reference);
}
}
示例2: Poll
internal void Poll(ObjectContainerBase objectContainer) {
List4 remove = null;
lock(this){
System.Collections.IEnumerator i = new Iterator4Impl(_list);
_list = null;
while(i.MoveNext()){
WeakReferenceHandler refHandler = (WeakReferenceHandler)i.Current;
if(refHandler.IsAlive){
_list = new List4(_list, refHandler);
}else{
remove = new List4(remove, refHandler.ObjectReference);
}
}
}
System.Collections.IEnumerator j = new Iterator4Impl(remove);
while (j.MoveNext())
{
lock (objectContainer.Lock())
{
if (objectContainer.IsClosed())
{
return;
}
objectContainer.RemoveFromAllReferenceSystems(j.Current);
}
}
}
示例3: RemoveNext
private void RemoveNext()
{
_next = ((List4)_next._next);
if (_next == null)
{
_insertionPoint = null;
}
}
示例4: PlayCommandList
public void PlayCommandList(List4 commandList)
{
while (commandList != null)
{
IIoCommand ioCommand = (IIoCommand)commandList._element;
ioCommand.Replay(_bin);
commandList = commandList._next;
}
}
示例5: Pop
public virtual object Pop()
{
if (_tail == null)
{
throw new InvalidOperationException();
}
object res = _tail._element;
_tail = ((List4)_tail._next);
return res;
}
示例6: MoveNext
public virtual bool MoveNext()
{
if (_next == null)
{
_current = Iterators.NoElement;
return false;
}
_current = ((object)_next._element);
_next = ((List4)_next._next);
return true;
}
示例7: Size
public static int Size(List4 list)
{
var counter = 0;
var nextList = list;
while (nextList != null)
{
counter++;
nextList = nextList._next;
}
return counter;
}
示例8: DoPrepend
private void DoPrepend(object element)
{
if (_first == null)
{
DoAdd(element);
}
else
{
_first = new List4(_first, element);
_size++;
}
}
示例9: Add
public void Add(object obj)
{
List4 newNode = new List4(null, obj);
if (_insertionPoint == null)
{
_next = newNode;
}
else
{
_insertionPoint._next = newNode;
}
_insertionPoint = newNode;
}
示例10: DoAdd
private void DoAdd(object element)
{
if (_last == null)
{
_first = new List4(element);
_last = _first;
}
else
{
_last._next = new List4(element);
_last = ((List4)_last._next);
}
_size++;
}
示例11: ReadCommandList
public List4 ReadCommandList()
{
List4 list = null;
StreamReader reader = new StreamReader(_logFilePath);
String line = null;
while ((line = reader.ReadLine()) != null)
{
IIoCommand ioCommand = ReadLine(line);
if (ioCommand != null)
{
list = new List4(list, ioCommand);
}
}
reader.Close();
return list;
}
示例12: _Iterator4Impl_82
public _Iterator4Impl_82(NonblockingQueue _enclosing, List4 origInsertionPoint, List4
origNext, List4 baseArg1) : base(baseArg1)
{
this._enclosing = _enclosing;
this.origInsertionPoint = origInsertionPoint;
this.origNext = origNext;
}
示例13: Iterate
public static IEnumerator Iterate(List4 list)
{
if (list == null)
{
return EmptyIterator;
}
Collection4 collection = new Collection4();
while (list != null)
{
collection.Add(list._element);
list = ((List4)list._next);
}
return collection.GetEnumerator();
}
示例14: Iterator4Impl
public Iterator4Impl(List4 first)
{
_first = first;
_next = first;
_current = Iterators.NoElement;
}
示例15: ExchangeConstraint
// virtual
internal virtual void ExchangeConstraint(Db4objects.Db4o.Internal.Query.Processor.QCon
a_exchange, Db4objects.Db4o.Internal.Query.Processor.QCon a_with)
{
List4 previous = null;
List4 current = _children;
while (current != null)
{
if (current._element == a_exchange)
{
if (previous == null)
{
_children = ((List4)current._next);
}
else
{
previous._next = ((List4)current._next);
}
}
previous = current;
current = ((List4)current._next);
}
_children = new List4(_children, a_with);
}