Show / Hide Table of Contents

Class PushNotificationServiceManager

Inheritance
Object
PushNotificationServiceManager
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Notification
Assembly: SoDataBase.dll
Syntax
public class PushNotificationServiceManager

Constructors

PushNotificationServiceManager(Int32)

Declaration
public PushNotificationServiceManager(int associateId)
Parameters
Type Name Description
Int32 associateId

Properties

IncludeUpdatedInvitationCount

Declaration
public bool IncludeUpdatedInvitationCount { get; set; }
Property Value
Type Description
Boolean

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
Type Description
Boolean

SilentExceptions

If true, exceptions are being catched and logged instead of thrown

Declaration
public bool SilentExceptions { get; set; }
Property Value
Type Description
Boolean

UpdateSentMessageCounters

Declaration
public bool UpdateSentMessageCounters { get; set; }
Property Value
Type Description
Boolean

Methods

GetAvailableTags()

Declaration
protected string[] GetAvailableTags()
Returns
Type Description
String[]

GetCompleteTagString(String)

Declaration
protected string GetCompleteTagString(string inputTags)
Parameters
Type Name Description
String inputTags
Returns
Type Description
String

GetInvitationCount(Int32)

Declaration
public int GetInvitationCount(int associateId)
Parameters
Type Name Description
Int32 associateId
Returns
Type Description
Int32

GetPushNotificationRows(PushNotificationType)

Declaration
public List<PushNotificationServiceRow> GetPushNotificationRows(PushNotificationType type)
Parameters
Type Name Description
CentralServices.Data.Pocket.PushNotificationType type
Returns
Type Description
List<PushNotificationServiceRow>

GetPushNotificationRows(IEnumerable<Int32>, PushNotificationType, Boolean)

Declaration
public List<PushNotificationServiceRow> GetPushNotificationRows(IEnumerable<int> associateIds, PushNotificationType type, bool overrideTagSettings)
Parameters
Type Name Description
IEnumerable<Int32> associateIds
CentralServices.Data.Pocket.PushNotificationType type
Boolean overrideTagSettings
Returns
Type Description
List<PushNotificationServiceRow>

GetRegisteredDevices(Int32)

Declaration
public IEnumerable<DeviceInfo> GetRegisteredDevices(int associateId)
Parameters
Type Name Description
Int32 associateId
Returns
Type Description
IEnumerable<DeviceInfo>

GetTagFromPushNotificationType(PushNotificationType)

Declaration
public static string GetTagFromPushNotificationType(PushNotificationType type)
Parameters
Type Name Description
CentralServices.Data.Pocket.PushNotificationType type
Returns
Type Description
String

GetTags(Int32, String)

Declaration
public string GetTags(int associateId, string deviceIdentifier)
Parameters
Type Name Description
Int32 associateId
String deviceIdentifier
Returns
Type Description
String

GetTags(String)

Declaration
public string GetTags(string deviceIdentifier)
Parameters
Type Name Description
String deviceIdentifier
Returns
Type Description
String

GetTranslatedMessage(PushNotificationMessage, String, Int32)

Declaration
protected virtual PushNotificationMessage GetTranslatedMessage(PushNotificationMessage originalMessage, string language, int timeZoneId)
Parameters
Type Name Description
CentralServices.Data.Pocket.PushNotificationMessage originalMessage
String language
Int32 timeZoneId
Returns
Type Description
CentralServices.Data.Pocket.PushNotificationMessage

PNSHandles(NotificationPlatform)

Declaration
public IEnumerable<string> PNSHandles(NotificationPlatform platform)
Parameters
Type Name Description
NotificationPlatform platform
Returns
Type Description
IEnumerable<String>

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
Type Name Description
TimeSpan age

RegisterDevice(DeviceInfo)

Declaration
public void RegisterDevice(DeviceInfo deviceInfo)
Parameters
Type Name Description
DeviceInfo deviceInfo

SendMessage(IEnumerable<PushNotificationServiceRow>, PushNotificationMessage, Boolean)

Declaration
public void SendMessage(IEnumerable<PushNotificationServiceRow> rows, PushNotificationMessage message, bool usePredefinedMessageValues)
Parameters
Type Name Description
IEnumerable<PushNotificationServiceRow> rows
CentralServices.Data.Pocket.PushNotificationMessage message
Boolean usePredefinedMessageValues

SendMessage(Int32, PushNotificationMessage, Boolean)

Declaration
public void SendMessage(int associateId, PushNotificationMessage message, bool overrideTagSettings)
Parameters
Type Name Description
Int32 associateId
CentralServices.Data.Pocket.PushNotificationMessage message
Boolean overrideTagSettings

SendMessage(Int32[], PushNotificationMessage, Boolean, Boolean)

Sends a push notification message to associates that have devices added in the PushNotificationService table

Declaration
public void SendMessage(int[] associateIds, PushNotificationMessage message, bool usePredefinedMessageValues, bool overrideTagSettings)
Parameters
Type Name Description
Int32[] associateIds

Who should receive the message

CentralServices.Data.Pocket.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

SetTags(Int32, String)

Declaration
public void SetTags(int associateId, string tags)
Parameters
Type Name Description
Int32 associateId
String tags

SetTags(String, String)

Declaration
public void SetTags(string deviceIdentifier, string tags)
Parameters
Type Name Description
String deviceIdentifier
String tags

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)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Back to top