1+ namespace FIleProcessor . Models
2+ {
3+ using System ;
4+
5+ /// <summary>
6+ ///
7+ /// </summary>
8+ /// <seealso cref="System.IEquatable{FIleProcessor.Models.FileProfile}" />
9+ public record FileProfile
10+ {
11+ /// <summary>
12+ /// Gets or sets the file profile identifier.
13+ /// </summary>
14+ /// <value>
15+ /// The file profile identifier.
16+ /// </value>
17+ public Guid FileProfileId { get ; init ; }
18+
19+ /// <summary>
20+ /// Gets or sets the name.
21+ /// </summary>
22+ /// <value>
23+ /// The name.
24+ /// </value>
25+ public String Name { get ; init ; }
26+ /// <summary>
27+ /// Gets or sets the name of the operator.
28+ /// </summary>
29+ /// <value>
30+ /// The name of the operator.
31+ /// </value>
32+ public String OperatorName { get ; init ; }
33+
34+ /// <summary>
35+ /// Gets or sets the listening directory.
36+ /// </summary>
37+ /// <value>
38+ /// The listening directory.
39+ /// </value>
40+ public String ListeningDirectory { get ; init ; }
41+ /// <summary>
42+ /// Gets or sets the processed directory.
43+ /// </summary>
44+ /// <value>
45+ /// The processed directory.
46+ /// </value>
47+ public String ProcessedDirectory { get ; init ; }
48+ /// <summary>
49+ /// Gets or sets the failed directory.
50+ /// </summary>
51+ /// <value>
52+ /// The failed directory.
53+ /// </value>
54+ public String FailedDirectory { get ; init ; }
55+
56+ /// <summary>
57+ /// Gets or sets a value indicating whether this instance has header row.
58+ /// </summary>
59+ /// <value>
60+ /// <c>true</c> if this instance has header row; otherwise, <c>false</c>.
61+ /// </value>
62+ public Boolean HasHeaderRow { get ; init ; }
63+ /// <summary>
64+ /// Gets or sets a value indicating whether this instance has trailer row.
65+ /// </summary>
66+ /// <value>
67+ /// <c>true</c> if this instance has trailer row; otherwise, <c>false</c>.
68+ /// </value>
69+ public Boolean HasTrailerRow { get ; init ; }
70+ /// <summary>
71+ /// Gets or sets the file format handler.
72+ /// </summary>
73+ /// <value>
74+ /// The file format handler.
75+ /// </value>
76+ public String FileFormatHandler { get ; init ; }
77+ /// <summary>
78+ /// Gets or sets the type of the request.
79+ /// </summary>
80+ /// <value>
81+ /// The type of the request.
82+ /// </value>
83+ public String RequestType { get ; init ; }
84+
85+ /// <summary>
86+ /// Initializes a new instance of the <see cref="FileProfile" /> class.
87+ /// </summary>
88+ /// <param name="fileProfileId">The file profile identifier.</param>
89+ /// <param name="name">The name.</param>
90+ /// <param name="listeningDirectory">The listening directory.</param>
91+ /// <param name="requestType">Type of the request.</param>
92+ /// <param name="operatorName">Name of the operator.</param>
93+ /// <param name="hasHeaderRow">if set to <c>true</c> [has header row].</param>
94+ /// <param name="hasTrailerRow">if set to <c>true</c> [has trailer row].</param>
95+ public FileProfile ( Guid fileProfileId , String name , String listeningDirectory , String requestType , String operatorName , Boolean hasHeaderRow = false , Boolean hasTrailerRow = false )
96+ {
97+ this . FileProfileId = fileProfileId ;
98+ this . Name = name ;
99+ this . ListeningDirectory = listeningDirectory ;
100+ this . ProcessedDirectory = $ "{ listeningDirectory } /processed";
101+ this . FailedDirectory = $ "{ listeningDirectory } /failed";
102+ this . RequestType = requestType ;
103+ this . OperatorName = operatorName ;
104+ this . HasHeaderRow = hasHeaderRow ;
105+ this . HasTrailerRow = hasTrailerRow ;
106+ }
107+ }
108+ }
0 commit comments