Click or drag to resize
ErrorUnit Namespace
ErrorUnit can be added to your projects so that errors can be logged in other environments (not just while debugging), so Unit Tests can be created from those logs. After adding ErrorUnit to your project ( nuget package) you then:
  1. Specify what classes can be monitored for errors via the below methods:

    ErrorUnit.Injector_PostSharp If you don't want to do anything else in this table, consider using our integration with PostSharp; While ErrorUnit is in Beta PostSharp is free to use with ErrorUnit.Injector_PostSharp (Thanks Gael!). Just Add [assembly:ErrorUnitAspect] to the AssemblyInfo.cs file of the project you want classes monitored for.
    ErrorUnit.Injector_WebApi Monitor Web calls to Web API Controllers via Web project filter attribute ErrorUnitWebApiActionFilterAttribute:

    ErrorUnit.Injector_WebApi Documentation

    ErrorUnit.Injector_Mvc Monitor Web calls to MVC Controllers via Web project filter attribute ErrorUnitMvcActionFilterAttribute:

    ErrorUnit.Injector_Mvc Documentation

    ErrorUnit.Interfaces.IInjector Capture errors for classes managed by your dependency injector; find your dependency injector's ErrorUnit package on nuget. Or create your own library (examples), we will give you a free ErrorUnit license and attribution if we can use it.
    ErrorUnit.ErrorUnitCentral.WrapI(I) Create an ErrorUnit Proxy classes instead of directly instantiating classes via new keyword, wrapping the specified class so that all exceptions from its interface methods and/or virtual methods are recorded.

  2. Set your Entity Framework DbContext class up to be compatible with the DbContextSerializer.

  3. Set up a ILogger library; for example ErrorUnit.Logger_Elmah. Or create your own library ( example), we will give you a free ErrorUnit license and attribution if we can use it.

Public classErrorUnitCentral
ErrorUnit Central Object that enables it all.