Пример #1
0
        public void Cleanup()
        {
            CognitoIdentity.CleanupIdentityPools();

            CleanupCreatedRoles();

            if (facebookUser != null)
            {
                FacebookUtilities.DeleteFacebookUser(facebookUser);
            }

            using (var sns = new AmazonSimpleNotificationServiceClient())
            {
                foreach (var topicArn in topicArns)
                {
                    sns.DeleteTopic(topicArn);
                }
                topicArns.Clear();

                if (platformApplicationArn != null)
                {
                    sns.DeletePlatformApplication(new DeletePlatformApplicationRequest
                    {
                        PlatformApplicationArn = platformApplicationArn
                    });
                }
            }
        }
Пример #2
0
        public void removeNotification(string username)
        {
            //arn:aws:sns:us-west-2:336632281456:app/GCM/mobileapp
            //_platform
            var request = new DeletePlatformApplicationRequest
            {
                PlatformApplicationArn = "arn:aws:sns:us-east-1:80398EXAMPLE:" +
                                         "app/GCM/TimeCardProcessingApplication"
            };

            snsClient.DeletePlatformApplication(request);
        }
Пример #3
0
        public static void SNSMobilePushAPIsDeletePlatformApplication()
        {
            #region SNSMobilePushAPIsDeletePlatformApplication
            var snsClient = new AmazonSimpleNotificationServiceClient();

            var request = new DeletePlatformApplicationRequest
            {
                PlatformApplicationArn = "arn:aws:sns:us-east-1:80398EXAMPLE:" +
                                         "app/GCM/TimeCardProcessingApplication"
            };

            snsClient.DeletePlatformApplication(request);
            #endregion
        }
Пример #4
0
        public bool DeletePlatformApplication(string platformApplicationArn)
        {
            if (platformApplicationArn == null)
            {
                return(false);
            }

            var request = new DeletePlatformApplicationRequest
            {
                PlatformApplicationArn = platformApplicationArn
            };

            try
            {
                snsClient.DeletePlatformApplication(request);
                return(true);
            }

            catch (Exception e)
            {
                return(false);
            }
        }