i am using the Microsoft.ConfigurationManagement.Messaging package to use the BITS. So far I have written following piece of code:
BitsJob job = new BitsJob(BitsJobType.Download, displayName);
BitsJobState jobState;
job.AddFileToJob(new Uri(source), destination); // source & destination are method parameters
job.Resume();
do
{
// Do something with the job as long as its transferring
} while (/*Get job state here*/);
Now I want to retrieve the state of the job in the do-while-statement. I can't find a property or a method of the BitsJob
instance returning me the current state of the job. Can someone tell me about how to get the current job state?