File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
articles/azure-app-configuration Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ namespace TestConsole
118
118
_refresher = options .GetRefresher ();
119
119
}).Build ();
120
120
121
- await using var serviceBusClient = await RegisterRefreshEventHandler ();
121
+ await RegisterRefreshEventHandler ();
122
122
var message = configuration [" TestApp:Settings:Message" ];
123
123
Console .WriteLine ($" Initial value: {configuration [" TestApp:Settings:Message" ]}" );
124
124
@@ -136,11 +136,11 @@ namespace TestConsole
136
136
}
137
137
}
138
138
139
- private static async Task < IAsyncDisposable > RegisterRefreshEventHandler ()
139
+ private static async Task RegisterRefreshEventHandler ()
140
140
{
141
141
string serviceBusConnectionString = Environment .GetEnvironmentVariable (ServiceBusConnectionStringEnvVarName );
142
142
string serviceBusTopic = Environment .GetEnvironmentVariable (ServiceBusTopicEnvVarName );
143
- string serviceBusSubscription = Environment .GetEnvironmentVariable (ServiceBusSubscriptionEnvVarName );
143
+ string serviceBusSubscription = Environment .GetEnvironmentVariable (ServiceBusSubscriptionEnvVarName );
144
144
ServiceBusClient serviceBusClient = new ServiceBusClient (serviceBusConnectionString );
145
145
ServiceBusProcessor serviceBusProcessor = serviceBusClient .CreateProcessor (serviceBusTopic , serviceBusSubscription );
146
146
@@ -165,7 +165,6 @@ namespace TestConsole
165
165
};
166
166
167
167
await serviceBusProcessor .StartProcessingAsync ();
168
- return serviceBusClient ;
169
168
}
170
169
}
171
170
}
You can’t perform that action at this time.
0 commit comments