ConoHaNet.OpenStackMember.ListNotifications C# (CSharp) Method

ListNotifications() public method

public ListNotifications ( string lang = "en", int offset, int limit = 1000 ) : IEnumerable
lang string
offset int
limit int
return IEnumerable
        public IEnumerable<Notification> ListNotifications(string lang = "en", int offset = 0, int limit = 1000)
        {
            return AccountServiceProvider.ListNotifications(lang, offset, limit, Identity);
        }

Usage Example

        public void SetNotificationTest()
        {
            Trace.WriteLine("on ticket");

            var os = new OpenStackMember(UserName, Password, TenantName); // with tenant
            var notifications = os.ListNotifications();
            Assert.IsNotNull(notifications);
            foreach (var n in notifications)
            {
                var notification = os.GetNotification(n.NotificationCode);
                var prevStatus = notification.ReadStatus;

                notification = os.SetNotification(n.NotificationCode, "Unread");
                Assert.AreEqual(notification.ReadStatus, "Unread");

                notification = os.SetNotification(n.NotificationCode, "ReadTitleOnly");
                Assert.AreEqual(notification.ReadStatus, "ReadTitleOnly");

                notification = os.SetNotification(n.NotificationCode, "Read");
                Assert.AreEqual(notification.ReadStatus, "Read");

                notification = os.SetNotification(n.NotificationCode, prevStatus);

                notification = os.GetNotification(n.NotificationCode);
                Assert.AreEqual(notification.ReadStatus, prevStatus);
            }
        }
All Usage Examples Of ConoHaNet.OpenStackMember::ListNotifications
OpenStackMember