/// <summary>Snippet for GetDocumentAsync</summary>
        public async Task GetDocumentAsync_RequestObject()
        {
            // Snippet: GetDocumentAsync(GetDocumentRequest,CallSettings)
            // Create client
            FirestoreClient firestoreClient = await FirestoreClient.CreateAsync();

            // Initialize request argument(s)
            GetDocumentRequest request = new GetDocumentRequest
            {
                Name = new AnyPathName("[PROJECT]", "[DATABASE]", "[DOCUMENT]", "[ANY_PATH]").ToString(),
            };
            // Make the request
            Document response = await firestoreClient.GetDocumentAsync(request);

            // End snippet
        }
예제 #2
0
        /// <summary>Snippet for GetDocumentAsync</summary>
        public async Task GetDocumentRequestObjectAsync()
        {
            // Snippet: GetDocumentAsync(GetDocumentRequest, CallSettings)
            // Additional: GetDocumentAsync(GetDocumentRequest, CancellationToken)
            // Create client
            FirestoreClient firestoreClient = await FirestoreClient.CreateAsync();

            // Initialize request argument(s)
            GetDocumentRequest request = new GetDocumentRequest
            {
                Name        = "",
                Mask        = new DocumentMask(),
                Transaction = ByteString.Empty,
            };
            // Make the request
            Document response = await firestoreClient.GetDocumentAsync(request);

            // End snippet
        }