/// <summary> /// Copies the entire collection to a compatible one-dimensional array, starting at the beginning of the target array. /// </summary> /// <param name="array"> /// The one-dimensional <see cref="Array"/> that is the destination of the elements copied from this dictionary. /// The <see cref="Array"/> must have zero-based indexing. /// </param> public void CopyTo( MessagePackObject[] array ) { if ( array == null ) { throw new ArgumentNullException( "array" ); } CollectionOperation.CopyTo( this, this.Count, 0, array, 0, this.Count ); }
void ICollection.CopyTo(Array array, int index) { DictionaryEntry[] entryArray = array as DictionaryEntry[]; if (entryArray != null) { CollectionOperation.CopyTo <KeyValuePair <MessagePackObject, MessagePackObject>, DictionaryEntry>(this, this.Count, 0, entryArray, index, array.Length, kv => new DictionaryEntry(kv.Key, kv.Value)); } else { CollectionOperation.CopyTo <KeyValuePair <MessagePackObject, MessagePackObject> >(this, this.Count, array, index); } }
/// <summary> /// Copies the entire collection to a compatible one-dimensional array, starting at the beginning of the target array. /// </summary> /// <param name="array"> /// The one-dimensional <see cref="Array"/> that is the destination of the elements copied from this dictionary. /// The <see cref="Array"/> must have zero-based indexing. /// </param> public void CopyTo(MessagePackObject[] array) { if (array == null) { throw new ArgumentNullException("array"); } #if !UNITY Contract.EndContractBlock(); #endif // !UNITY CollectionOperation.CopyTo(this, this.Count, 0, array, 0, this.Count); }
/// <summary> /// Copies a range of elements from this collection to a compatible one-dimensional array, /// starting at the specified index of the target array. /// </summary> /// <param name="index"> /// The zero-based index in the source dictionary at which copying begins. /// </param> /// <param name="array"> /// The one-dimensional <see cref="Array"/> that is the destination of the elements copied from this dictionary. /// The <see cref="Array"/> must have zero-based indexing. /// </param> /// <param name="arrayIndex"> /// The zero-based index in <paramref name="array"/> at which copying begins. /// </param> /// <param name="count"> /// The number of elements to copy. /// </param> public void CopyTo(int index, MessagePackObject[] array, int arrayIndex, int count) { if (array == null) { throw new ArgumentNullException("array"); } if (index < 0) { throw new ArgumentOutOfRangeException("index"); } if (0 < this.Count && this.Count <= index) { throw new ArgumentException("Specified array is too small to complete copy operation.", "array"); } if (arrayIndex < 0) { throw new ArgumentOutOfRangeException("arrayIndex"); } if (count < 0) { throw new ArgumentOutOfRangeException("count"); } if (array.Length - count <= arrayIndex) { throw new ArgumentException("Specified array is too small to complete copy operation.", "array"); } #if !UNITY Contract.EndContractBlock(); #endif // !UNITY CollectionOperation.CopyTo(this, this.Count, index, array, arrayIndex, count); }
void ICollection <KeyValuePair <MessagePackObject, MessagePackObject> > .CopyTo(KeyValuePair <MessagePackObject, MessagePackObject>[] array, int arrayIndex) { CollectionOperation.CopyTo(this, this.Count, 0, array, arrayIndex, this.Count); }
void ICollection.CopyTo(Array array, int arrayIndex) { CollectionOperation.CopyTo(this, this.Count, array, arrayIndex); }
/// <summary> /// Copies the entire collection to a compatible one-dimensional array, /// starting at the specified index of the target array. /// </summary> /// <param name="array"> /// The one-dimensional <see cref="Array"/> that is the destination of the elements copied from this dictionary. /// The <see cref="Array"/> must have zero-based indexing. /// </param> /// <param name="arrayIndex"> /// The zero-based index in <paramref name="array"/> at which copying begins. /// </param> public void CopyTo(MessagePackObject[] array, int arrayIndex) { CollectionOperation.CopyTo(this, this.Count, 0, array, arrayIndex, this.Count); }
void ICollection.CopyTo(Array array, int arrayIndex) { CollectionOperation.CopyTo <MessagePackObject>(this, this.Count, array, arrayIndex); }