< Summary

Information
Class: TeleFlow.Telegram.ChatAction
Assembly: TeleFlow.Framework
File(s): /_/src/TeleFlow.Framework/ChatAction.cs
Line coverage
93%
Covered lines: 15
Uncovered lines: 1
Coverable lines: 16
Total lines: 44
Line coverage: 93.7%
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%
.cctor()100%11100%
Custom(...)100%11100%
ToString()100%210%

File(s)

/_/src/TeleFlow.Framework/ChatAction.cs

#LineLine coverage
 1namespace TeleFlow.Telegram;
 2
 3public readonly record struct ChatAction
 4{
 5    private ChatAction(string value)
 6    {
 147        ArgumentException.ThrowIfNullOrWhiteSpace(value);
 138        Value = value.Trim();
 139    }
 10
 11    public string Value { get; }
 12
 113    public static ChatAction Typing { get; } = new("typing");
 14
 115    public static ChatAction UploadPhoto { get; } = new("upload_photo");
 16
 117    public static ChatAction RecordVideo { get; } = new("record_video");
 18
 119    public static ChatAction UploadVideo { get; } = new("upload_video");
 20
 121    public static ChatAction RecordVoice { get; } = new("record_voice");
 22
 123    public static ChatAction UploadVoice { get; } = new("upload_voice");
 24
 125    public static ChatAction UploadDocument { get; } = new("upload_document");
 26
 127    public static ChatAction ChooseSticker { get; } = new("choose_sticker");
 28
 129    public static ChatAction FindLocation { get; } = new("find_location");
 30
 131    public static ChatAction RecordVideoNote { get; } = new("record_video_note");
 32
 133    public static ChatAction UploadVideoNote { get; } = new("upload_video_note");
 34
 35    public static ChatAction Custom(string value)
 36    {
 337        return new ChatAction(value);
 38    }
 39
 40    public override string ToString()
 41    {
 042        return Value;
 43    }
 44}