Ejemplo n.º 1
0
        protected override void InitializeTarget()
        {
            var config = new ExceptronConfiguration
                {
                    ApiKey = "d64e0a72845d495abc625af3a27cf5f5",
                    IncludeMachineName = true,
                };

            if (RuntimeInfoBase.IsProduction)
            {
                config.ApiKey = "82c0f66dd2d64d1480cc88b551c9bdd8";
            }

            ExceptronClient = new ExceptronClient(config, BuildInfo.Version);
        }
Ejemplo n.º 2
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";
        }