Example #1
0
        public void RegisterDevice(List <string> channels, DateTime?expiration,
                                   BackendlessAPI.Push.PushNotificationsBinding pushNotificationsBinding = null,
                                   AsyncCallback <string> callback = null)
        {
            if (channels == null)
            {
                throw new ArgumentNullException(ExceptionMessage.NULL_CHANNEL_NAME);
            }

            if (channels.Count == 0)
            {
                _deviceRegistrationDto.AddChannel(DEFAULT_CHANNEL_NAME);
            }

            foreach (string channel in channels)
            {
                checkChannelName(channel);
                _deviceRegistrationDto.AddChannel(channel);
            }

            if (expiration != null)
            {
                _deviceRegistrationDto.Expiration = expiration;
            }

            BackendlessAPI.Push.Registrar.RegisterDevice(_deviceRegistrationDto.DeviceId, pushNotificationsBinding, callback);
        }
Example #2
0
        public void RegisterDevice(string channel, BackendlessAPI.Push.PushNotificationsBinding pushNotificationsBinding = null,
                                   AsyncCallback <string> callback = null)
        {
            if (string.IsNullOrEmpty(channel))
            {
                throw new ArgumentNullException(ExceptionMessage.NULL_CHANNEL_NAME);
            }

            RegisterDevice(new List <string> {
                channel
            }, pushNotificationsBinding, callback);
        }
Example #3
0
 public void RegisterDevice(DateTime expiration, BackendlessAPI.Push.PushNotificationsBinding pushNotificationsBinding = null,
                            AsyncCallback <string> callback = null)
 {
     RegisterDevice(null, expiration, pushNotificationsBinding, callback);
 }
Example #4
0
 public void RegisterDevice(List <string> channels, BackendlessAPI.Push.PushNotificationsBinding pushNotificationsBinding = null,
                            AsyncCallback <string> callback = null)
 {
     RegisterDevice(channels, null, pushNotificationsBinding, callback);
 }
Example #5
0
 public void RegisterDevice(BackendlessAPI.Push.PushNotificationsBinding pushNotificationsBinding = null,
                            AsyncCallback <string> callback = null)
 {
     RegisterDevice(DEFAULT_CHANNEL_NAME, pushNotificationsBinding, callback);
 }