public StatementContext() { try { StatementStream stream = new StatementStream(); Commoditys = stream.GetCommoditys(); Accounts = stream.GetAccounts(); ClosedTradeDetails = stream.GetClosedTradeDetails(); CommoditySummarizations = stream.GetCommoditySummarizations(); FundStatus = stream.GetFundStatus(); Parameters = stream.GetParameters(); PositionDetails = stream.GetPositionDetails(); Positions = stream.GetPositions(); Remittances = stream.GetRemittances(); Stocks = stream.GetStocks(); TradeDetails = stream.GetTradeDetails(); Trades = stream.GetTrades(); Users = stream.GetUsers(); } catch (Exception) { throw; } }
public StatementContext(params Type[] types) { try { StatementStream stream = new StatementStream(); foreach (var type in types) { if (type == typeof(Commodity)) { Commoditys = stream.GetCommoditys(); } else if (type == typeof(User)) { Users = stream.GetUsers(); } else if (type == typeof(Account)) { Accounts = stream.GetAccounts(); } else if (type == typeof(ClosedTradeDetail)) { ClosedTradeDetails = stream.GetClosedTradeDetails(); } else if (type == typeof(CommoditySummarization)) { CommoditySummarizations = stream.GetCommoditySummarizations(); } else if (type == typeof(FundStatus)) { FundStatus = stream.GetFundStatus(); } else if (type == typeof(Parameter)) { Parameters = stream.GetParameters(); } else if (type == typeof(PositionDetail)) { PositionDetails = stream.GetPositionDetails(); } else if (type == typeof(Position)) { Positions = stream.GetPositions(); } else if (type == typeof(Remittance)) { Remittances = stream.GetRemittances(); } else if (type == typeof(Stock)) { Stocks = stream.GetStocks(); } else if (type == typeof(TradeDetail)) { TradeDetails = stream.GetTradeDetails(); } else if (type == typeof(Trade)) { Trades = stream.GetTrades(); } } } catch (Exception) { throw; } }