C# Класс Sequencing.WeatherApp.Controllers.DaoLayer.DefaultPushNotificationService

Service which implements push notification logic
Наследование: IPushNotificationService
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
FetchUserDeviceTokens ( System.Int64 userId, DeviceType deviceType ) : List

Fetches user device tokens from database

IsTokenSubscribed ( string token ) : bool

Checks whether user devise is subscribed to get push notifications

IsUserSubscribed ( System.Int64 userId ) : bool

Checks whether user is subscribed to get push notifications

RefreshDeviceToken ( string oldId, string newId ) : void

Refreshes expired device token in DB

Send ( System.Int64 userId, DeviceType deviceType, string token, string message, ApplicationType appType ) : void

Sends push message to subscribed user device

Send ( System.Int64 userId, string message ) : void

Sends push message to all user devices

Subscribe ( string deviceToken, DeviceType deviceType, string accessToken, ApplicationType appType ) : void

Subscribe user to get push message

SubscribeDeviceToken ( string token, DeviceType deviceType, long userId, ApplicationType appType ) : void

Adds device token to database

Unsubscribe ( string token, long userId ) : void

Unsubscribe user from push message

Приватные методы

Метод Описание
GetPushMessageSender ( DeviceType deviceType, ApplicationType appType ) : PushMessageSender

Determines device type

Описание методов

FetchUserDeviceTokens() публичный Метод

Fetches user device tokens from database
public FetchUserDeviceTokens ( System.Int64 userId, DeviceType deviceType ) : List
userId System.Int64
deviceType DeviceType
Результат List

IsTokenSubscribed() публичный Метод

Checks whether user devise is subscribed to get push notifications
public IsTokenSubscribed ( string token ) : bool
token string
Результат bool

IsUserSubscribed() публичный Метод

Checks whether user is subscribed to get push notifications
public IsUserSubscribed ( System.Int64 userId ) : bool
userId System.Int64
Результат bool

RefreshDeviceToken() публичный Метод

Refreshes expired device token in DB
public RefreshDeviceToken ( string oldId, string newId ) : void
oldId string
newId string
Результат void

Send() публичный Метод

Sends push message to subscribed user device
public Send ( System.Int64 userId, DeviceType deviceType, string token, string message, ApplicationType appType ) : void
userId System.Int64
deviceType DeviceType
token string
message string
appType ApplicationType
Результат void

Send() публичный Метод

Sends push message to all user devices
public Send ( System.Int64 userId, string message ) : void
userId System.Int64
message string
Результат void

Subscribe() публичный Метод

Subscribe user to get push message
public Subscribe ( string deviceToken, DeviceType deviceType, string accessToken, ApplicationType appType ) : void
deviceToken string
deviceType DeviceType
accessToken string
appType ApplicationType
Результат void

SubscribeDeviceToken() публичный Метод

Adds device token to database
public SubscribeDeviceToken ( string token, DeviceType deviceType, long userId, ApplicationType appType ) : void
token string
deviceType DeviceType
userId long
appType ApplicationType
Результат void

Unsubscribe() публичный Метод

Unsubscribe user from push message
public Unsubscribe ( string token, long userId ) : void
token string
userId long
Результат void