| | | 1 | | namespace TeleFlow.Telegram; |
| | | 2 | | |
| | | 3 | | public sealed class TelegramErrorContext |
| | | 4 | | { |
| | | 5 | | internal TelegramErrorContext( |
| | | 6 | | Exception exception, |
| | | 7 | | TelegramUpdateContext updateContext, |
| | | 8 | | Type handlerType, |
| | | 9 | | string handlerMethodName, |
| | | 10 | | string? moduleName, |
| | | 11 | | string? sceneName, |
| | | 12 | | IReadOnlyDictionary<string, object?> routeValues) |
| | | 13 | | { |
| | 21 | 14 | | ArgumentNullException.ThrowIfNull(exception); |
| | 21 | 15 | | ArgumentNullException.ThrowIfNull(updateContext); |
| | 21 | 16 | | ArgumentNullException.ThrowIfNull(handlerType); |
| | 21 | 17 | | ArgumentException.ThrowIfNullOrWhiteSpace(handlerMethodName); |
| | 21 | 18 | | ArgumentNullException.ThrowIfNull(routeValues); |
| | | 19 | | |
| | | 20 | | Exception = exception; |
| | | 21 | | UpdateContext = updateContext; |
| | | 22 | | HandlerType = handlerType; |
| | | 23 | | HandlerMethodName = handlerMethodName; |
| | | 24 | | ModuleName = moduleName; |
| | | 25 | | SceneName = sceneName; |
| | | 26 | | RouteValues = routeValues; |
| | 21 | 27 | | } |
| | | 28 | | |
| | | 29 | | public Exception Exception { get; } |
| | | 30 | | |
| | | 31 | | public TelegramUpdateContext UpdateContext { get; } |
| | | 32 | | |
| | | 33 | | public Type HandlerType { get; } |
| | | 34 | | |
| | | 35 | | public string HandlerMethodName { get; } |
| | | 36 | | |
| | | 37 | | public string? ModuleName { get; } |
| | | 38 | | |
| | | 39 | | public string? SceneName { get; } |
| | | 40 | | |
| | | 41 | | public IReadOnlyDictionary<string, object?> RouteValues { get; } |
| | | 42 | | } |