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

loresoft / FluentCommand / 9037232953

10 May 2024 07:25PM UTC coverage: 53.649% (-0.006%) from 53.655%
9037232953

push

github

pwelter34
update packages

1165 of 2845 branches covered (40.95%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

3679 of 6184 relevant lines covered (59.49%)

702.65 hits per line

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

76.19
/src/FluentCommand.SqlServer/Import/ImportDefinition.cs
1
namespace FluentCommand.Import;
2

3
/// <summary>
4
/// Import definition
5
/// </summary>
6
public class ImportDefinition
7
{
8
    /// <summary>
9
    /// Initializes a new instance of the <see cref="ImportDefinition"/> class.
10
    /// </summary>
11
    public ImportDefinition()
6✔
12
    {
13
        CanInsert = true;
6✔
14
        CanUpdate = true;
6✔
15
        Fields = new List<FieldDefinition>();
6✔
16
    }
6✔
17

18
    /// <summary>
19
    /// Gets or sets the name of the import.
20
    /// </summary>
21
    /// <value>
22
    /// The name of the import.
23
    /// </value>
24
    public string Name { get; set; }
12✔
25

26
    /// <summary>
27
    /// Gets or sets the target table to merge the uploaded data into.
28
    /// </summary>
29
    /// <value>
30
    /// The target table name.
31
    /// </value>
32
    public string TargetTable { get; set; }
×
33

34
    /// <summary>
35
    /// Gets or sets a value indicating whether data can be inserted that doesn't exists in the <see cref="TargetTable"/>.
36
    /// </summary>
37
    /// <value>
38
    /// <c>true</c> if data can be inserted; otherwise, <c>false</c>.
39
    /// </value>
40
    public bool CanInsert { get; set; }
6✔
41

42
    /// <summary>
43
    /// Gets or sets a value indicating whether data can be updated when it exists in the <see cref="TargetTable"/>.
44
    /// </summary>
45
    /// <value>
46
    /// <c>true</c> if data can be updated; otherwise, <c>false</c>.
47
    /// </value>
48
    public bool CanUpdate { get; set; }
6✔
49

50
    /// <summary>
51
    /// Gets or sets the list of field definitions.
52
    /// </summary>
53
    /// <value>
54
    /// The list of field definitions.
55
    /// </value>
56
    public List<FieldDefinition> Fields { get; set; }
78✔
57

58
    /// <summary>
59
    /// Gets or sets the maximum number of errors.
60
    /// </summary>
61
    /// <value>
62
    /// The maximum number of errors.
63
    /// </value>
64
    public int MaxErrors { get; set; }
×
65

66
    /// <summary>
67
    /// Gets or sets the data row validator type.
68
    /// </summary>
69
    /// <value>
70
    /// The data row validator type.
71
    /// </value>
72
    public Type Validator { get; set; }
9✔
73

74
    /// <summary>
75
    /// Builds an <see cref="ImportDefinition"/> using the specified builder action.
76
    /// </summary>
77
    /// <param name="builder">The builder action delegate.</param>
78
    /// <returns></returns>
79
    /// <exception cref="ArgumentNullException">builder is null</exception>
80
    public static ImportDefinition Build(Action<ImportDefinitionBuilder> builder)
81
    {
82
        if (builder == null)
6!
83
            throw new ArgumentNullException(nameof(builder));
×
84

85
        var importDefinition = new ImportDefinition();
6✔
86

87
        var importBuilder = new ImportDefinitionBuilder(importDefinition);
6✔
88
        builder(importBuilder);
6✔
89

90
        return importDefinition;
6✔
91
    }
92

93
    public override string ToString()
94
    {
NEW
95
        return $"Name: {Name}, Table: {TargetTable}, Insert: {CanInsert}, Update: {CanUpdate}";
×
96
    }
97
}
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