/// <summary>Snippet for UpdateDocumentAsync</summary> public async Task UpdateDocumentAsync() { // Snippet: UpdateDocumentAsync(Document,DocumentMask,CallSettings) // Additional: UpdateDocumentAsync(Document,DocumentMask,CancellationToken) // Create client FirestoreClient firestoreClient = await FirestoreClient.CreateAsync(); // Initialize request argument(s) Document document = new Document(); DocumentMask updateMask = new DocumentMask(); // Make the request Document response = await firestoreClient.UpdateDocumentAsync(document, updateMask); // End snippet }
/// <summary>Snippet for UpdateDocumentAsync</summary> public async Task UpdateDocumentAsync_RequestObject() { // Snippet: UpdateDocumentAsync(UpdateDocumentRequest,CallSettings) // Create client FirestoreClient firestoreClient = await FirestoreClient.CreateAsync(); // Initialize request argument(s) UpdateDocumentRequest request = new UpdateDocumentRequest { Document = new Document(), UpdateMask = new DocumentMask(), }; // Make the request Document response = await firestoreClient.UpdateDocumentAsync(request); // End snippet }
/// <summary>Snippet for UpdateDocumentAsync</summary> public async Task UpdateDocumentRequestObjectAsync() { // Snippet: UpdateDocumentAsync(UpdateDocumentRequest, CallSettings) // Additional: UpdateDocumentAsync(UpdateDocumentRequest, CancellationToken) // Create client FirestoreClient firestoreClient = await FirestoreClient.CreateAsync(); // Initialize request argument(s) UpdateDocumentRequest request = new UpdateDocumentRequest { Document = new Document(), UpdateMask = new DocumentMask(), Mask = new DocumentMask(), CurrentDocument = new Precondition(), }; // Make the request Document response = await firestoreClient.UpdateDocumentAsync(request); // End snippet }