Exemplo n.º 1
0
 /// <summary>Snippet for Commit</summary>
 public void Commit()
 {
     // Snippet: Commit(string, IEnumerable<Write>, CallSettings)
     // Create client
     FirestoreClient firestoreClient = FirestoreClient.Create();
     // Initialize request argument(s)
     string database            = "";
     IEnumerable <Write> writes = new Write[] { new Write(), };
     // Make the request
     CommitResponse response = firestoreClient.Commit(database, writes);
     // End snippet
 }
 /// <summary>Snippet for Commit</summary>
 public void Commit()
 {
     // Snippet: Commit(string,IEnumerable<Write>,CallSettings)
     // Create client
     FirestoreClient firestoreClient = FirestoreClient.Create();
     // Initialize request argument(s)
     string formattedDatabase   = new DatabaseRootName("[PROJECT]", "[DATABASE]").ToString();
     IEnumerable <Write> writes = new List <Write>();
     // Make the request
     CommitResponse response = firestoreClient.Commit(formattedDatabase, writes);
     // End snippet
 }
 /// <summary>Snippet for Commit</summary>
 public void Commit_RequestObject()
 {
     // Snippet: Commit(CommitRequest,CallSettings)
     // Create client
     FirestoreClient firestoreClient = FirestoreClient.Create();
     // Initialize request argument(s)
     CommitRequest request = new CommitRequest
     {
         Database = new DatabaseRootName("[PROJECT]", "[DATABASE]").ToString(),
         Writes   = { },
     };
     // Make the request
     CommitResponse response = firestoreClient.Commit(request);
     // End snippet
 }
Exemplo n.º 4
0
 /// <summary>Snippet for Commit</summary>
 public void CommitRequestObject()
 {
     // Snippet: Commit(CommitRequest, CallSettings)
     // Create client
     FirestoreClient firestoreClient = FirestoreClient.Create();
     // Initialize request argument(s)
     CommitRequest request = new CommitRequest
     {
         Database    = "",
         Writes      = { new Write(), },
         Transaction = ByteString.Empty,
     };
     // Make the request
     CommitResponse response = firestoreClient.Commit(request);
     // End snippet
 }