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);
 }
Exemple #2
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);
        }
Exemple #3
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);
        }
Exemple #4
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, LocalStorageManager storageManager)
        {
            this.PushHttpClient = pushHttpClient;

            this.LocalStorageManager = storageManager;
        }
Exemple #6
0
        public RegistrationManager(PushHttpClient pushHttpClient, LocalStorageManager storageManager)
        {
            this.PushHttpClient = pushHttpClient;

            this.LocalStorageManager = storageManager;
        }