コード例 #1
0
        public void ListRegistrationsAsync()
        {
            var registrationManager = new RegistrationManagerForTest();
            var push = new Push(registrationManager);

            push.ListRegistrationsAsync(this.originalNSData).Wait();
            registrationManager.VerifyPushHandle(this.originalNSDataTrimmed);
        }
コード例 #2
0
        public void RegisterTemplateAsync()
        {
            var registrationManager = new RegistrationManagerForTest();
            var push = new Push(registrationManager);

            push.RegisterTemplateAsync(this.originalNSData, "jsonBody", "expiry", "templateName").Wait();
            registrationManager.VerifyPushHandle(this.originalNSDataTrimmed);
        }
コード例 #3
0
        public void RegisterNativeAsyncWithTags()
        {
            var registrationManager = new RegistrationManagerForTest();
            var push = new Push(registrationManager);

            push.RegisterNativeAsync(this.originalNSData, new List<string> {"foo"}).Wait();
            registrationManager.VerifyPushHandle(this.originalNSDataTrimmed);
        }
コード例 #4
0
        public void RegisterTemplateAsyncWithTags()
        {
            var registrationManager = new RegistrationManagerForTest();
            var push = new Push(registrationManager);

            push.RegisterTemplateAsync(this.originalNSData, "jsonBody", "expiry", "templateName", new List <string> {
                "foo"
            }).Wait();
            registrationManager.VerifyPushHandle(this.originalNSDataTrimmed);
        }
コード例 #5
0
        public void RegisterNativeAsyncWithTags()
        {
            var registrationManager = new RegistrationManagerForTest();
            var push = new Push(registrationManager);

            push.RegisterNativeAsync(this.originalNSData, new List <string> {
                "foo"
            }).Wait();
            registrationManager.VerifyPushHandle(this.originalNSDataTrimmed);
        }
コード例 #6
0
 private async Task VerifyRegistration(Dictionary<string, string> parameters, Push push)
 {
     try
     {
         await this.GetClient().InvokeApiAsync("verifyRegisterInstallationResult", HttpMethod.Get, parameters);
     }
     finally
     {
         push.UnregisterAsync().Wait();
         this.GetClient().CurrentUser = null;
     }
 }
コード例 #7
0
 private async Task VerifyRegistration(Dictionary <string, string> parameters, Push push)
 {
     try
     {
         await this.GetClient().InvokeApiAsync("verifyRegisterInstallationResult", HttpMethod.Get, parameters);
     }
     finally
     {
         push.UnregisterAsync().Wait();
         this.GetClient().CurrentUser = null;
     }
 }