refactor:删除不必要的方法
This commit is contained in:
@@ -135,22 +135,23 @@ public class MqttManagementService : IMqttManagementService
|
||||
/// </summary>
|
||||
public async Task<bool> DeleteMqttServersAsync(List<int> ids)
|
||||
{
|
||||
var result = await _mqttAppService.DeleteMqttServersAsync(ids);
|
||||
|
||||
// 批量删除成功后,从内存中移除MQTT服务器
|
||||
if (result && ids != null)
|
||||
{
|
||||
foreach (var id in ids)
|
||||
{
|
||||
if (_appStorageService.MqttServers.TryRemove(id, out var mqttServer))
|
||||
{
|
||||
_eventService.RaiseMqttServerChanged(
|
||||
this, new MqttServerChangedEventArgs(ActionChangeType.Deleted, mqttServer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
// var result = await _mqttAppService.DeleteMqttServersAsync(ids);
|
||||
//
|
||||
// // 批量删除成功后,从内存中移除MQTT服务器
|
||||
// if (result && ids != null)
|
||||
// {
|
||||
// foreach (var id in ids)
|
||||
// {
|
||||
// if (_appStorageService.MqttServers.TryRemove(id, out var mqttServer))
|
||||
// {
|
||||
// _eventService.RaiseMqttServerChanged(
|
||||
// this, new MqttServerChangedEventArgs(ActionChangeType.Deleted, mqttServer));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return result;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user