File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,18 @@ public class ImportDefinition
8484 [ JsonPropertyName ( "validatorKey" ) ]
8585 public string ? ValidatorKey { get ; set ; }
8686
87+ /// <summary>
88+ /// Retrieves a field definition by its name, ignoring case.
89+ /// </summary>
90+ /// <param name="name">The name of the field to retrieve.</param>
91+ /// <returns>
92+ /// The <see cref="FieldDefinition"/> that matches the specified name, or <see langword="null"/> if no matching field is found.
93+ /// </returns>
94+ public FieldDefinition ? GetField ( string name )
95+ {
96+ return Fields . Find ( f => f . Name . Equals ( name , StringComparison . OrdinalIgnoreCase ) ) ;
97+ }
98+
8799 /// <summary>
88100 /// Builds a mapping between import fields and source headers using regular expressions defined in <see cref="Fields"/>.
89101 /// </summary>
You can’t perform that action at this time.
0 commit comments