public _Iterator4Impl_82(NonblockingQueue _enclosing, List4 origInsertionPoint, List4 origNext, List4 baseArg1) : base(baseArg1) { this._enclosing = _enclosing; this.origInsertionPoint = origInsertionPoint; this.origNext = origNext; }
internal void Add(WeakReferenceHandler reference) { lock (this) { _list = new List4(_list, reference); } }
public virtual object NextMatching(IPredicate4 condition) { if (null == condition) { throw new ArgumentNullException(); } List4 current = _next; List4 previous = null; while (null != current) { object element = ((object)current._element); if (condition.Match(element)) { if (previous == null) { RemoveNext(); } else { previous._next = ((List4)current._next); } return(element); } previous = current; current = ((List4)current._next); } return(null); }
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); } } }
public void Clear() { _first = null; _last = null; _size = 0; Changed(); }
public virtual IEnumerator Iterator() { List4 origInsertionPoint = _insertionPoint; List4 origNext = _next; return(new _Iterator4Impl_82(this, origInsertionPoint, origNext, _next)); }
private void RemoveNext() { _next = ((List4)_next._next); if (_next == null) { _insertionPoint = null; } }
private void RemoveNext() { _next = ((List4)_next._next); if (_next == null) { _insertionPoint = null; } }
private void RemoveNext() { _next = _next._next; if (_next == null) { _insertionPoint = null; } }
public void PlayCommandList(List4 commandList) { while (commandList != null) { IIoCommand ioCommand = (IIoCommand)commandList._element; ioCommand.Replay(_bin); commandList = commandList._next; } }
public virtual void ReplaceByIdentity(object oldObject, object newObject) { List4 list = FindByIdentity(oldObject); if (list != null) { list._element = newObject; } }
public virtual object Pop() { if (_tail == null) { throw new InvalidOperationException(); } object res = _tail._element; _tail = ((List4)_tail._next); return res; }
public static IEnumerator Revert(IEnumerator iterator) { iterator.Reset(); List4 tail = null; while (iterator.MoveNext()) { tail = new List4(tail, iterator.Current); } return(Iterate(tail)); }
/// <summary>makes sure the passed object is in the Collection.</summary> /// <remarks>makes sure the passed object is in the Collection. equals() comparison.</remarks> public object Ensure(object element) { List4 list = Find(element); if (list == null) { Add(element); return(element); } return((object)list._element); }
public virtual bool MoveNext() { if (_next == null) { _current = Iterators.NoElement; return(false); } _current = _next._element; _next = _next._next; return(true); }
public virtual bool MoveNext() { if (_next == null) { _current = Iterators.NoElement; return false; } _current = _next._element; _next = _next._next; return true; }
public virtual bool MoveNext() { if (_next == null) { _current = Iterators.NoElement; return(false); } _current = ((object)_next._element); _next = ((List4)_next._next); return(true); }
public static int Size(List4 list) { var counter = 0; var nextList = list; while (nextList != null) { counter++; nextList = nextList._next; } return counter; }
public virtual object Pop() { if (_tail == null) { throw new InvalidOperationException(); } object res = _tail._element; _tail = ((List4)_tail._next); return(res); }
public virtual bool MoveNext() { if (_next == null) { _current = Iterators.NoElement; return false; } _current = ((object)_next._element); _next = ((List4)_next._next); return true; }
private void DoPrepend(object element) { if (_first == null) { DoAdd(element); } else { _first = new List4(_first, element); _size++; } }
private void DoPrepend(object element) { if (_first == null) { DoAdd(element); } else { _first = new List4(_first, element); _size++; } }
public static int Size(List4 list) { var counter = 0; var nextList = list; while (nextList != null) { counter++; nextList = nextList._next; } return(counter); }
public void Add(object obj) { List4 newNode = new List4(null, obj); if (_insertionPoint == null) { _next = newNode; } else { _insertionPoint._next = newNode; } _insertionPoint = newNode; }
public virtual void DoNotInclude() { Include(false); if (_dependants != null) { IEnumerator i = new Iterator4Impl(_dependants); _dependants = null; while (i.MoveNext()) { ((IInternalCandidate)i.Current).DoNotInclude(); } } }
private List4 Find(object obj) { List4 current = _first; while (current != null) { if (current.Holds(obj)) { return(current); } current = ((List4)current._next); } return(null); }
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++; }
private List4 FindByIdentity(object obj) { List4 current = _first; while (current != null) { if (((object)current._element) == obj) { return(current); } current = ((List4)current._next); } return(null); }
public void Add(object obj) { List4 newNode = new List4(null, obj); if (_insertionPoint == null) { _next = newNode; } else { _insertionPoint._next = newNode; } _insertionPoint = newNode; }
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++; }
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()); }
private void AdjustOnRemoval(List4 previous, List4 removed) { if (removed == _first) { _first = ((List4)removed._next); } else { previous._next = ((List4)removed._next); } if (removed == _last) { _last = previous; } }
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; }
public virtual int IndexOf(object obj) { int index = 0; List4 current = _first; while (current != null) { if (current.Holds(obj)) { return(index); } index++; current = ((List4)current._next); } return(-1); }
public virtual object Get(int index) { if (index < 0) { throw new ArgumentException(); } List4 cur = _first; while (index > 0 && cur != null) { cur = ((List4)cur._next); index--; } if (cur == null) { throw new ArgumentException(); } return((object)cur._element); }
/// <summary> /// removes an object from the Collection equals() comparison returns the /// removed object or null, if none found /// </summary> public virtual bool Remove(object a_object) { List4 previous = null; List4 current = _first; while (current != null) { if (current.Holds(a_object)) { _size--; AdjustOnRemoval(previous, current); Changed(); return(true); } previous = current; current = ((List4)current._next); } return(false); }
public Iterator4Impl(List4 first) { _first = first; _next = first; _current = Iterators.NoElement; }
public void StillToActivate(IActivationContext context) { // TODO: We don't want the simple classes to search the hc_tree // Kick them out here. // if (a_object != null) { // Class clazz = a_object.getClass(); // if(! clazz.isPrimitive()){ if (ProcessedByImmediateActivation(context)) { return; } _stillToActivate = StillTo1(context.Transaction(), _stillToActivate, context.TargetObject (), context.Depth()); }
public void StillToDeactivate(Transaction trans, object a_object, IActivationDepth a_depth, bool a_forceUnknownDeactivate) { _stillToDeactivate = StillTo1(trans, _stillToDeactivate, a_object, a_depth); }
public virtual void Reset() { _next = _first; _current = Iterators.NoElement; }
public Iterator4Impl(List4 first) { _first = first; _next = first; _current = Iterators.NoElement; }
public virtual void Reset() { _next = _first; _current = Iterators.NoElement; }
public Collection4Iterator(Collection4 collection, List4 first) : base(first) { _collection = collection; _initialVersion = CurrentVersion(); }
public virtual void Push(object obj) { _tail = new List4(_tail, obj); }
public static IEnumerator Revert(IEnumerator iterator) { iterator.Reset(); List4 tail = null; while (iterator.MoveNext()) { tail = new List4(tail, iterator.Current); } return Iterate(tail); }
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(); }
internal virtual Db4objects.Db4o.Internal.Query.Processor.QCon AddConstraint(Db4objects.Db4o.Internal.Query.Processor.QCon a_child) { _children = new List4(_children, a_child); return a_child; }
// 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); }
internal void ProcessPendingClassUpdates() { if (_pendingClassUpdates == null) { return; } IEnumerator i = new Iterator4Impl(_pendingClassUpdates); while (i.MoveNext()) { ClassMetadata classMetadata = (ClassMetadata)i.Current; classMetadata.SetStateDirty(); classMetadata.Write(_systemTransaction); } _pendingClassUpdates = null; }
public List4(List4 next, object element) { _next = next; _element = element; }
internal void ActivatePending(Transaction ta) { while (_stillToActivate != null) { // TODO: Optimize! A lightweight int array would be faster. IEnumerator i = new Iterator4Impl(_stillToActivate); _stillToActivate = null; while (i.MoveNext()) { ObjectContainerBase.PendingActivation item = (ObjectContainerBase.PendingActivation )i.Current; ObjectReference @ref = item.@ref; object obj = @ref.GetObject(); if (obj == null) { ta.RemoveReference(@ref); } else { @ref.ActivateInternal(ActivationContextFor(ta, obj, item.depth)); } } } }
/// <summary> /// returns the first object found in the Collections that equals() the /// passed object /// </summary> public object Get(object element) { List4 holder = Find(element); return(holder == null ? null : ((object)holder._element)); }
internal virtual void StillToSet(Transaction transaction, ObjectReference @ref, IUpdateDepth updateDepth) { if (StackIsSmall()) { if (@ref.ContinueSet(transaction, updateDepth)) { return; } } _stillToSet = new List4(_stillToSet, new ObjectContainerBase.PendingSet(transaction , @ref, updateDepth)); }
public Collection4Iterator(Collection4 collection, List4 first) : base(first) { _collection = collection; _initialVersion = CurrentVersion(); }
public _Iterator4Impl_82(NonblockingQueue _enclosing, List4 origInsertionPoint, List4 origNext, List4 baseArg1) : base(baseArg1) { this._enclosing = _enclosing; this.origInsertionPoint = origInsertionPoint; this.origNext = origNext; }
internal virtual void AddDependant(QCandidate a_candidate) { _dependants = new List4(_dependants, a_candidate); }
private void DeactivatePending(Transaction trans) { while (_stillToDeactivate != null) { IEnumerator i = new Iterator4Impl(_stillToDeactivate); _stillToDeactivate = null; while (i.MoveNext()) { ObjectContainerBase.PendingActivation item = (ObjectContainerBase.PendingActivation )i.Current; [email protected](trans, item.depth); } } }
public virtual void Add(object obj) { _objects = new List4(_objects, obj); }
internal void AddConstraint(QCon a_constraint) { _constraints = new List4(_constraints, a_constraint); }