public bool CreateUser(string username, string account, string host, int port) { try { IBUser user = _userManager.GetUser(username); if (user == null) { user = _userManager.AddUser(username, host, port); } if (user != null) { user.SubscribeAccountUpdates(account); return(true); } return(false); } catch (Exception ex) { _Logger.Error(ex); throw ex; } }
public bool SubscribeAccountUpdates(string userName, string account) { try { IBUser user = _userManager.GetUser(userName); if (user != null) { return(user.SubscribeAccountUpdates(account)); } return(false); } catch (Exception ex) { _Logger.Error(ex); throw ex; } }