void BatchPutAttributeWebResponse(object sender, ResponseEventArgs args)
        {
            ISimpleDBResponse result = args.Response;
            SimpleDB.Client.OnSimpleDBResponse -= BatchPutAttributeWebResponse;

            this.Dispatcher.BeginInvoke(() =>
                {
                    BatchPutAttributesResponse response = result as BatchPutAttributesResponse;

                    if (null != response)
                    {
                        this.BatchPutMessage = "Batch attributes put successfully";
                    }
                    else
                    {
                        AmazonSimpleDBException exception = result as AmazonSimpleDBException;
                        if (null != exception)
                            this.BatchPutMessage = "Error: " + exception.Message;
                    }
                });
        }
Example #2
0
        void ListDomainWebResponse(object sender, ResponseEventArgs args)
        {
            ISimpleDBResponse result = args.Response;
            SimpleDB.Client.OnSimpleDBResponse -= ListDomainWebResponse;

            if (result is AmazonSimpleDBException)
            {
                this.Dispatcher.BeginInvoke(() =>
                    {
                        this.ListDomainMessage = "Error: " + ((AmazonSimpleDBException)result).Message;
                    });
                return;
            }

            ListDomainsResponse response = (ListDomainsResponse)result;
            this.Dispatcher.BeginInvoke(() =>
                {
                    DomainNameList.Clear();
                    response.ListDomainsResult.DomainName.ForEach(b => DomainNameList.Add(b));
                    this.ListDomainMessage = "No of Domains: " + response.ListDomainsResult.DomainName.Count;
                });
        }
Example #3
0
 void DeleteDomainWebResponse(object sender, ResponseEventArgs args)
 {
     ISimpleDBResponse result = args.Response;
     SimpleDB.Client.OnSimpleDBResponse -= DeleteDomainWebResponse;
     if (result is AmazonSimpleDBException)
     {
         this.Dispatcher.BeginInvoke(() =>
         {
             this.DomainDeleteMessage = "Error: " + ((AmazonSimpleDBException)result).Message;
         });
         return;
     }
     else
         this.Dispatcher.BeginInvoke(() =>
             {
                 this.DomainDeleteMessage = "Domain deleted successfully.";
             });
 }
Example #4
0
        void DomainMetadataWebResponse(object sender, ResponseEventArgs args)
        {
            ISimpleDBResponse result = args.Response;
            SimpleDB.Client.OnSimpleDBResponse -= DomainMetadataWebResponse;
            if (result is AmazonSimpleDBException)
            {
                this.Dispatcher.BeginInvoke(() =>
                    {
                        this.DomainMetadataMessage = "Error: " + ((AmazonSimpleDBException)result).Message;
                    });
                return;
            }

            DomainMetadataResponse response = (DomainMetadataResponse)result;
            DomainMetadataResult domainResult = response.DomainMetadataResult;

            StringBuilder metadataResponse = new StringBuilder();
            metadataResponse.AppendLine(string.Format(CultureInfo.InvariantCulture, "Attribute Name Count: {0}", domainResult.AttributeNameCount));
            metadataResponse.AppendLine(string.Format(CultureInfo.InvariantCulture, "Attribute Value Count: {0}", domainResult.AttributeValueCount));
            metadataResponse.AppendLine(string.Format(CultureInfo.InvariantCulture, "Item Count: {0}", domainResult.ItemCount));
            metadataResponse.AppendLine(string.Format(CultureInfo.InvariantCulture, "TimeStamp: {0}", domainResult.Timestamp));

            this.Dispatcher.BeginInvoke(() =>
                {
                    this.DomainMetadataMessage = metadataResponse.ToString();
                });
        }
Example #5
0
        static void BatchPutAttributeWebResponse(object sender, ResponseEventArgs args)
        {
            ISimpleDBResponse result = args.Response;
            SimpleDB.Client.OnSimpleDBResponse -= BatchPutAttributeWebResponse;

            //this.Dispatcher.BeginInvoke(() =>
            //{
            //    BatchPutAttributesResponse response = result as BatchPutAttributesResponse;

            //    if (null != response)
            //    {
            //        this.BatchPutMessage = "Batch attributes put successfully";
            //    }
            //    else
            //    {
            //        AmazonSimpleDBException exception = result as AmazonSimpleDBException;
            //        if (null != exception)
            //            this.BatchPutMessage = "Error: " + exception.Message;
            //    }
            //});
        }