protected override bool PreAppendCheck()
 {
     var config = new ExceptronConfiguration()
     {
         ApiKey = ApiKey,
         ThrowExceptions = ThrowExceptions
     };
     ExceptronClient = new ExceptronClient(config, ApplicationVersion);
     return true;
 }
Exemplo n.º 2
0
        protected override void InitializeTarget()
        {
            var config = new ExceptronConfiguration
                {
                    ApiKey = "57cb75d9eb2d457094d3f67133833eef",
                    IncludeMachineName = true,
                };

            if (RuntimeInfo.IsProduction)
            {
                config.ApiKey = "cc4728a35aa9414f9a0baa8eed56bc67";
            }

            ExceptronClient = new ExceptronClient(config, BuildInfo.Version);
        }
Exemplo n.º 3
0
        /// <param name="exceptronConfiguration">exceptron client configuration</param>
        /// <param name="applicationVersion"> </param>
        public ExceptronClient(ExceptronConfiguration exceptronConfiguration, Version applicationVersion)
        {
            if (exceptronConfiguration == null)
                throw new ArgumentNullException("exceptronConfiguration");

            if (applicationVersion == null)
                throw new ArgumentNullException("applicationVersion");

            if (string.IsNullOrEmpty(exceptronConfiguration.ApiKey))
                throw new ArgumentException("An API Key was not provided");

            Configuration = exceptronConfiguration;

            RestClient = new RestClient();

            _applicationVersion = applicationVersion.ToString();

            _maxFrameworkVersion = GetMaximumFrameworkVersion();

            FrameworkType = ".Net";
        }
Exemplo n.º 4
0
        public static void SetupExceptronDriver()
        {
            var config = new ExceptronConfiguration
                             {
                                     ApiKey = "CB230C312E5C4FF38B4FB9644B05E60G",
                                     ThrowExceptions = !EnvironmentProvider.IsProduction,
                             };

            ExceptronClient = new ExceptronClient(config)
                                  {
                                      ApplicationVersion = new EnvironmentProvider().Version.ToString()
                                  };
        }