/// <summary> Copies the elements of the <see cref="ICollection{T}" /> to an <see cref="Array" />, starting at a particular <see cref="Array" /> index. /// </summary> <param name="array">The one-dimensional <see cref="Array" /> that is the destination of the elements copied from <see /// cref="ICollection{T}" />. 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> <exception cref="NotImplementedException"></exception> void ICollection <BackgroundCopyJob> .CopyTo(BackgroundCopyJob[] array, int arrayIndex) { var ijobs = BackgroundCopyManager.EnumJobs((BG_JOB_ENUM)JobListRights); var cnt = ijobs.GetCount(); Array.Copy(Array.ConvertAll(ijobs.Next(cnt), i => new BackgroundCopyJob(i)), 0, array, arrayIndex, cnt); }
/// <summary>Returns an enumerator that iterates through the collection.</summary> /// <returns>A <see cref="IEnumerator{T}"/> that can be used to iterate through the collection.</returns> public IEnumerator <BackgroundCopyJob> GetEnumerator() { var ienum = BackgroundCopyManager.EnumJobs((BG_JOB_ENUM)JobListRights); return(new Enumerator(ienum)); }