Skip to content

4.0.0.195

Compare
Choose a tag to compare
@scottoffen scottoffen released this 16 Nov 21:32
· 40 commits to master since this release

Enhancements

#146 Add Delegates For Multiple WebExceptionStatus Values

We previously added the ability to provide a generic delegate to handle WebException exceptions thrown in the RestClient when the status of the exception was WebExceptionStatus.Timeout. While this worked great, it didn't properly take into consideration other status values, and as a result, when other exceptions were throw, the cause of the exception was being masked by a NullReferenceException in the RestResponse constructor.

So, in addition to fixing that so that the original WebException will get thrown (and not masked), we also extended the ability so that a generic delegate can be provided for all status values. This functionality obsoletes the previous functionality introduced, but the syntax remains for now for compatibility.

#147 Call Dispose() on IDisposable Objects Created By Routes

When routes are generated using MethodInfo for non-static methods, if those classes implement IDisposable then the objects need to be disposed of properly. Failure to dispose of them properly could lead to memory leaks.

The objects generated in the routes are now checked after route execution to see if they implement IDisposable, and then calls Dispose() on the object if they do.

#149 Change Properties Implementation To Use ConcurrentDictionary

As we start taking a greater interest in performance, we've decided to move away from the ExpandoObject implementation of the DynamicProperties abstract class. I've noticed that it's always easier to treat the Properties feature like a dictionary anyway. Couple that with the performance hit from using the dynamic, and the concurrency needed anyway, this is a no-brainer.