public ApiSession(ISessionHandler sessionHandler, IApiClient apiClient, ApiSessionParameters parameters) { _apiClient = apiClient; _sessionHandler = sessionHandler; _parameters = parameters; _syncContext = SynchronizationContext.Current; }
public void OpenApi(ApiSessionParameters parameters) { if (_session != null) { // Another session is open. // Close the session first before opening this new one ShutdownSession(); } var session = new ApiSession(this, _apiClient, parameters); OpenSession(session); }