Class PushNotificationServiceManager
Inheritance
PushNotificationServiceManager
Assembly: SoDataBase.dll
Syntax
public class PushNotificationServiceManager : Object
Constructors
PushNotificationServiceManager(Int32)
Declaration
public PushNotificationServiceManager(int associateId)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
Properties
IncludeUpdatedBadgeCount
Declaration
public bool IncludeUpdatedBadgeCount { get; set; }
Property Value
SendMessageToOurself
If true, we will also send messages to logged in user if specified as recipient
If false, we will filter out logged in user
Declaration
public bool SendMessageToOurself { get; set; }
Property Value
SilentExceptions
If true, exceptions are being catched and logged instead of thrown
Declaration
public bool SilentExceptions { get; set; }
Property Value
UpdateSentMessageCounters
Declaration
public bool UpdateSentMessageCounters { get; set; }
Property Value
Methods
Declaration
protected string[] GetAvailableTags()
Returns
Declaration
protected string GetCompleteTagString(string inputTags)
Parameters
Type |
Name |
Description |
String |
inputTags |
|
Returns
GetInvitationCount(Int32)
Declaration
public static int GetInvitationCount(int associateId)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
Returns
GetPushNotificationRows(PushNotificationType)
Declaration
public List<PushNotificationServiceRow> GetPushNotificationRows(PushNotificationType type)
Parameters
Type |
Name |
Description |
PushNotificationType |
type |
|
Returns
GetPushNotificationRows(IEnumerable<Int32>, PushNotificationType, Boolean)
Declaration
public List<PushNotificationServiceRow> GetPushNotificationRows(IEnumerable<int> associateIds, PushNotificationType type, bool overrideTagSettings)
Parameters
Returns
GetQuoteNotificationCount(Int32)
Declaration
public static int GetQuoteNotificationCount(int associateId)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
Returns
GetRegisteredDevices(Int32)
Declaration
public IEnumerable<DeviceInfo> GetRegisteredDevices(int associateId)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
Returns
GetTagFromPushNotificationType(PushNotificationType)
Declaration
public static string GetTagFromPushNotificationType(PushNotificationType type)
Parameters
Type |
Name |
Description |
PushNotificationType |
type |
|
Returns
Declaration
public string GetTags(int associateId, string deviceIdentifier)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
String |
deviceIdentifier |
|
Returns
Declaration
public string GetTags(string deviceIdentifier)
Parameters
Type |
Name |
Description |
String |
deviceIdentifier |
|
Returns
GetTicketNotificationCount(Int32)
Declaration
public static int GetTicketNotificationCount(int associateId)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
|
Returns
GetTranslatedMessage(PushNotificationMessage, String, Int32)
Declaration
protected virtual PushNotificationMessage GetTranslatedMessage(PushNotificationMessage originalMessage, string language, int recipientPreferredTimeZoneId)
Parameters
Type |
Name |
Description |
PushNotificationMessage |
originalMessage |
|
String |
language |
|
Int32 |
recipientPreferredTimeZoneId |
|
Returns
Type |
Description |
PushNotificationMessage |
|
Declaration
public IEnumerable<string> PNSHandles(NotificationPlatform platform)
Parameters
Returns
PurgeOldDevices(TimeSpan)
Will delete all registerred devices for the associate, with an handler update date older than current time - specified age
Declaration
public void PurgeOldDevices(TimeSpan age)
Parameters
RegisterDevice(DeviceInfo)
Declaration
public void RegisterDevice(DeviceInfo deviceInfo)
Parameters
SendMessage(IEnumerable<PushNotificationServiceRow>, PushNotificationMessage, Boolean)
Declaration
public void SendMessage(IEnumerable<PushNotificationServiceRow> rows, PushNotificationMessage message, bool usePredefinedMessageValues)
Parameters
SendMessage(IEnumerable<Int32>, PushNotificationMessage, Boolean, Boolean)
Sends a push notification message to associates that have devices added in the PushNotificationService table
Declaration
public void SendMessage(IEnumerable<int> associateIds, PushNotificationMessage message, bool usePredefinedMessageValues, bool overrideTagSettings)
Parameters
Type |
Name |
Description |
IEnumerable<Int32> |
associateIds |
Who should receive the message
|
PushNotificationMessage |
message |
The message to send
|
Boolean |
usePredefinedMessageValues |
If this is true, we will look up and replace the message title based on the NotificationMessageType. If no url is provided, a default value will be assigned
|
Boolean |
overrideTagSettings |
If true, ignore possible tag settings about disabling certain message types
|
SendMessage(Int32, PushNotificationMessage, Boolean)
Send a message to a single user
Declaration
public void SendMessage(int associateId, PushNotificationMessage message, bool overrideTagSettings)
Parameters
Type |
Name |
Description |
Int32 |
associateId |
Who should receive the message
|
PushNotificationMessage |
message |
The message to send
|
Boolean |
overrideTagSettings |
If true, ignore possible tag settings about disabling certain message types
|
Declaration
public void SetTags(int associateId, string tags)
Parameters
Declaration
public void SetTags(string deviceIdentifier, string tags)
Parameters
UpdateSentNotificationCount(String, Int32)
Declaration
public void UpdateSentNotificationCount(string deviceIdentifier, int notificationCount)
Parameters
Type |
Name |
Description |
String |
deviceIdentifier |
|
Int32 |
notificationCount |
|
Extension Methods
EnumUtil.MapEnums<From, To>(From)