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; } }); }
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; }); }
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."; }); }
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(); }); }
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; // } //}); }