/// <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(); }
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(); }