logging-log4net icon indicating copy to clipboard operation
logging-log4net copied to clipboard

Add support for nullable annotations

Open FreeAndNil opened this issue 11 months ago • 0 comments

Public classes and interfaces should get nullable annotations so that callers will be warned when passing null values.

List of breaking changes

#129 - Part 4 of nullable and modernization

  • interface log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator was replaced by IEnumerator<IAppender>
  • the signature of log4net.Appender.AppenderCollection Add and Remove changed (for implementing ICollection<IAppender>)
    • from public virtual int Add(IAppender item) to public virtual void Add(IAppender item)
    • from public virtual void Remove(IAppender item) to public virtual bool Remove(IAppender item)
  • log4net.Appender.MemoryAppender.m_eventsList (protected field) was changed from ArrayList to List<LoggingEvent>
    • for getting m_eventsList.SyncRoot you need to cast it: ((ICollection)m_eventsList).SyncRoot

FreeAndNil avatar Mar 13 '24 22:03 FreeAndNil