/// <summary>
        /// Initializes a new instance of the TeleSignService class with the supplied
        /// configuration and webrequester.
        /// </summary>
        /// <param name="configuration">The configuration information for the service. If null will try to read the default configuration file.</param>
        /// <param name="webRequester">The web requester to use to perform web requests. If null will use the default.</param>
        protected TeleSignService(
            TeleSignServiceConfiguration configuration,
            IWebRequester webRequester)
        {
            this.configuration = (configuration == null)
                        ? TeleSignServiceConfiguration.ReadConfigurationFile()
                        : configuration;

            this.WebRequester = (webRequester == null)
                        ? new WebRequester()
                        : webRequester;

            this.ValidateConfiguration();

            this.authentication = new TeleSignAuthentication(this.configuration.Credential);
        }
        /// <summary>
        /// This reads a configuration file called TeleSign.config.xml from
        /// the same directory as this dll.
        /// </summary>
        /// <returns>An instantiated TeleSignServiceConfiguration object containing configuration.</returns>
        public static TeleSignServiceConfiguration ReadConfigurationFile(string accountName = "default")
        {
            string configFilePath = TeleSignServiceConfiguration.GetDefaultConfigurationFilePath();

            return(TeleSignServiceConfiguration.ReadConfigurationFile(configFilePath, accountName));
        }
        /// <summary>
        /// This reads a configuration file called TeleSign.config.xml from
        /// the same directory as this dll.
        /// </summary>
        /// <returns>An instantiated TeleSignServiceConfiguration object containing configuration.</returns>
        public static TeleSignServiceConfiguration ReadConfigurationFile()
        {
            string configFilePath = TeleSignServiceConfiguration.GetDefaultConfigurationFilePath();

            return(TeleSignServiceConfiguration.ReadConfigurationFile(configFilePath));
        }