Breaking changes

CsvHelper

BadDataExceptionclass3 breaking1 removed2 changed

BadDataException(IReadingContext, string)Breaking

The parameters changed from (ReadingContext, string) to (IReadingContext, string).

Before
public BadDataException(ReadingContext context, string message)
After
public BadDataException(IReadingContext context, string message)

BadDataException(IReadingContext, string, Exception)Breaking

The parameters changed from (ReadingContext, string, Exception) to (IReadingContext, string, Exception).

Before
public BadDataException(ReadingContext context, string message, Exception innerException)
After
public BadDataException(IReadingContext context, string message, Exception innerException)

Removed

BadDataException(ReadingContext)
CsvFieldReaderclass1 breaking1 changed

ContextBreaking

The type changed from IFieldReaderContext to IReadingContext.

Before
public virtual IFieldReaderContext Context { get; }
After
public virtual IReadingContext Context { get; }
CsvHelperExceptionclass8 breaking2 removed6 changed

CsvHelperException(IReadingContext, string)Breaking

The parameters changed from (ReadingContext, string) to (IReadingContext, string).

Before
public CsvHelperException(ReadingContext context, string message)
After
public CsvHelperException(IReadingContext context, string message)

CsvHelperException(IReadingContext, string, Exception)Breaking

The parameters changed from (ReadingContext, string, Exception) to (IReadingContext, string, Exception).

Before
public CsvHelperException(ReadingContext context, string message, Exception innerException)
After
public CsvHelperException(IReadingContext context, string message, Exception innerException)

CsvHelperException(IWritingContext, string)Breaking

The parameters changed from (WritingContext, string) to (IWritingContext, string).

Before
public CsvHelperException(WritingContext context, string message)
After
public CsvHelperException(IWritingContext context, string message)

CsvHelperException(IWritingContext, string, Exception)Breaking

The parameters changed from (WritingContext, string, Exception) to (IWritingContext, string, Exception).

Before
public CsvHelperException(WritingContext context, string message, Exception innerException)
After
public CsvHelperException(IWritingContext context, string message, Exception innerException)

ReadingContextBreaking

The type changed from ReadingContext to IReadingContext.

Before
public ReadingContext ReadingContext { get; }
After
public IReadingContext ReadingContext { get; }

WritingContextBreaking

The type changed from WritingContext to IWritingContext.

Before
public WritingContext WritingContext { get; }
After
public IWritingContext WritingContext { get; }

Removed

CsvHelperException(ReadingContext)CsvHelperException(WritingContext)
CsvParserclass1 breaking1 changed

ContextBreaking

The type changed from IParserContext to IReadingContext.

Before
public virtual IParserContext Context { get; }
After
public virtual IReadingContext Context { get; }
CsvReaderclass17 breaking14 removed3 changed

CanRead(MemberMap)Breaking

The signature changed.

Before
protected virtual bool CanRead(MemberMap memberMap)
After
public virtual bool CanRead(MemberMap memberMap)

CanRead(MemberReferenceMap)Breaking

The signature changed.

Before
protected virtual bool CanRead(MemberReferenceMap memberReferenceMap)
After
public virtual bool CanRead(MemberReferenceMap memberReferenceMap)

ContextBreaking

The type changed from IReaderContext to IReadingContext.

Before
public virtual IReaderContext Context { get; }
After
public virtual IReadingContext Context { get; }

Removed

CreateConstructorArgumentExpressionsForMapping(ClassMap, List<Expression>)CreateDynamic()CreateFieldExpression(MemberMap)CreateFillRecordAction<T>()CreateFuncForObject(Type)CreateFuncForPrimitive(Type)CreateMemberBindingsForMapping(ClassMap, Type, List<MemberBinding>)CreateReadRecordFunc(Type)CreateRecord(Type)CreateRecord<T>()FillRecord<T>(T)GetFillRecordAction<T>()GetReadRecordFunc(Type)GetReadRecordFunc<T>()
CsvSerializerclass1 breaking1 changed

ContextBreaking

The type changed from WritingContext to IWritingContext.

Before
public virtual WritingContext Context { get; }
After
public virtual IWritingContext Context { get; }
CsvWriterclass11 breaking9 removed2 changed

CanWrite(MemberMap)Breaking

