Exemplo n.º 1
0
        public void GetNotification()
        {
            var projectId = _fixture.ProjectId;

            string bucket         = _fixture.BucketName;
            var    created        = _fixture.CreateNotification("prefix1");
            string notificationId = created.Id;

            // Snippet: GetNotification(string, string, *)
            StorageClient client       = StorageClient.Create();
            Notification  notification = client.GetNotification(bucket, notificationId);

            Console.WriteLine($"ID: {notification.Id}");
            Console.WriteLine($"Payload format: {notification.PayloadFormat}");
            Console.WriteLine($"Topic: {notification.Topic}");
            Console.WriteLine($"Prefix: {notification.ObjectNamePrefix}");
            Console.WriteLine($"Event types: {string.Join(",", notification.EventTypes ?? new string[0])}");
            // End snippet
        }