/// <summary> /// get ESexchange /// </summary> /// <param name="sESExchange"></param> /// <returns></returns> public ESExchange GetESExchange(string sESExchange) { ESExchange exchange = null; if (m_ESExchangeMap.ContainsKey(sESExchange)) { exchange = (ESExchange)m_ESExchangeMap[sESExchange]; } else { //create dummy exchange = new ESExchange(sESExchange, sESExchange, this); m_ESExchangeMap[sESExchange] = exchange; } return exchange; }
/// <summary> /// Constructor /// </summary> /// <param name="sCommodity"></param> /// <param name="exchange"></param> public Commodity(string sCommodity,ESExchange exchange) { m_sCommodity = sCommodity; m_ESExchange = exchange; }
/// <summary> /// add new ESExchange /// </summary> /// <param name="sESExchange"></param> /// <param name="sESExchangeDescription"></param> /// <returns></returns> public ESExchange AddESExchange(string sESExchange, string sESExchangeDescription) { ESExchange exchange = null; if (!m_ESExchangeMap.ContainsKey(sESExchange)) { exchange = new ESExchange(sESExchange, sESExchangeDescription, this); m_ESExchangeMap[sESExchange] = exchange; } else { exchange = (ESExchange)m_ESExchangeMap[sESExchange]; exchange.ESExchangeDesc = sESExchangeDescription; } return exchange; }