< Summary

Information
Class: TeleFlow.Telegram.Formatting.TelegramFormattedText
Assembly: TeleFlow.Telegram.Client
File(s): /_/src/TeleFlow.Telegram.Client/Formatting/TelegramFormattedText.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 27
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
.ctor(...)100%11100%

File(s)

/_/src/TeleFlow.Telegram.Client/Formatting/TelegramFormattedText.cs

#LineLine coverage
 1namespace TeleFlow.Telegram.Formatting;
 2
 3/// <summary>
 4/// Represents Telegram text rendered with an explicit Bot API parse mode.
 5/// Instances are created by the safe HTML and MarkdownV2 builders, then passed
 6/// to framework context helpers or unwrapped explicitly for generated Telegram client methods.
 7/// </summary>
 8public sealed class TelegramFormattedText
 9{
 10    internal TelegramFormattedText(string text, TelegramParseMode parseMode)
 11    {
 2012        ArgumentException.ThrowIfNullOrEmpty(text);
 13
 14        Text = text;
 15        ParseMode = parseMode;
 2016    }
 17
 18    /// <summary>
 19    /// Gets the rendered text sent to Telegram.
 20    /// </summary>
 21    public string Text { get; }
 22
 23    /// <summary>
 24    /// Gets the explicit Bot API parse mode used to interpret <see cref="Text"/>.
 25    /// </summary>
 26    public TelegramParseMode ParseMode { get; }
 27}