public void Initialize(IGApiAccount account, bool canBeMainService = false) { try { Account = account; Client.AddDefaultHeaders(new Dictionary <string, string>() { { "Content-Type", "application/json; charset=UTF-8" }, { "Accept", "application/json; charset=UTF-8" }, { "X-IG-API-KEY", Account.ApiKey } }); if (!_initilized) { AccountDetails = Authenticate(); if (mainService == null && canBeMainService) { lock (serviceLock) mainService = this; } } } catch (Exception) { throw; } }
public void SetAccountService(HttpIGAccountService httpIGAccountService) { IGAccountService = httpIGAccountService; }