Exemple #1
0
        public async Task AllocateIdAsync()
        {
            string projectId   = _fixture.ProjectId;
            string namespaceId = _fixture.NamespaceId;

            // Snippet: AllocateIdAsync
            DatastoreDb db         = DatastoreDb.Create(projectId, namespaceId);
            KeyFactory  keyFactory = db.CreateKeyFactory("message");
            Key         key        = await db.AllocateIdAsync(keyFactory.CreateIncompleteKey());

            // End snippet
        }