Skip to content

Commit 714d750

Browse files
committed
missed out delete command
1 parent 48551c8 commit 714d750

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/************************************************************************************************************
2+
* This software is distributed under a GNU Lesser License by Elastacloud Limited and it is free to *
3+
* modify and distribute providing the terms of the license are followed. From the root of the source the *
4+
* license can be found in /Resources/license.txt *
5+
* *
6+
* Web at: www.elastacloud.com *
7+
* Email: [email protected] *
8+
************************************************************************************************************/
9+
10+
using System;
11+
using System.Net;
12+
using System.Text;
13+
using System.Xml.Linq;
14+
using Elastacloud.AzureManagement.Fluent.Helpers;
15+
using Elastacloud.AzureManagement.Fluent.Types.Exceptions;
16+
17+
namespace Elastacloud.AzureManagement.Fluent.Commands.Services
18+
{
19+
/// <summary>
20+
/// Used to create a hosted service within a given subscription
21+
/// </summary>
22+
internal class DeleteServiceBusNamespaceCommand : ServiceCommand
23+
{
24+
internal DeleteServiceBusNamespaceCommand(string name)
25+
{
26+
Name = name;
27+
HttpVerb = HttpVerbDelete;
28+
ServiceType = "services";
29+
OperationId = "ServiceBus";
30+
HttpCommand = "Namespaces/" + name;
31+
ContentType = "application/atom+xml;type=entry;charset=utf-8";
32+
}
33+
34+
35+
36+
protected override void ResponseCallback(System.Net.HttpWebResponse webResponse)
37+
{
38+
if (webResponse.StatusCode == HttpStatusCode.InternalServerError)
39+
{
40+
throw new FluentManagementException("delete service bus namespace not deleted", "DeleteServiceBusNamespaceCommand");
41+
}
42+
SitAndWait.Set();
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)