File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Elastacloud.AzureManagement.Fluent/Commands/Service Bus Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
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
+
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
+ }
You can’t perform that action at this time.
0 commit comments