using System.Collections.Generic;
using System.Threading.Tasks;
using CoreAgent.Domain.Entities;
using CoreAgent.Domain.Interfaces;
namespace CoreAgent.Infrastructure.Services
{
///
/// 网络配置服务实现
///
public class NetworkConfigurationService : INetworkConfigurationService
{
private readonly INetworkConfigurationRepository _repository;
///
/// 构造函数
///
/// 网络配置仓储
public NetworkConfigurationService(INetworkConfigurationRepository repository)
{
_repository = repository;
}
///
/// 创建网络配置
///
public Task CreateAsync(
string configKey,
string ragConfig,
List coreOrImsConfigs,
string apn,
List band,
string comment = null)
{
return _repository.CreateAsync(configKey, ragConfig, coreOrImsConfigs, apn, band, comment);
}
///
/// 保存网络配置
///
public Task SaveAsync(NetworkConfiguration configuration)
{
return _repository.SaveAsync(configuration);
}
///
/// 删除网络配置
///
public Task DeleteAsync(string configKey)
{
return _repository.DeleteAsync(configKey);
}
///
/// 获取所有网络配置
///
public Task> GetAllAsync()
{
return _repository.GetAllAsync();
}
///
/// 根据配置键获取网络配置
///
public Task GetByConfigKeyAsync(string configKey)
{
return _repository.GetByConfigKeyAsync(configKey);
}
}
}