< Summary

Information
Class: TeleFlow.Annotations.CallbackDataAttribute
Assembly: TeleFlow.Annotations
File(s): /_/src/TeleFlow.Annotations/Callbacks/CallbackDataAttribute.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 22
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.Annotations/Callbacks/CallbackDataAttribute.cs

#LineLine coverage
 1namespace TeleFlow.Annotations;
 2/// <summary>
 3/// Defines the compact callback data prefix for a typed callback payload.
 4/// </summary>
 5[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
 6public sealed class CallbackDataAttribute : TeleFlowAttribute
 7{
 8    /// <summary>
 9    /// Creates callback data metadata for the payload type.
 10    /// </summary>
 11    /// <param name="prefix">Stable callback data prefix used to identify the payload type.</param>
 712    public CallbackDataAttribute(string prefix)
 13    {
 714        ArgumentException.ThrowIfNullOrWhiteSpace(prefix);
 15        Prefix = prefix;
 716    }
 17
 18    /// <summary>
 19    /// Stable prefix used when serializing and matching the callback payload.
 20    /// </summary>
 21    public string Prefix { get; }
 22}

Methods/Properties

.ctor(System.String)