using RustService = AIStudio.Tools.RustService; namespace AIStudio.Provider; /// /// The base class for all providers. /// public abstract class BaseProvider { /// /// The HTTP client to use for all requests. /// protected readonly HttpClient httpClient = new(); /// /// The logger to use. /// protected readonly ILogger logger; static BaseProvider() { RUST_SERVICE = Program.RUST_SERVICE; ENCRYPTION = Program.ENCRYPTION; } protected static readonly RustService RUST_SERVICE; protected static readonly Encryption ENCRYPTION; /// /// Constructor for the base provider. /// /// The base URL for the provider. /// The logger service to use. protected BaseProvider(string url, ILogger loggerService) { this.logger = loggerService; // Set the base URL: this.httpClient.BaseAddress = new(url); } }