public async Task UpdateConfig(PushConfig pushConfig, IUPSHttpClient client) { var installation = CreateInstallation(pushConfig); installation.deviceToken = CreateChannelStore().Read(CHANNEL_KEY).Substring(pushConfig.VariantId.Length); await client.Register(installation); }
public override async Task<string> Register(PushConfig pushConfig, IUPSHttpClient client) { Installation installation = CreateInstallation(pushConfig); ILocalStore store = CreateChannelStore(); string channelUri = await ChannelUri(); var token = pushConfig.VariantId + channelUri; installation.deviceToken = channelUri; await client.Register(installation); return installation.deviceToken; }
public override async Task <string> Register(PushConfig pushConfig, IUPSHttpClient client) { Installation installation = CreateInstallation(pushConfig); ILocalStore store = CreateChannelStore(); string channelUri = await ChannelUri(); var token = pushConfig.VariantId + channelUri; installation.deviceToken = channelUri; await client.Register(installation); return(installation.deviceToken); }
public async virtual Task<string> Register(PushConfig pushConfig, IUPSHttpClient client) { Installation installation = CreateInstallation(pushConfig); ILocalStore store = CreateChannelStore(); string channelUri = await ChannelUri(); var token = pushConfig.VariantId + channelUri; if (!token.Equals(store.Read(CHANNEL_KEY))) { installation.deviceToken = channelUri; await client.Register(installation); store.Save(CHANNEL_KEY, token); } return installation.deviceToken; }
public async Task <string> Register(PushConfig pushConfig, IUPSHttpClient client) { Installation installation = CreateInstallation(pushConfig); ILocalStore store = CreateChannelStore(); string channelUri = await ChannelUri(); var token = pushConfig.VariantId + channelUri; if (!token.Equals(store.Read(CHANNEL_KEY))) { installation.deviceToken = channelUri; await client.Register(installation); store.Save(CHANNEL_KEY, token); } return(installation.deviceToken); }