Example #1
0
        public static async Task SendAsync(string tenant, Notification message)
        {
            message.Tenant = tenant;
            var id = await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            message.NotificationId = id;
            NotificationHub.Send(tenant, message);
        }
Example #2
0
        public static async Task SendToUsersAsync(string tenant, int userId, Notification message)
        {
            message.Tenant   = tenant;
            message.ToUserId = userId;

            var id = await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            message.NotificationId = id;
            NotificationHub.SendToUsers(tenant, userId, message);
        }
Example #3
0
        public static async Task SendToLoginAsync(string tenant, long loginId, Notification message)
        {
            message.Tenant    = tenant;
            message.ToLoginId = loginId;

            var id = await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            message.NotificationId = id;
            NotificationHub.SendToLogin(tenant, loginId, message);
        }
Example #4
0
        public static async Task SendToAdminsAsync(string tenant, int officeId, Notification message)
        {
            message.Tenant   = tenant;
            message.OfficeId = officeId;

            var id = await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            message.NotificationId = id;
            NotificationHub.SendToAdmins(tenant, officeId, message);
        }
Example #5
0
        public static async Task SendAsync(string tenant, Notification message)
        {
            await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            NotificationHub.Send(tenant, message);
        }
Example #6
0
        public static async Task SendToLoginAsync(string tenant, long loginId, Notification message)
        {
            await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            NotificationHub.SendToLogin(tenant, loginId, message);
        }
Example #7
0
        public static async Task SendToUsersAsync(string tenant, int userId, int officeId, Notification message)
        {
            await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            NotificationHub.SendToUsers(tenant, userId, officeId, message);
        }
Example #8
0
        public static async Task SendToRolesAsync(string tenant, int roleId, Notification message)
        {
            await Notifications.AddAsync(tenant, message).ConfigureAwait(false);

            NotificationHub.SendToRoles(tenant, roleId, message);
        }