< Summary

Information
Class: Services.ApiServices.TelegramBotApi.TelegramApiResult<T>
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/TelegramBotApi/TelegramApiResult.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 8
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Ok()100%11100%
Success(...)100%11100%
Failure(...)100%11100%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/ApiServices/TelegramBotApi/TelegramApiResult.cs

#LineLine coverage
 1namespace Services.ApiServices.TelegramBotApi;
 2
 3/// <summary>Результат вызова Bot API. Клиент не бросает исключений: сбой описан в <see cref="Error"/>.</summary>
 504public sealed record TelegramApiResult<T>(bool Ok, T? Value, string? Error = null, int? ErrorCode = null)
 5{
 116    public static TelegramApiResult<T> Success(T? value) => new(true, value);
 87    public static TelegramApiResult<T> Failure(string error, int? code = null) => new(false, default, error, code);
 8}