예제 #1
0
        /// <summary>
        /// Initializes a new instance of the PushNotificationRegistry class.
        /// </summary>
        /// <param name="notificationServerRegistration">Handlers registering push notification tokens with a remote server.</param>
        /// <param name="systemInformation">An object that provides information about the current system.</param>
        protected PushNotificationRegistry(IPushNotificationServerRegistration notificationServerRegistration, ISystemInformation systemInformation)
        {
            Throw.IfArgumentNull(notificationServerRegistration, nameof(notificationServerRegistration));
            Throw.IfArgumentNull(systemInformation, nameof(systemInformation));

            this.notificationServerRegistration = notificationServerRegistration;
            this.systemInformation = systemInformation;
        }
예제 #2
0
 /// <summary>
 /// Creates a push notification registry for the current application.
 /// </summary>
 /// <param name="notificationServerRegistration">An object responsible for registering the current device to receive push notifications from a remote server.</param>
 protected override PushNotificationRegistry CreatePushNotificationRegistry(IPushNotificationServerRegistration notificationServerRegistration)
 {
     return(new iOSPushNotificationRegistry(notificationServerRegistration, this.SystemInformation));
 }
예제 #3
0
 /// <summary>
 /// Creates a push notification registry for the current application.
 /// </summary>
 /// <param name="notificationServerRegistration">An object responsible for registering the current device to receive push notifications from a remote server.</param>
 protected abstract PushNotificationRegistry CreatePushNotificationRegistry(IPushNotificationServerRegistration notificationServerRegistration);
예제 #4
0
 /// <summary>
 /// Enables support for push notifications in the current application.
 /// </summary>
 /// <param name="knownNotificationTypes">A collection of expected notifications that will be received by the application.</param>
 /// <param name="notificationServerRegistration">An object responsible for registering the current device to receive push notifications from a remote server.</param>
 public void EnablePushNotifications(PushNotificationTypes knownNotificationTypes, IPushNotificationServerRegistration notificationServerRegistration)
 {
     if (this.pushNotificationRegistry == null)
     {
         this.knownNotificationTypes   = knownNotificationTypes;
         this.pushNotificationRegistry = this.CreatePushNotificationRegistry(notificationServerRegistration);
     }
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the iOSPushNotificationRegistry class.
 /// </summary>
 /// <param name="notificationServerRegistration">Handlers registering push notification tokens with a remote server.</param>
 /// <param name="systemInformation">An object that provides information about the current system.</param>
 public iOSPushNotificationRegistry(IPushNotificationServerRegistration notificationServerRegistration, ISystemInformation systemInformation)
     : base(notificationServerRegistration, systemInformation)
 {
 }