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); }
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); }