The signature changed.

Before
protected virtual bool CanWrite(MemberMap memberMap)
After
public virtual bool CanWrite(MemberMap memberMap)

ContextBreaking

The type changed from WritingContext to IWritingContext.

Before
public virtual WritingContext Context { get; }
After
public virtual IWritingContext Context { get; }

Removed

AddMembers(MemberMapCollection, ClassMap)CombineDelegates<T>(IEnumerable<Action<T>>)CreateActionForDynamic<T>(IDynamicMetaObjectProvider)CreateActionForExpandoObject<T>(ExpandoObject)CreateActionForObject<T>(Type)CreateActionForPrimitive<T>(Type)CreateMemberExpression(Expression, ClassMap, MemberMap)CreateWriteRecordAction<T>(Type, T)GetWriteRecordAction<T>(T)
IFieldReaderinterface1 breaking1 changed

ContextBreaking

The type changed from IFieldReaderContext to IReadingContext.

Before
IFieldReaderContext Context { get; }
After
IReadingContext Context { get; }
IParserinterface1 breaking1 changed

ContextBreaking

The type changed from IParserContext to IReadingContext.

Before
IParserContext Context { get; }
After
IReadingContext Context { get; }
IReaderRowinterface1 breaking1 changed

ContextBreaking

The type changed from IReaderContext to IReadingContext.

Before
IReaderContext Context { get; }
After
IReadingContext Context { get; }
ISerializerinterface1 breaking1 changed

ContextBreaking

The type changed from WritingContext to IWritingContext.

Before
WritingContext Context { get; }
After
IWritingContext Context { get; }
IWriterRowinterface1 breaking1 changed

ContextBreaking

The type changed from WritingContext to IWritingContext.

Before
WritingContext Context { get; }
After
IWritingContext Context { get; }
MissingFieldExceptionclass3 breaking1 removed2 changed

MissingFieldException(IReadingContext, string)Breaking

The parameters changed from (ReadingContext, string) to (IReadingContext, string).

Before
public MissingFieldException(ReadingContext context, string message)
After
public MissingFieldException(IReadingContext context, string message)

MissingFieldException(IReadingContext, string, Exception)Breaking

The parameters changed from (ReadingContext, string, Exception) to (IReadingContext, string, Exception).

Before
public MissingFieldException(ReadingContext context, string message, Exception innerException)
After
public MissingFieldException(IReadingContext context, string message, Exception innerException)

Removed

MissingFieldException(ReadingContext)
ParserExceptionclass3 breaking1 removed2 changed

ParserException(IReadingContext, string)Breaking

The parameters changed from (ReadingContext, string) to (IReadingContext, string).

Before
public ParserException(ReadingContext context, string message)
After
public ParserException(IReadingContext context, string message)

ParserException(IReadingContext, string, Exception)Breaking

The parameters changed from (ReadingContext, string, Exception) to (IReadingContext, string, Exception).

Before
public ParserException(ReadingContext context, string message, Exception innerException)
After
public ParserException(IReadingContext context, string message, Exception innerException)

Removed

ParserException(ReadingContext)
ReaderExceptionclass3 breaking1 removed2 changed

ReaderException(IReadingContext, string)Breaking

The parameters changed from (ReadingContext, string) to (IReadingContext, string).

Before
public ReaderException(ReadingContext context, string message)
After
public ReaderException(IReadingContext context, string message)

ReaderException(IReadingContext, string, Exception)Breaking

The parameters changed from (ReadingContext, string, Exception) to (IReadingContext, string, Exception).

Before
public ReaderException(ReadingContext context, string message, Exception innerException)
After
public ReaderException(IReadingContext context, string message, Exception innerException)

Removed

ReaderException(ReadingContext)
ReadingContextclass1 breaking1 changed

ReadingContextBreaking

The type no longer implements IFieldReaderContext, IParserContext, IReaderContext. The type now implements IReadingContext.

Before
public class ReadingContext : IReaderContext, IParserContext, IFieldReaderContext, IDisposable
After
public class ReadingContext : IReadingContext, IDisposable
ValidationExceptionclass3 breaking1 removed2 changed

ValidationException(IReadingContext, string)Breaking

The parameters changed from (ReadingContext, string) to (IReadingContext, string).

