/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit.Abstractions/Exceptions/RequestCanceledException.cs
39 строк
1 KB
joegoldman2
Add .NET 8 TFM (#4791)
28 ноя 2023, 16:55
Не верифицирован
28 ноя 2023, 16:55
35743ce
Код
Авторство
О чём код?
namespace MassTransit { using System; using System.Runtime.Serialization; using System.Threading; [Serializable] public class RequestCanceledException : OperationCanceledException { public RequestCanceledException() { } public RequestCanceledException(string requestId, CancellationToken cancellationToken) : base(FormatMessage(requestId), cancellationToken) { } public RequestCanceledException(string requestId, Exception innerException, CancellationToken cancellationToken) : base(FormatMessage(requestId), innerException, cancellationToken) { } #if NET8_0_OR_GREATER [Obsolete("Formatter-based serialization is obsolete and should not be used.")] #endif protected RequestCanceledException(SerializationInfo info, StreamingContext context) : base(info, context) { } static string FormatMessage(string requestId) { return $"The request was canceled, RequestId: {requestId}"; } } }