private void button1_Click(object sender, EventArgs e)
{
while (listBoxObjects.Items.Count > 0)
{
this.listBoxObjects.SelectedIndex = 0;
using (ObjectDeleteRequest request = new ObjectDeleteRequest(this.comboBoxBucketNames.SelectedItem.ToString(), this.listBoxObjects.SelectedItem.ToString()))
{
//request.RedirectUrl = redirectUrl;
using (ObjectDeleteResponse response = service.ObjectDelete(request))
{ }
}
this.listBoxObjects.Items.Remove(this.listBoxObjects.SelectedItem);
}
using (BucketDeleteRequest r = new BucketDeleteRequest(this.comboBoxBucketNames.Text))
{
using (BucketDeleteResponse resp = service.BucketDelete(r))
{
Debug.WriteLine(resp.StatusCode);
}
}
}
No comments:
Post a Comment