Before
public ValidationException(ReadingContext context, string message)
After
public ValidationException(IReadingContext context, string message)

ValidationException(IReadingContext, string, Exception)Breaking

The parameters changed from (ReadingContext, string, Exception) to (IReadingContext, string, Exception).

Before
public ValidationException(ReadingContext context, string message, Exception innerException)
After
public ValidationException(IReadingContext context, string message, Exception innerException)

Removed

ValidationException(ReadingContext)
WriterExceptionclass3 breaking1 removed2 changed

WriterException(IWritingContext, string)Breaking

The parameters changed from (WritingContext, string) to (IWritingContext, string).

Before
public WriterException(WritingContext context, string message)
After
public WriterException(IWritingContext context, string message)

WriterException(IWritingContext, string, Exception)Breaking

The parameters changed from (WritingContext, string, Exception) to (IWritingContext, string, Exception).

Before
public WriterException(WritingContext context, string message, Exception innerException)
After
public WriterException(IWritingContext context, string message, Exception innerException)

Removed

WriterException(WritingContext)
WritingContextclass1 breaking1 changed

WritingContextBreaking

The type no longer implements ISerializerContext, IWriterContext. The type now implements IWritingContext.

Before
public class WritingContext : IWriterContext, ISerializerContext, IDisposable
After
public class WritingContext : IWritingContext, IDisposable

Removed types (5)

IFieldReaderContextIParserContextIReaderContextISerializerContextIWriterContext

CsvHelper.Configuration

Configurationclass3 breaking3 changed

BadDataFoundCallbackBreaking

The type changed from Action<ReadingContext> to Action<IReadingContext>.

Before
public virtual Action<ReadingContext> BadDataFoundCallback { get; set; }
After
public virtual Action<IReadingContext> BadDataFoundCallback { get; set; }

HeaderValidatedCallbackBreaking

The type changed from Action<bool, string[], int, ReadingContext> to Action<bool, string[], int, IReadingContext>.

Before
public virtual Action<bool, string[], int, ReadingContext> HeaderValidatedCallback { get; set; }
After
public virtual Action<bool, string[], int, IReadingContext> HeaderValidatedCallback { get; set; }

MissingFieldFoundCallbackBreaking

The type changed from Action<string[], int, ReadingContext> to Action<string[], int, IReadingContext>.

Before
public virtual Action<string[], int, ReadingContext> MissingFieldFoundCallback { get; set; }
After
public virtual Action<string[], int, IReadingContext> MissingFieldFoundCallback { get; set; }
IParserConfigurationinterface1 breaking1 changed

BadDataFoundCallbackBreaking

The type changed from Action<ReadingContext> to Action<IReadingContext>.

Before
Action<ReadingContext> BadDataFoundCallback { get; set; }
After
Action<IReadingContext> BadDataFoundCallback { get; set; }
IReaderConfigurationinterface2 breaking2 changed

HeaderValidatedCallbackBreaking

The type changed from Action<bool, string[], int, ReadingContext> to Action<bool, string[], int, IReadingContext>.

Before
Action<bool, string[], int, ReadingContext> HeaderValidatedCallback { get; set; }
After
Action<bool, string[], int, IReadingContext> HeaderValidatedCallback { get; set; }

MissingFieldFoundCallbackBreaking

The type changed from Action<string[], int, ReadingContext> to Action<string[], int, IReadingContext>.

Before
Action<string[], int, ReadingContext> MissingFieldFoundCallback { get; set; }
After
Action<string[], int, IReadingContext> MissingFieldFoundCallback { get; set; }
IWriterConfigurationinterface1 breaking1 removed

Removed

Quote

Other changes

Not breaking, but worth a look.

ReadingContextclass20 changed

The property now has a set accessor.

BufferBufferPositionBytePositionCCharPositionCharsReadColumnCountCurrentIndexFieldEndPositionFieldStartPositionHasBeenReadHeaderRecordIsFieldBadLeaveOpenRawRecordEndPositionRawRecordStartPositionRawRowRecordRow

Now virtual.

ClearCache(Caches)
WritingContextclass4 changed

The property now has a set accessor.

HasHeaderBeenWrittenHasRecordBeenWrittenLeaveOpenRow