/// <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"; }
protected override void InitializeTarget() { var config = new ExceptronConfiguration { ApiKey = "57cb75d9eb2d457094d3f67133833eef", IncludeMachineName = true, }; if (RuntimeInfo.IsProduction) { config.ApiKey = "cc4728a35aa9414f9a0baa8eed56bc67"; } ExceptronClient = new ExceptronClient(config, BuildInfo.Version); }
protected override void InitializeTarget() { var config = new ExceptronConfiguration { ApiKey = "d64e0a72845d495abc625af3a27cf5f5", IncludeMachineName = true, }; if (RuntimeInfoBase.IsProduction) { config.ApiKey = "82c0f66dd2d64d1480cc88b551c9bdd8"; } ExceptronClient = new ExceptronClient(config, BuildInfo.Version); }
/// <summary> /// Creates a new instance of <see cref="ExceptronClient"/> /// Loads <see cref="ExceptronConfiguration"/> from application config file. /// </summary> /// <param name="applicationVersion">Version of the currently running application</param> public ExceptronClient(Version applicationVersion) : this(ExceptronConfiguration.ReadConfig(), applicationVersion) { FrameworkType = ".Net"; }