< Summary

Information
Class: TeleFlow.Annotations.StateValueAttribute
Assembly: TeleFlow.Annotations
File(s): /_/src/TeleFlow.Annotations/State/StateValueAttribute.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/State/StateValueAttribute.cs

#LineLine coverage
 1namespace TeleFlow.Annotations;
 2/// <summary>
 3/// Overrides the generated state value for a property inside a typed state group.
 4/// </summary>
 5[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
 6public sealed class StateValueAttribute : TeleFlowAttribute
 7{
 8    /// <summary>
 9    /// Creates state value metadata for a state group property.
 10    /// </summary>
 11    /// <param name="value">State value to use instead of the property name.</param>
 112    public StateValueAttribute(string value)
 13    {
 114        ArgumentException.ThrowIfNullOrWhiteSpace(value);
 15        Value = value;
 116    }
 17
 18    /// <summary>
 19    /// State value used instead of the property name.
 20    /// </summary>
 21    public string Value { get; }
 22}

Methods/Properties

.ctor(System.String)