Esempio n. 1
0
 /// <summary>
 /// Create new client which uses downloaded database
 /// </summary>
 /// <param name="workingDirectory">AzurAPI database location</param>
 public AzurAPIClient(string workingDirectory, AzurAPIClientOptions options)
 {
     ClientType        = ClientType.Local;
     options.LocalPath = workingDirectory;
     Options           = options;
     VersionInfo       = getVersionInfo();
 }
Esempio n. 2
0
        public AzurAPIClient(ClientType clientType, AzurAPIClientOptions options = null)
        {
            options ??= new AzurAPIClientOptions();
            this.ClientType = clientType;
            if (IsLocal && options.LocalPath == null)
            {
                throw new Exception("options.LocalPath must be specified when using Local client");
            }
            if (IsHiei)
            {
                _restClient = new RestClient(options.HieiUrl);
                _restClient.AddDefaultHeader("authorization", options.HieiPass);
            }

            this.Options = options;
            VersionInfo  = getVersionInfo();
        }
Esempio n. 3
0
 /// <summary>
 /// Create new client that uses database from web
 /// </summary>
 public AzurAPIClient(AzurAPIClientOptions options = null)
     : this(ClientType.Web, options ??= new AzurAPIClientOptions())
 {
 }