public void Activated(PluginRuntime pluginRuntime) { ISystemResolver systemResolver = ServiceRegistration.Get<ISystemResolver>(); var appKey = systemResolver.SystemType == SystemType.Server ? KEY_SERVER : KEY_CLIENT; // The appkey and shared key can be found in onetrueeror.com OneTrue.Configuration.Credentials(appKey.Item1, appKey.Item2); OneTrue.Configuration.CatchWinFormsExceptions(); OneTrue.Configuration.Advanced.UploadReportFailed += OnUploadReportFailed; // Exchange the logger by the error reporting wrapper var currentLogger = ServiceRegistration.Get<ILogger>(); var errorLogger = new ErrorLogWrapper(currentLogger); ServiceRegistration.Set<ILogger>(errorLogger); }
public void Activated(PluginRuntime pluginRuntime) { ISystemResolver systemResolver = ServiceRegistration.Get <ISystemResolver>(); var appKey = systemResolver.SystemType == SystemType.Server ? KEY_SERVER : KEY_CLIENT; // The appkey and shared key can be found in onetrueeror.com OneTrue.Configuration.Credentials(appKey.Item1, appKey.Item2); OneTrue.Configuration.CatchWinFormsExceptions(); OneTrue.Configuration.Advanced.UploadReportFailed += OnUploadReportFailed; // Exchange the logger by the error reporting wrapper var currentLogger = ServiceRegistration.Get <ILogger>(); var errorLogger = new ErrorLogWrapper(currentLogger); ServiceRegistration.Set <ILogger>(errorLogger); }