Ejemplo n.º 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="args"> Arguments for the constructor. Contains the fingerprint file name, the debug file name and the checkFingerprint status</param>
        public ApiClient(ApiClientArgs args)
        {
            if (args == null)
            {
                throw new ApiClientException("ERROR: input is invalid");
            }

            CheckFingerprint = args.CheckFingerprint;
            _proxySettings   = new ApiProxySettingsProcessor(args.ProxySetting);
            if (args.Port != null)
            {
                _portResolver = new ApiPortResolver(args.Port.Value, args.IsUserEnteredPort);
            }
            FingerprintManager = new FingerprintManager(args.FingerprintFile, _proxySettings);
            LimitQuery         = Limit;

            if (args.DebugFile != null)
            {
                SetDebugFile(args.DebugFile);
            }
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="path">The fingerprint file name. </param>
 /// <param name="proxySettings">The proxy setting [user,password,server,port]</param>
 internal FingerprintManager(string path, ApiProxySettingsProcessor proxySettings)
 {
     SetFingerprintFile(path);
     _proxySettings = proxySettings;
 }