Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

PriorityQueue.Add Method

Inserts the specified element into this queue if it is possible to do so immediately without violating capacity restrictions, returning upon success and throwing an InvalidOperationException if no space is currently available.

[Visual Basic]
Public Overrides Sub Add( _
   ByVal objectToAdd As Object _
) _
    Implements IQueue.Add
[C#]
public override bool Add(
   object objectToAdd
);

Parameters

objectToAdd
The element to add.

Return Value

if successful.

Implements

IQueue.Add

Exceptions

Exception Type Condition
InvalidOperationException If the element cannot be added at this time due to capacity restrictions.
ArgumentNullException If the specified element is and this queue does not permit elements.
ArgumentException If some property of the supplied objectToAdd prevents it from being added to this queue.
InvalidCastException if the specified element cannot be compared with elements currently in the priority queue according to the priority queue's ordering.

See Also

PriorityQueue Class | Spring.Collections Namespace