/// <summary> Add a new error which occurred during parsing to this MARC record object </summary> /// <param name="errorType"> Type of this error </param> public void AddError(MarcRecordParsingErrorTypeEnum errorType) { // Ensure the list is built if (_errors == null) { _errors = new List <ParsingError>(); } // Build this error object var error = new ParsingError(errorType); // If no other error of the same type exists, add this if (!_errors.Contains(error)) { _errors.Add(error); } }
/// <summary> Constructor for a new instance of the MARC_Record_Parsing_Error class </summary> /// <param name="errorType"> Type of this error </param> public ParsingError(MarcRecordParsingErrorTypeEnum errorType) { this.ErrorType = errorType; ErrorDetails = string.Empty; }
/// <summary> Constructor for a new instance of the MARC_Record_Parsing_Error class </summary> /// <param name="errorType"> Type of this error </param> /// <param name="errorDetails"> Any additional information about an error </param> public ParsingError(MarcRecordParsingErrorTypeEnum errorType, string errorDetails) { this.ErrorType = errorType; this.ErrorDetails = errorDetails; }