Show / Hide Table of Contents

Class PushNotificationServiceManager

Inheritance
object
PushNotificationServiceManager
Implements
IPushNotificationServiceManager
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.BusinessLogic.dll
Syntax
public class PushNotificationServiceManager : IPushNotificationServiceManager

Constructors

PushNotificationServiceManager(int)

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

Properties

IncludeUpdatedBadgeCount

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

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
bool

SilentExceptions

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

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

UpdateSentMessageCounters

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

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

GetInvitationCountAsync(int, CancellationToken)

Declaration
public static Task<int> GetInvitationCountAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

GetPushNotificationRowsAsync(PushNotificationType, CancellationToken)

Declaration
public Task<IEnumerable<PushNotificationServiceRow>> GetPushNotificationRowsAsync(PushNotificationType type, CancellationToken cancellationToken = default)
Parameters
Type Name Description
PushNotificationType type
CancellationToken cancellationToken
Returns
Type Description
Task<IEnumerable<PushNotificationServiceRow>>

GetPushNotificationRowsAsync(IEnumerable<int>, PushNotificationType, bool, CancellationToken)

Declaration
public IAsyncEnumerable<PushNotificationServiceRow> GetPushNotificationRowsAsync(IEnumerable<int> associateIds, PushNotificationType type, bool overrideTagSettings, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerable<int> associateIds
PushNotificationType type
bool overrideTagSettings
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<PushNotificationServiceRow>

GetQuoteNotificationCountAsync(int, CancellationToken)

Declaration
public static Task<int> GetQuoteNotificationCountAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

GetRegisteredDevicesAsync(int, CancellationToken)

Declaration
public IAsyncEnumerable<DeviceInfo> GetRegisteredDevicesAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<DeviceInfo>

GetTagFromPushNotificationType(PushNotificationType)

Declaration
public static string GetTagFromPushNotificationType(PushNotificationType type)
Parameters
Type Name Description
PushNotificationType type
Returns
Type Description
string

GetTagsAsync(int, string, CancellationToken)

Declaration
public Task<string> GetTagsAsync(int associateId, string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
string deviceIdentifier
CancellationToken cancellationToken
Returns
Type Description
Task<string>

GetTagsAsync(string, CancellationToken)

Declaration
public Task<string> GetTagsAsync(string deviceIdentifier, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string deviceIdentifier
CancellationToken cancellationToken
Returns
Type Description
Task<string>

GetTicketNotificationCountAsync(int, CancellationToken)

Declaration
public static Task<int> GetTicketNotificationCountAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

GetTranslatedMessageAsync(PushNotificationMessage, string, int, CancellationToken)

Declaration
protected virtual Task<PushNotificationMessage> GetTranslatedMessageAsync(PushNotificationMessage originalMessage, string language, int recipientPreferredTimeZoneId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
PushNotificationMessage originalMessage
string language
int recipientPreferredTimeZoneId
CancellationToken cancellationToken
Returns
Type Description
Task<PushNotificationMessage>

PNSHandlesAsync(NotificationPlatform, CancellationToken)

Declaration
public Task<IEnumerable<string>> PNSHandlesAsync(NotificationPlatform platform, CancellationToken cancellationToken = default)
Parameters
Type Name Description
NotificationPlatform platform
CancellationToken cancellationToken
Returns
Type Description
Task<IEnumerable<string>>

PurgeOldDevicesAsync(TimeSpan, CancellationToken)

Will delete all registerred devices for the associate, with an handler update date older than current time - specified age

Declaration
public Task PurgeOldDevicesAsync(TimeSpan age, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TimeSpan age
CancellationToken cancellationToken
Returns
Type Description
Task

RegisterDeviceAsync(DeviceInfo, CancellationToken)

Declaration
public Task RegisterDeviceAsync(DeviceInfo deviceInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DeviceInfo deviceInfo
CancellationToken cancellationToken
Returns
Type Description
Task

SendMessageAsync(IAsyncEnumerable<PushNotificationServiceRow>, PushNotificationMessage, bool, CancellationToken)

Declaration
public Task SendMessageAsync(IAsyncEnumerable<PushNotificationServiceRow> rows, PushNotificationMessage message, bool usePredefinedMessageValues, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IAsyncEnumerable<PushNotificationServiceRow> rows
PushNotificationMessage message
bool usePredefinedMessageValues
CancellationToken cancellationToken
Returns
Type Description
Task

SendMessageAsync(IEnumerable<int>, PushNotificationMessage, bool, bool, CancellationToken)

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

Declaration
public Task SendMessageAsync(IEnumerable<int> associateIds, PushNotificationMessage message, bool usePredefinedMessageValues, bool overrideTagSettings, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IEnumerable<int> associateIds

Who should receive the message

PushNotificationMessage message

The message to send

bool 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

bool overrideTagSettings

If true, ignore possible tag settings about disabling certain message types

CancellationToken cancellationToken
Returns
Type Description
Task

SendMessageAsync(int, PushNotificationMessage, bool, CancellationToken)

Send a message to a single user

Declaration
public Task SendMessageAsync(int associateId, PushNotificationMessage message, bool overrideTagSettings, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

Who should receive the message

PushNotificationMessage message

The message to send

bool overrideTagSettings

If true, ignore possible tag settings about disabling certain message types

CancellationToken cancellationToken
Returns
Type Description
Task

SetTagsAsync(int, string, CancellationToken)

Declaration
public Task SetTagsAsync(int associateId, string tags, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
string tags
CancellationToken cancellationToken
Returns
Type Description
Task

SetTagsAsync(string, string, CancellationToken)

Declaration
public Task SetTagsAsync(string deviceIdentifier, string tags, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string deviceIdentifier
string tags
CancellationToken cancellationToken
Returns
Type Description
Task

UpdateSentNotificationCount(string, int, CancellationToken)

Declaration
public Task UpdateSentNotificationCount(string deviceIdentifier, int notificationCount, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string deviceIdentifier
int notificationCount
CancellationToken cancellationToken
Returns
Type Description
Task

Implements

IPushNotificationServiceManager

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 |  Contribute |  Back to top