MicroLite 5.0 – Removal of methods from IListener

In MicroLite 5.0, the mutability of the SqlQuery object has been reduced. This change whilst helping improve the performance of MicroLite and reduce the memory footprint of the framework, does mean that the following methods on IListener can no longer be supported:

void BeforeDelete(object instance, SqlQuery sqlQuery);
void BeforeInsert(object instance, SqlQuery sqlQuery);
void BeforeUpdate(object instance, SqlQuery sqlQuery);

They were originally added in MicroLite 1.2.0 as an extensible point in the pipeline but the purpose of them was never that clear and they were never actually used within the framework itself.

Will this affect you at all? probably not.

  • If you have created a custom listener by inheriting from MicroLite.Listeners.Listener and have not overridden any of the methods mentioned then you won’t have a problem.
  • If you instead implemented MicroLite.Listeners.IListener yourself then if you didn’t actually perform any work in the methods mentioned then you can just delete them and you won’t have a problem.

If you think this change might affect you, move your code into the Before(object instance) method. If you were mutating the SqlQuery, let us know what you were doing and we will let you know the best way to handle it in 5.0.

Advertisements

One thought on “MicroLite 5.0 – Removal of methods from IListener

  1. Pingback: MicroLite 5.0 Released | MicroLite ORM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s