DD.WellWorkover.Cloud/AsbCloudApp/Services/ITelemetryUserService.cs

39 lines
1.3 KiB
C#

using AsbCloudApp.Data.SAUB;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudApp.Services
{
/// <summary>
/// сервис пользователей телеметрии
/// </summary>
public interface ITelemetryUserService
{
/// <summary>
/// get user by ids
/// </summary>
/// <param name="idTelemetry"></param>
/// <param name="idUser"></param>
/// <returns></returns>
TelemetryUserDto? GetOrDefault(int idTelemetry, int idUser);
/// <summary>
/// get users by id telemetry and predicate
/// </summary>
/// <param name="idTelemetry"></param>
/// <param name="predicate"></param>
/// <returns></returns>
IEnumerable<TelemetryUserDto> GetUsers(int idTelemetry, Func<TelemetryUserDto, bool>? predicate = default);
/// <summary>
/// получает и сохраняет/обновляет список пользователей панели оператора
/// </summary>
/// <param name="uid"></param>
/// <param name="dtos"></param>
/// <param name="token"></param>
/// <returns></returns>
Task UpsertAsync(string uid, IEnumerable<TelemetryUserDto> dtos, CancellationToken token = default);
}
}