/// <summary> /// Constructs AutoaddressClient with a licence key and the other configuration settings using defaults. /// </summary> /// <param name="licenceKey">The licence key.</param> /// <exception cref="ArgumentNullException">licenceKey</exception> public AutoaddressClient(string licenceKey) { if (string.IsNullOrWhiteSpace(licenceKey)) throw new ArgumentNullException("licenceKey"); _licenceKey = licenceKey; _autoaddressConfig = new AutoaddressConfig(); }
/// <summary> /// Constructs AutoaddressClient with a licence key and the other configuration settings using defaults. /// </summary> /// <param name="licenceKey">The licence key.</param> /// <exception cref="ArgumentNullException">licenceKey</exception> public AutoaddressClient(string licenceKey) { if (string.IsNullOrWhiteSpace(licenceKey)) { throw new ArgumentNullException(nameof(licenceKey)); } _licenceKey = licenceKey; _autoaddressConfig = new AutoaddressConfig(); }
/// <summary> /// Constructs AutoaddressClient with the licence key loaded from the application's /// default configuration and the other configuration settings from an AutoaddressConfig object. /// /// Example App.config with licence key set. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AutoAddress.AutoAddress2_0.Settings.Licence.Key" value="TheLicenceKey"/> /// </appSettings> /// </configuration> /// </code> /// </summary> /// <param name="autoaddressConfig">The autoaddress config.</param> /// <exception cref="System.ArgumentNullException">autoaddressConfig</exception> public AutoaddressClient(AutoaddressConfig autoaddressConfig) { if (autoaddressConfig == null) throw new ArgumentNullException("autoaddressConfig"); _licenceKey = Settings.Licence.Key; _autoaddressConfig = autoaddressConfig; }
/// <summary> /// Constructs AutoaddressClient with the licence key loaded from the application's /// default configuration and the other configuration settings using defaults. /// /// Example App.config with licence key set. /// <code> /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AutoAddress.AutoAddress2_0.Settings.Licence.Key" value="TheLicenceKey"/> /// </appSettings> /// </configuration> /// </code> /// </summary> public AutoaddressClient() { _licenceKey = Settings.Licence.Key; _autoaddressConfig = new AutoaddressConfig(); }
/// <summary> /// Constructs AutoaddressClient with a licence key and an AutoaddressConfig object. /// </summary> /// <param name="licenceKey">The licence key.</param> /// <param name="autoaddressConfig">The autoaddress config.</param> /// <exception cref="System.ArgumentNullException"> /// licenceKey /// or /// autoaddressConfig /// </exception> public AutoaddressClient(string licenceKey, AutoaddressConfig autoaddressConfig) { if (string.IsNullOrWhiteSpace(licenceKey)) throw new ArgumentNullException("licenceKey"); if (autoaddressConfig == null) throw new ArgumentNullException("autoaddressConfig"); _licenceKey = licenceKey; _autoaddressConfig = autoaddressConfig; }