Repository: ccxt/ccxt
File: cs/ccxt/base/Exchange.cs (C#)

Code before:

public partial class Exchange
{

    public Exchange(object userConfig2 = null)
    {
        var userConfig = (dict)userConfig2;
        this.initializeProperties(userConfig);
        var empty = new List<string>();
        transformApiNew(this.api);

        this.initHttpClient();

        this.afterConstruct();
    }

    private void initHttpClient()
    {
        if (this.httpProxy != null && this.httpProxy.ToString().Length > 0)
        {
            var proxy = new WebProxy(this.httpProxy.ToString());
            this.httpClient = new HttpClient(new HttpClientHandler { Proxy = proxy });
        }
        else if (this.httpsProxy != null && this.httpsProxy.ToString().Length > 0)
        {
            var proxy = new WebProxy(this.httpsProxy.ToString());
            this.httpClient = new HttpClient(new HttpClientHandler { Proxy = proxy });
        }
        else
        {
            this.httpClient = new HttpClient();
        }
    }

    private void transformApiNew(dict api, List<string> paths = null)
    {
        if (api == null)
            return;
        paths ??= new List<string>();
        List<string> keyList = new List<string>(api.Keys);
        foreach (string key in keyList)
        {
            var value = api[key];

            if (isHttpMethod(key))
            {
                var dictValue = value as dict;
                List<string> endpoints = null;
                if (dictValue != null)
                {
                    endpoints = new List<string>(dictValue.Keys);

Review comment (suggestion):
`initRestRateLimiter`, `setMarkets` and `sandbox` parts are moved into `afterConstruct()` (see .ts changes)

Code after:

public partial class Exchange
{

    public Exchange(object userConfig2 = null)
    {
        var userConfig = (dict)userConfig2;
        this.initializeProperties(userConfig);
        var empty = new List<string>();
        transformApiNew(this.api);

        this.initHttpClient();

        this.afterConstruct();
    }

    private void initHttpClient()
    {
        var handler = new HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate };
        if (this.httpProxy != null && this.httpProxy.ToString().Length > 0)
        {
            var proxy = new WebProxy(this.httpProxy.ToString());
            handler.Proxy = proxy;
            this.httpClient = new HttpClient(handler);
        }
        else if (this.httpsProxy != null && this.httpsProxy.ToString().Length > 0)
        {
            var proxy = new WebProxy(this.httpsProxy.ToString());
            handler.Proxy = proxy;
            this.httpClient = new HttpClient(handler);
        }
        else
        {
            this.httpClient = new HttpClient(handler);
        }
    }

    private void transformApiNew(dict api, List<string> paths = null)
    {
        if (api == null)
            return;
        paths ??= new List<string>();
        List<string> keyList = new List<string>(api.Keys);
        foreach (string key in keyList)
        {
            var value = api[key];

            if (isHttpMethod(key))
            {
                var dictValue = value as dict;
                List<string> endpoints = null;