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