private static string GetEnvironmentEndpoint(IGEnvironment environment) { switch (environment) { case IGEnvironment.Demo: return(Endpoints.Demo); case IGEnvironment.Live: return(Endpoints.Live); default: throw new ArgumentException("Unknown IG environment", "environment"); } }
public SessionFacade(IGEnvironment environment) { var endpoint = GetEnvironmentEndpoint(environment); _restClient = new SessionRestClient(endpoint, null); }