public override void Define(INotificationDefinitionContext context)
        {
            var exceptionGroup = context.AddGroup(
                AbpExceptionHandlingNotificationNames.GroupName,
                L("Notifications:Exception"),
                false);

            exceptionGroup.AddNotification(
                name: AbpExceptionHandlingNotificationNames.NotificationName,
                displayName: L("Notifications:ExceptionNotifier"),
                description: L("Notifications:ExceptionNotifier"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.Persistent,
                allowSubscriptionToClients: false);
        }
Beispiel #2
0
        public override void Define(INotificationDefinitionContext context)
        {
            var group = context.AddGroup(NotificationsTestsNames.GroupName);

            group.AddNotification(NotificationsTestsNames.Test1,
                                  notificationType: NotificationType.Application,
                                  lifetime: NotificationLifetime.OnlyOne);

            group.AddNotification(NotificationsTestsNames.Test2,
                                  notificationType: NotificationType.Application,
                                  lifetime: NotificationLifetime.Persistent);

            group.AddNotification(NotificationsTestsNames.Test3,
                                  notificationType: NotificationType.User,
                                  lifetime: NotificationLifetime.OnlyOne);
        }
        public override void Define(INotificationDefinitionContext context)
        {
            var tenantsGroup = context.AddGroup(
                TenantNotificationNames.GroupName,
                L("Notifications:MultiTenancy"),
                false);

            tenantsGroup.AddNotification(
                TenantNotificationNames.NewTenantRegistered,
                L("Notifications:NewTenantRegisterd"),
                L("Notifications:NewTenantRegisterd"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.OnlyOne,
                allowSubscriptionToClients: false
                )
            .WithProviders();

            var usersGroup = context.AddGroup(
                UserNotificationNames.GroupName,
                L("Notifications:Users"));

            usersGroup.AddNotification(
                UserNotificationNames.WelcomeToApplication,
                L("Notifications:WelcomeToApplication"),
                L("Notifications:WelcomeToApplication"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.OnlyOne,
                allowSubscriptionToClients: true);

            var imGroup = context.AddGroup(
                MessageServiceNotificationNames.IM.GroupName,
                L("Notifications:IM"));

            imGroup.AddNotification(
                MessageServiceNotificationNames.IM.FriendValidation,
                L("Notifications:FriendValidation"),
                L("Notifications:FriendValidation"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.Persistent,
                allowSubscriptionToClients: true);
            imGroup.AddNotification(
                MessageServiceNotificationNames.IM.NewFriend,
                L("Notifications:NewFriend"),
                L("Notifications:NewFriend"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.Persistent,
                allowSubscriptionToClients: true);
            imGroup.AddNotification(
                MessageServiceNotificationNames.IM.JoinGroup,
                L("Notifications:JoinGroup"),
                L("Notifications:JoinGroup"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.Persistent,
                allowSubscriptionToClients: true);
            imGroup.AddNotification(
                MessageServiceNotificationNames.IM.ExitGroup,
                L("Notifications:ExitGroup"),
                L("Notifications:ExitGroup"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.Persistent,
                allowSubscriptionToClients: true);
            imGroup.AddNotification(
                MessageServiceNotificationNames.IM.DissolveGroup,
                L("Notifications:DissolveGroup"),
                L("Notifications:DissolveGroup"),
                notificationType: NotificationType.System,
                lifetime: NotificationLifetime.Persistent,
                allowSubscriptionToClients: true);
        }