public ManagerAPI(CManagerFactory factory) { m_factory = factory ?? throw new ArgumentNullException(nameof(factory)); if (m_factory.IsValid() == false || (m_PumpMgr = m_factory.Create()) == null || (m_Mgr = m_factory.Create()) == null || (m_PumpMgrEx = m_factory.Create()) == null) { m_isValid = false; return; } m_isValid = true; Debug.Assert(m_isValid); }
public CManagerInterface CreateApi() { CheckFactory(); var api = _factory.Create(); Debug.Assert(api != null); if (api == null) { throw new InvalidOperationException("Could not create MT4 API instance"); } return(api); }
public void createDBMT4Manager() { Debug.Assert(m_DBMgr == null); m_DBMgr = m_factory.Create(); }