< Summary

Information
Class: TeleFlow.Telegram.I18n.LocaleResolutionContext
Assembly: TeleFlow.Framework.I18n
File(s): /_/src/TeleFlow.Framework.I18n/LocaleResolutionContext.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 32
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)50%22100%

File(s)

/_/src/TeleFlow.Framework.I18n/LocaleResolutionContext.cs

#LineLine coverage
 1using TeleFlow.Telegram.Schema.Types;
 2
 3namespace TeleFlow.Telegram.I18n;
 4
 5/// <summary>
 6/// Provides immutable Telegram identity data to application locale resolvers before handler dispatch.
 7/// It deliberately excludes mutable framework state and localization-engine details.
 8/// </summary>
 9public sealed class LocaleResolutionContext
 10{
 11    public LocaleResolutionContext(Update update, User? user, Chat? chat)
 12    {
 913        Update = update ?? throw new ArgumentNullException(nameof(update));
 14        User = user;
 15        Chat = chat;
 916    }
 17
 18    /// <summary>
 19    /// Gets the raw Telegram update being processed.
 20    /// </summary>
 21    public Update Update { get; }
 22
 23    /// <summary>
 24    /// Gets the user who caused the update when Telegram provides one.
 25    /// </summary>
 26    public User? User { get; }
 27
 28    /// <summary>
 29    /// Gets the chat associated with the update when Telegram provides one.
 30    /// </summary>
 31    public Chat? Chat { get; }
 32}