コード例 #1
0
    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);
    }
コード例 #2
0
        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);
        }