Click or drag to resize

BackgroundCopyJob Class

Provides methods and properties to add files to the job, set the priority level of the job, determine the state of the job, and to start and stop the job.
Inheritance Hierarchy

Namespace:  usis.Net.Bits
Assembly:  usis.Net.Bits (in usis.Net.Bits.dll) Version: (
public sealed class BackgroundCopyJob : IDisposable

The BackgroundCopyJob type exposes the following members.

Public propertyDescription
Gets or sets the description of the job.
Public propertyDisplayName
Gets or sets the display name that identifies the job.
Public propertyErrorCount
Gets the number of times BITS tried to transfer the job and an error occurred.
Public propertyFileAcl
Gets or sets the flags that identify the owner and ACL information to maintain when transferring a file using SMB.
Public propertyHttpOptions
Gets the HTTP options to specify client certificates for certificate-based client authentication and custom headers for HTTP requests.
Public propertyId
Gets the identifier of the job in the queue.
Public propertyJobType
Gets the type of transfer being performed, such as a file download or upload.
Public propertyMaximumDownloadTime
Gets or sets the maximum time that BITS will spend transferring the files in the job.
Public propertyMinimumRetryDelay
Gets or sets the minimum length of time that BITS waits after encountering a transient error condition before trying to transfer the file.
Public propertyNoProgressTimeout
Gets or sets the length of time that BITS tries to transfer the file after a transient error condition occurs. If there is progress, the timer is reset.
Public propertyNotifications
Gets the event notification flags for your application.
Public propertyNotifyCommandLine
Gets or sets the program to execute when the job enters the error or transferred state.
Public propertyOwner
Gets the identity of the job's owner.
Public propertyOwnerElevationState
Gets a value that determines if the token of the owner was elevated at the time they created or took ownership of the job.
Public propertyOwnerIntegrityLevel
Gets the integrity level of the token of the owner that created or took ownership of the job.
Public propertyPeerCachingOptions
Gets or sets options that determine if the files of the job can be cached and served to peers and if BITS can download content for the job from peers.
Public propertyPriority
Gets or sets the priority level for the job.
Public propertyProxySettings
Gets or sets the proxy information that the job uses to transfer the files.
Public propertyReplyFileName
Gets or sets the name of the file to contain the reply data of an upload-reply job.
Public propertyState
Gets the state of the job.
Public methodAddFile(String, String)
Adds a single file to the job.
Public methodAddFile(Uri, String)
Adds a single file to the job.
Public methodAddFile(String, String, BackgroundCopyFileRange)
Adds a file to a download job and specifies the ranges of the file you want to download.
Public methodAddFile(Uri, String, BackgroundCopyFileRange)
Adds a file to a download job and specifies the ranges of the file you want to download.
Public methodAddFile(String, String, Int64, Int64)
Adds a file to a download job and specifies the range of the file you want to download.
Public methodAddFile(Uri, String, Int64, Int64)
Adds a file to a download job and specifies the range of the file you want to download.
Public methodCode exampleAddFiles
Adds multiple files to the job.
Public methodCancel
Deletes the job from the transfer queue and removes related temporary files from the client (downloads) and server (uploads).
Public methodComplete
Ends the job and saves the transferred files on the client.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEnumerateFiles
Enumerates the files in the job.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Finalizes an instance of the BackgroundCopyJob class.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemoveCredentials
Public methodReplaceRemotePrefix
Replaces the beginning text of all remote names in the download job with the specified string.
Public methodResume
Activates a new job or restarts a job that has been suspended.
Public methodRetrieveError
Retrieves error informations after an error occurs.
Public methodRetrieveProgress
Retrieves job-related progress information, such as the number of bytes and files transferred.
Public methodRetrieveReplyData
Retrieves the reply data from the server application.
Public methodRetrieveReplyProgress
Retrieves progress information that indicates how many bytes of the reply file have been downloaded to the client.
Public methodRetrieveTimes
Retrieves job-related time stamps, such as the time that the job was created or last modified.
Public methodSetCredentials
Specifies the credentials to use for a proxy or remote server user authentication request.
Public methodSuspend
Suspends a job. New jobs, jobs that are in error, and jobs that have finished transferring files are automatically suspended.
Public methodTakeOwnership
Changes ownership of the job to the current user.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public eventFailed
Occurs when the state of the job changes to Error.
Public eventFileTransferred
Occurs when BITS successfully finishes transferring a file.
Public eventModified
Occurs when a job is modified.
Public eventTransferred
Occurs when all of the files in the job have successfully transferred.
Extension Methods
Public Extension MethodGetErrorInfo
Gets error informations after an error occurs.
(Defined by BackgroundCopyJobExtensions.)
Public Extension MethodGetPercentBytesTransferred
Gets the percentage of bytes transferred.
(Defined by BackgroundCopyJobExtensions.)
See Also