internal Push(MobileServiceClient client)
 {
     if (client == null)
     {
         throw new ArgumentNullException("client");
     }
     
     var storageManager = new LocalStorageManager(client.ApplicationUri.Host);
     var pushHttpClient = new PushHttpClient(client);
     this.RegistrationManager = new RegistrationManager(pushHttpClient, storageManager);
 }
        internal Push(IMobileServiceClient client)
        {
            Arguments.IsNotNull(client, nameof(client));

            Client = client;
            if (!(client is MobileServiceClient internalClient))
            {
                throw new ArgumentException("Client must be a MobileServiceClient object");
            }
            this.PushHttpClient = new PushHttpClient(internalClient);
        }
Beispiel #3
0
        internal Push(MobileServiceClient client)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            var storageManager = new LocalStorageManager(client.ApplicationUri.Host);
            var pushHttpClient = new PushHttpClient(client);

            this.RegistrationManager = new RegistrationManager(pushHttpClient, storageManager);
        }
        internal Push(IMobileServiceClient client)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            MobileServiceClient internalClient = client as MobileServiceClient;
            if (internalClient == null)
            {
                throw new ArgumentException("Client must be a MobileServiceClient object");
            }

            this.PushHttpClient = new PushHttpClient(internalClient);
            this.Client = client;
        }
Beispiel #5
0
        internal Push(IMobileServiceClient client)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            MobileServiceClient internalClient = (MobileServiceClient)client;

            if (internalClient == null)
            {
                throw new ArgumentException("Client must be a MobileServiceClient object");
            }

            this.PushHttpClient = new PushHttpClient(internalClient);
            this.Client         = client;
        }
Beispiel #6
0
        private Push(MobileServiceClient client, string tileId, SecondaryTilesList tiles)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            this.Client = client;
            this.TileId = tileId;

            var storageManager = new LocalStorageManager(client.ApplicationUri.Host, tileId);
            var pushHttpClient = new PushHttpClient(client);

            this.RegistrationManager = new RegistrationManager(pushHttpClient, storageManager);

            this.SecondaryTiles = tiles ?? new SecondaryTilesList(this);
        }
        private Push(IMobileServiceClient client, string tileId, SecondaryTilesList tiles)
        {
            Arguments.IsNotNull(client, nameof(client));

            this.Client = client;
            this.TileId = tileId;
            if (string.IsNullOrEmpty(tileId))
            {
                tileId = PrimaryChannelId;
            }

            MobileServiceClient internalClient = client as MobileServiceClient;

            if (internalClient == null)
            {
                throw new ArgumentException($"{nameof(client)} must be a MobileServiceClient object", nameof(client));
            }
            this.PushHttpClient = new PushHttpClient(internalClient);

            this.SecondaryTiles = tiles ?? new SecondaryTilesList(this);
        }
Beispiel #8
0
        private Push(MobileServiceClient client, string tileId, SecondaryTilesList tiles)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            this.Client = client;
            this.TileId = tileId;
            if (string.IsNullOrEmpty(tileId))
            {
                tileId = PrimaryChannelId;
            }

            string name           = string.Format("{0}-PushContainer-{1}-{2}", Package.Current.Id.Name, client.ApplicationUri.Host, tileId);
            var    storageManager = new LocalStorageManager(name);
            var    pushHttpClient = new PushHttpClient(client);

            this.RegistrationManager = new RegistrationManager(pushHttpClient, storageManager);

            this.SecondaryTiles = tiles ?? new SecondaryTilesList(this);
        }
        public RegistrationManager(PushHttpClient pushHttpClient, ILocalStorageManager storageManager)
        {
            this.PushHttpClient = pushHttpClient;

            this.LocalStorageManager = storageManager;
        }
Beispiel #10
0
        public RegistrationManager(PushHttpClient pushHttpClient, ILocalStorageManager storageManager)
        {
            this.PushHttpClient = pushHttpClient;

            this.LocalStorageManager = storageManager;
        }