Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 5
0
        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);
        }
 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);
 }