CodeHex/Bugsnag-NET — pull request #18 by snmaynard (2014-12-09 04:14:59+00:00)
Title: [WIP] Web mvc notify

Just opening a PR so you can see how I'm getting on. Made a few changes that may be controversial - love to hear your thoughts!

- Removed the interfaces to try and hide some internal methods. We had a bunch of internal methods (methods that shouldn't be publically viewable - like running all beforeNotify callbacks) that were public. I made them internal and then some tests and interfaces exploded. My plan is to move towards black box testing in combination with stubbing out the delivery methods so we can inspect the payload. Does this sound reasonable to you? The issue I always end up with with Unit tests is it is very difficult to make changes (though I am almost certainly doing it wrong)

- I have added some thread-safety in the library and also the option for a static class. When using the MVC app having a static (thread-safe) class makes things so much easier!

- Added in the ability to easily Bugsnag.Notify in the MVC case. It also sets the request data and the Context appropriately as I hooked up the beforeNotify callback in the initializer for the filter.

- Also played with the code that builds a stacktrace if you pass in a manual notify. I dropped the addition to the message because I was a little confused when I went to the dashboard as to why it was there. I also stripped out of the stacktrace the Bugsnag frames so it is just the app frames.

Anyway - this is way WIP, just as an FYI more than anything. If you disagree with any of the directions then let me know!