public Subscribe ( string deviceToken, DeviceType deviceType, string accessToken, ApplicationType appType ) : void | ||
deviceToken | string | |
deviceType | DeviceType | |
accessToken | string | |
appType | ApplicationType | |
return | void |
private void ProcessSubscribe(string newToken, DeviceType deviceType, string accessToken, ApplicationType?appType) { try { IPushNotificationService notificationSrv = new DefaultPushNotificationService(); if (!notificationSrv.IsTokenSubscribed(newToken)) { notificationSrv.Subscribe(newToken, deviceType, accessToken, appType); } else { throw new ApplicationException("Device already subscribed"); } } catch (Exception e) { throw new ApplicationException(e.Message); } }
private void ProcessSubscribe(string newToken, DeviceType deviceType, string accessToken, ApplicationType? appType) { try { IPushNotificationService notificationSrv = new DefaultPushNotificationService(); if (!notificationSrv.IsTokenSubscribed(newToken)) notificationSrv.Subscribe(newToken, deviceType, accessToken, appType); else throw new ApplicationException("Device already subscribed"); } catch (Exception e) { throw new ApplicationException(e.Message); } }