ve-global / ve-metrics-statsdclient-csharp

Wrappers and utilities for VE statsd infrastructure
MIT License
2 stars 7 forks source link

Support overloaded methods #11

Closed andyroyle closed 8 years ago

andyroyle commented 8 years ago

Previously the interceptors were only matching based on the method name, causing an AmbiguousMatchException when overloads were present.

Now the interceptors will match by method name, and if there are overloads present then the interceptor will use the parameters to identify the correct method. If it can't identify the correct overload it won't fire the timing code.

Additionally I've refactored the matching code into a single InterceptorBase class, and added tests to cover the overloaded case, and the generic interface case.