예제 #1
0
 /// <summary>Adds the files to the current job.</summary>
 /// <param name="files">The files.</param>
 internal void AddFiles(BGFileInfo[] files)
 {
     try
     {
         uint count = Convert.ToUInt32(files.Length);
         this.Job.AddFileSet(count, files);
     }
     catch (COMException exception)
     {
         this.manager.PublishException(this, exception);
     }
 }
예제 #2
0
        /// <summary>Adds the files the current <c>BitsJob</c>.</summary>
        /// <param name="files">The files.</param>
        public void AddFiles(Collection<BitsFileInfo> files)
        {
            if (files == null)
            {
                throw new ArgumentNullException("files");
            }

            var fileArray = new BGFileInfo[files.Count];
            for (int i = 0; i < files.Count; i++)
            {
                fileArray[i] = files[i].BGFileInfo;
            }

            this.AddFiles(fileArray);
        }