diff --git a/RDSServiceClient/RdsServiceClientOptions.cs b/RDSServiceClient/RdsServiceClientOptions.cs index 5e3f061..c3c58bb 100644 --- a/RDSServiceClient/RdsServiceClientOptions.cs +++ b/RDSServiceClient/RdsServiceClientOptions.cs @@ -4,22 +4,10 @@ namespace RDSServiceClient; public class RdsServiceClientOptions { public RdsServiceClientOptions() { } - public RdsServiceClientOptions(string baseUrl, - string disconnectUrl = "DisconnectSession", - string logoffUrl = "LogOffSession", - string sessionsUrl = "GetSessions", - string activeManagementServerUrl = "GetActiveManagementServer") + public RdsServiceClientOptions(string baseUrl) { BaseUrl = baseUrl; - DisconnectUrl = disconnectUrl; - LogoffUrl = logoffUrl; - SessionsUrl = sessionsUrl; - ActiveManagementServerUrl = activeManagementServerUrl; } public string BaseUrl { get; set; } - public string DisconnectUrl { get; set; } - public string LogoffUrl { get; set; } - public string SessionsUrl { get; set; } - public string ActiveManagementServerUrl { get; set; } } \ No newline at end of file diff --git a/RDSServiceClient/RdsSessionService.cs b/RDSServiceClient/RdsSessionService.cs index d770237..1e2a187 100644 --- a/RDSServiceClient/RdsSessionService.cs +++ b/RDSServiceClient/RdsSessionService.cs @@ -21,16 +21,16 @@ public RdsSessionService(IHttpClientFactory httpClientFactory, IOptions GetActiveManagementServer(string? connectionBroker = null) => - ProcessRequest(_options.Value.ActiveManagementServerUrl); + ProcessRequest("GetActiveManagementServer"); public Task> GetSessions(string? connectionBroker = null) => - ProcessRequest>(_options.Value.SessionsUrl); + ProcessRequest>("GetSessions"); public Task DisconnectSession(SessionInfo sessionInfo, string? connectionBroker = null) => - ProcessPostRequest(_options.Value.DisconnectUrl, sessionInfo); + ProcessPostRequest("DisconnectSession", sessionInfo); public Task LogOffSession(SessionInfo sessionInfo, string? connectionBroker = null) => - ProcessPostRequest(_options.Value.LogoffUrl, sessionInfo); + ProcessPostRequest("LogOffSession", sessionInfo); private async Task ProcessRequest(string url) {