• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / FluentCommand / 26594986582

28 May 2026 06:28PM UTC coverage: 55.553%. First build
26594986582

push

github

pwelter34
Move JSON support, add docs and examples

1358 of 3215 branches covered (42.24%)

Branch coverage included in aggregate %.

103 of 234 new or added lines in 9 files covered. (44.02%)

4389 of 7130 relevant lines covered (61.56%)

312.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/FluentCommand/Attributes/JsonColumnAttribute.cs
1
using System.Diagnostics;
2

3
namespace FluentCommand.Attributes;
4

5
/// <summary>
6
/// Indicates that a property or field should be deserialized from a JSON column by the source-generated data reader.
7
/// </summary>
8
/// <remarks>
9
/// Apply this attribute to properties or fields whose database column contains JSON text.
10
/// </remarks>
11
[Conditional("FLUENTCOMMAND_GENERATOR")]
12
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
13
public class JsonColumnAttribute : Attribute
14
{
15
    /// <summary>
16
    /// Initializes a new instance of the <see cref="JsonColumnAttribute"/> class.
17
    /// </summary>
NEW
18
    public JsonColumnAttribute()
×
19
    {
NEW
20
    }
×
21

22
    /// <summary>
23
    /// Initializes a new instance of the <see cref="JsonColumnAttribute"/> class using an options provider type.
24
    /// </summary>
25
    /// <param name="jsonOptionsProviderType">The type that provides JSON serializer options.</param>
NEW
26
    public JsonColumnAttribute(Type jsonOptionsProviderType)
×
27
    {
NEW
28
        JsonOptionsProviderType = jsonOptionsProviderType ?? throw new ArgumentNullException(nameof(jsonOptionsProviderType));
×
NEW
29
    }
×
30

31
    /// <summary>
32
    /// Initializes a new instance of the <see cref="JsonColumnAttribute"/> class using a JSON serializer context type and type-info property name.
33
    /// </summary>
34
    /// <param name="jsonSerializerContextType">The JSON serializer context type.</param>
35
    /// <param name="jsonTypeInfoPropertyName">The JSON type-info property name on the context.</param>
NEW
36
    public JsonColumnAttribute(Type jsonSerializerContextType, string jsonTypeInfoPropertyName)
×
37
    {
NEW
38
        JsonSerializerContextType = jsonSerializerContextType ?? throw new ArgumentNullException(nameof(jsonSerializerContextType));
×
NEW
39
        JsonTypeInfoPropertyName = jsonTypeInfoPropertyName ?? throw new ArgumentNullException(nameof(jsonTypeInfoPropertyName));
×
NEW
40
    }
×
41

42
    /// <summary>
43
    /// Gets the type that provides JSON serializer options.
44
    /// </summary>
45
    public Type? JsonOptionsProviderType { get; }
46

47
    /// <summary>
48
    /// Gets the JSON serializer context type.
49
    /// </summary>
50
    public Type? JsonSerializerContextType { get; }
51

52
    /// <summary>
53
    /// Gets the JSON type-info property name on the context.
54
    /// </summary>
55
    public string? JsonTypeInfoPropertyName { get; }
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc