PushMessengerTMessenger Class |
Namespace: Ingeniux.CMS.Models.Messaging
public class PushMessenger<TMessenger> : IPushMessenger where TMessenger : MessengerBase
The PushMessengerTMessenger type exposes the following members.
Name | Description | |
---|---|---|
PushMessengerTMessenger(IUserSession) |
Initializes a new instance of the PushMessenger class
| |
PushMessengerTMessenger(String, String) | Initializes a new instance of the PushMessengerTMessenger class | |
PushMessengerTMessenger(IContentStore, IReadonlyUser) |
Initializes a new instance of the PushMessenger class
|
Name | Description | |
---|---|---|
UserId |
Gets the user ID of the User that will be sending out the push message
| |
UserName |
Gets the name of the User that will be sending out the push message
|
Name | Description | |
---|---|---|
GetHubContext |
Retrieves SignalR Hub context, for the underlying messenger type
| |
SendToAll(String) |
Sends a string message to every logged-in user at client side
| |
SendToAllT(T) |
Sends a message containing an object to every logged-in user at client side
| |
SendToGroups(String, IUserGroup) |
Sends a string message to client side, only the CMS clients with login user as member of the specified user groups, will receive this message
| |
SendToGroupsT(T, IUserGroup) |
Sends a message containing an object to client side, only the CMS clients with login user as member of the specified user groups, will receive this message
| |
SendToMe(String) |
Sends a string message to client side, only the CMS clients with login of Current User will receive this message
| |
SendToMeT(T) |
Sends a message containing an object to client side, only the CMS clients with login of Current User will receive this message
| |
SendToUser(String, String) |
Sends a string message to client side, only the CMS clients with login of specified user will receive this message
| |
SendToUserT(T, String) |
Sends a message containing an object to client side, only the CMS clients with login of specified users will receive this message
| |
SendToUsers(String, String) |
Sends a string message to client side, only the CMS clients with login of specified users will receive this message
| |
SendToUsersT(T, String) |
Sends a message containing an object to client side, only the CMS clients with login of specified users will receive this message
|
Following example is a messenger specifically to communicate publishing information. Client side can receive messages from this messenger by creating a function called "pubStatus" to listen to the message
public class PublishingMessenger : MessengerBase { } public class PublishingPushMessenger : PushMessenger<PublishingMessenger> { public PublishingPushMessenger(IContentStore store, IReadonlyUser user) : base(store, user) { } public PublishingPushMessenger(IUserSession session) : base(session) { } public void SignlarPublishing(PublishStatusMessage status) { GetHubContext().Clients.All.PubStatus(status); } }