Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Collections
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13657/Collections
Modified Files:
AbstractQueue.cs PriorityQueue.cs
Log Message:
reactivated warning 1591 "missing XML doc comment"
excluded unused Spring.Core/Spring.Expressions.Parser/ExpressionParserTokenTypes..cs from builds
Index: AbstractQueue.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Collections/AbstractQueue.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AbstractQueue.cs 30 Sep 2006 18:39:24 -0000 1.7
--- AbstractQueue.cs 27 Aug 2007 09:38:11 -0000 1.8
***************
*** 72,77 ****
/// </remarks>
protected AbstractQueue()
! {
! }
/// <summary>
--- 72,76 ----
/// </remarks>
protected AbstractQueue()
! {}
/// <summary>
***************
*** 90,94 ****
public virtual bool Add(object objectToAdd)
{
! if (Offer(objectToAdd))
{
return true;
--- 89,93 ----
public virtual bool Add(object objectToAdd)
{
! if(Offer(objectToAdd))
{
return true;
***************
*** 119,123 ****
{
object element = Poll();
! if (element != null)
{
return element;
--- 118,122 ----
{
object element = Poll();
! if(element != null)
{
return element;
***************
*** 151,155 ****
{
object element = Peek();
! if (element != null)
{
return element;
--- 150,154 ----
{
object element = Peek();
! if(element != null)
{
return element;
***************
*** 160,163 ****
--- 159,163 ----
}
}
+
/// <summary>
/// Removes all of the elements from this queue.
***************
*** 175,179 ****
public virtual void Clear()
{
! while (Poll() != null)
{
;
--- 175,179 ----
public virtual void Clear()
{
! while(Poll() != null)
{
;
***************
*** 217,240 ****
public virtual bool AddAll(ICollection collection)
{
! if (collection == null)
{
throw new ArgumentNullException("Collection cannot be null.");
}
! if (collection == this)
{
throw new ArgumentException();
}
! if ( collection.Count > Capacity )
{
throw new ArgumentException("Collcation size greater than queue capacity.");
}
bool modified = false;
! foreach (object element in collection)
{
! if ( element == null )
{
throw new ArgumentNullException("Cannot add null elements to this queue.");
}
! else if (Add(element))
{
modified = true;
--- 217,240 ----
public virtual bool AddAll(ICollection collection)
{
! if(collection == null)
{
throw new ArgumentNullException("Collection cannot be null.");
}
! if(collection == this)
{
throw new ArgumentException();
}
! if(collection.Count > Capacity)
{
throw new ArgumentException("Collcation size greater than queue capacity.");
}
bool modified = false;
! foreach(object element in collection)
{
! if(element == null)
{
throw new ArgumentNullException("Cannot add null elements to this queue.");
}
! else if(Add(element))
{
modified = true;
***************
*** 244,258 ****
}
public abstract bool Offer(object objectToAdd);
public abstract object Peek();
public abstract object Poll();
public abstract void CopyTo(Array array, int index);
!
! public abstract bool IsEmpty {get;}
! public abstract int Capacity {get;}
public abstract int Count { get; }
public abstract object SyncRoot { get; }
public abstract bool IsSynchronized { get; }
public abstract IEnumerator GetEnumerator();
}
--- 244,346 ----
}
+ /// <summary>
+ /// Inserts the specified element into this queue if it is possible to do
+ /// so immediately without violating capacity restrictions.
+ /// </summary>
+ /// <remarks>
+ /// <p>
+ /// When using a capacity-restricted queue, this method is generally
+ /// preferable to <see cref="Spring.Collections.IQueue.Add(object)"/>,
+ /// which can fail to insert an element only by throwing an exception.
+ /// </p>
+ /// </remarks>
+ /// <param name="objectToAdd">
+ /// The element to add.
+ /// </param>
+ /// <returns>
+ /// <see lang="true"/> if the element was added to this queue.
+ /// </returns>
+ /// <exception cref="System.InvalidOperationException">
+ /// If the element cannot be added at this time due to capacity restrictions.
+ /// </exception>
+ /// <exception cref="System.ArgumentNullException">
+ /// If the supplied <paramref name="objectToAdd"/> is
+ /// <see lang="null"/>.
+ /// </exception>
+ /// <exception cref="System.ArgumentException">
+ /// If some property of the supplied <paramref name="objectToAdd"/> prevents
+ /// it from being added to this queue.
+ /// </exception>
public abstract bool Offer(object objectToAdd);
+
+ /// <summary>
+ /// Retrieves, but does not remove, the head of this queue,
+ /// or returns <see lang="null"/> if this queue is empty.
+ /// </summary>
+ /// <returns>
+ /// The head of this queue, or <see lang="null"/> if this queue is empty.
+ /// </returns>
public abstract object Peek();
+
+ /// <summary>
+ /// Retrieves and removes the head of this queue,
+ /// or returns <see lang="null"/> if this queue is empty.
+ /// </summary>
+ /// <returns>
+ /// The head of this queue, or <see lang="null"/> if this queue is empty.
+ /// </returns>
public abstract object Poll();
+ /// <summary>
+ /// Returns <see lang="true"/> if there are no elements in the <see cref="IQueue"/>, <see lang="false"/> otherwise.
+ /// </summary>
+ public abstract bool IsEmpty { get; }
+
+ /// <summary>
+ /// Returns the current capacity of this queue.
+ /// </summary>
+ public abstract int Capacity { get; }
+
+ ///<summary>
+ ///Copies the elements of the <see cref="T:System.Collections.ICollection"></see> to an <see cref="T:System.Array"></see>, starting at a particular <see cref="T:System.Array"></see> index.
+ ///</summary>
+ ///<param name="array">The one-dimensional <see cref="T:System.Array"></see> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection"></see>. The <see cref="T:System.Array"></see> must have zero-based indexing. </param>
+ ///<param name="index">The zero-based index in array at which copying begins. </param>
+ ///<exception cref="T:System.ArgumentNullException">array is null. </exception>
+ ///<exception cref="T:System.ArgumentOutOfRangeException">index is less than zero. </exception>
+ ///<exception cref="T:System.ArgumentException">array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source <see cref="T:System.Collections.ICollection"></see> is greater than the available space from index to the end of the destination array. </exception>
+ ///<exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.ICollection"></see> cannot be cast automatically to the type of the destination array. </exception><filterpriority>2</filterpriority>
public abstract void CopyTo(Array array, int index);
!
! ///<summary>
! ///Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"></see>.
! ///</summary>
! ///<returns>
! ///The number of elements contained in the <see cref="T:System.Collections.ICollection"></see>.
! ///</returns>
public abstract int Count { get; }
+
+ ///<summary>
+ ///Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"></see>.
+ ///</summary>
+ ///<returns>
+ ///An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"></see>.
+ ///</returns>
public abstract object SyncRoot { get; }
+
+ ///<summary>
+ ///Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection"></see> is synchronized (thread safe).
+ ///</summary>
+ ///<returns>
+ ///true if access to the <see cref="T:System.Collections.ICollection"></see> is synchronized (thread safe); otherwise, false.
+ ///</returns>
public abstract bool IsSynchronized { get; }
+
+ ///<summary>
+ ///Returns an enumerator that iterates through a collection.
+ ///</summary>
+ ///<returns>
+ ///An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection.
+ ///</returns>
public abstract IEnumerator GetEnumerator();
}
Index: PriorityQueue.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Collections/PriorityQueue.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PriorityQueue.cs 30 Sep 2006 18:39:24 -0000 1.5
--- PriorityQueue.cs 27 Aug 2007 09:38:11 -0000 1.6
***************
*** 760,764 ****
#region ICollection Implementation
! public override void CopyTo(Array array, Int32 index)
{
if ( _priorityQueueSize > array.Length ) throw new ArgumentException("Destination array too small.", "array");
--- 760,774 ----
#region ICollection Implementation
!
! ///<summary>
! ///Copies the elements of the <see cref="T:System.Collections.ICollection"></see> to an <see cref="T:System.Array"></see>, starting at a particular <see cref="T:System.Array"></see> index.
! ///</summary>
! ///<param name="array">The one-dimensional <see cref="T:System.Array"></see> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection"></see>. The <see cref="T:System.Array"></see> must have zero-based indexing. </param>
! ///<param name="index">The zero-based index in array at which copying begins. </param>
! ///<exception cref="T:System.ArgumentNullException">array is null. </exception>
! ///<exception cref="T:System.ArgumentOutOfRangeException">index is less than zero. </exception>
! ///<exception cref="T:System.ArgumentException">array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source <see cref="T:System.Collections.ICollection"></see> is greater than the available space from index to the end of the destination array. </exception>
! ///<exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.ICollection"></see> cannot be cast automatically to the type of the destination array. </exception><filterpriority>2</filterpriority>
! public override void CopyTo(Array array,Int32 index)
{
if ( _priorityQueueSize > array.Length ) throw new ArgumentException("Destination array too small.", "array");
***************
*** 774,781 ****
--- 784,806 ----
}
+ ///<summary>
+ ///Copies the elements of the <see cref="T:System.Collections.ICollection"></see> to an <see cref="T:System.Array"></see>, starting at index 0.
+ ///</summary>
+ ///<param name="array">The one-dimensional <see cref="T:System.Array"></see> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection"></see>. The <see cref="T:System.Array"></see> must have zero-based indexing. </param>
+ ///<exception cref="T:System.ArgumentNullException">array is null. </exception>
+ ///<exception cref="T:System.ArgumentOutOfRangeException">index is less than zero. </exception>
+ ///<exception cref="T:System.ArgumentException">array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source <see cref="T:System.Collections.ICollection"></see> is greater than the available space from index to the end of the destination array. </exception>
+ ///<exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.ICollection"></see> cannot be cast automatically to the type of the destination array. </exception><filterpriority>2</filterpriority>
public void CopyTo(Array array)
{
CopyTo(array, 0);
}
+
+ ///<summary>
+ ///Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"></see>.
+ ///</summary>
+ ///<returns>
+ ///An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"></see>.
+ ///</returns>
public override Object SyncRoot
{
***************
*** 784,787 ****
--- 809,818 ----
}
+ ///<summary>
+ ///Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection"></see> is synchronized (thread safe).
+ ///</summary>
+ ///<returns>
+ ///true if access to the <see cref="T:System.Collections.ICollection"></see> is synchronized (thread safe); otherwise, false.
+ ///</returns>
public override Boolean IsSynchronized
{
***************
*** 790,793 ****
--- 821,827 ----
}
+ /// <summary>
+ /// Returns <see lang="true"/> if there are no elements in the <see cref="IQueue"/>, <see lang="false"/> otherwise.
+ /// </summary>
public override bool IsEmpty
{
|