lastBlockCount is called lastBlockEndIndex again (anyone got a better term - it's an index one past the last entry, not a count); implemented the CopyTo() method; added unit tests for the CopyTo() method

git-svn-id: file:///srv/devel/repo-conversion/nusu@164 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2009-07-14 21:08:10 +00:00
parent 3ee5fdfc67
commit 0b23b1f7c4
6 changed files with 120 additions and 31 deletions

View file

@ -61,7 +61,7 @@ namespace Nuclex.Support.Collections {
/// <summary>Whether the deque is read-only</summary>
bool IList.IsReadOnly {
get { throw new NotImplementedException(); }
get { return false; }
}
/// <summary>Removes the specified item from the deque</summary>
@ -106,7 +106,11 @@ namespace Nuclex.Support.Collections {
/// <param name="array">Array the contents of the deque will be copied into</param>
/// <param name="index">Index at which writing into the array will begin</param>
void ICollection.CopyTo(Array array, int index) {
throw new NotImplementedException();
if(!(array is ItemType[])) {
throw new ArgumentException("Incompatible array type", "array");
}
CopyTo((ItemType[])array, index);
}
/// <summary>Whether the deque is thread-synchronized</summary>