// ADD THIS PART TO YOUR CODE static async Task ReplacedeviceDocument(DocumentClient client, string databaseName, string collectionName, string documentId, DeviceInfo updatedDeviceInfo) { try { await client.ReplaceDocumentAsync(UriFactory.CreateDocumentUri(databaseName, collectionName, documentId), updatedDeviceInfo); //this.WriteToConsoleAndPromptToContinue("Replaced device {0}", deviceName); } catch (Exception e) { log.Fatal(e.ToString()); Environment.Exit(0); } }
static async void doReplacedeviceDocument(DocumentClient client, string databaseName, string collectionName, string documentId, DeviceInfo updatedDeviceInfo) { try { await ReplacedeviceDocument(client, databaseName, collectionName, documentId, updatedDeviceInfo); } catch (Exception e) { log.Fatal(e.ToString()); Environment.Exit(0); } }