/// <summary> /// Creates the document in a background thread. /// </summary> /// <param name="state">The thread start parameter.</param> static void CreateItemThread(Object state) { // Extract the specific argument from the generic thread start argument. CreateDocumentInfo createDocumentInfo = state as CreateDocumentInfo; // Create a channel to the web server to execut this item. using (WebServiceClient webServiceClient = new WebServiceClient(Settings.Default.WebServiceEndpoint)) { try { // This will create the document on the server. If successful, the information will come back from the server in a few milliseconds and // overwrite the data we poked into the client. webServiceClient.CreateDocuments(new CreateDocumentInfo[] { createDocumentInfo }); } catch { } } }