public static IMarketFileExporter GetXmlExporter(ExportFileContext context, ILogger logger) { var clientDataAccess = new ClientDataAccess(context.ClientConnectionString); var marketDataAccess = new MarketDataAccess(context.MarketConnectionString); var fileType = context.FileType; switch (fileType) { case "650": { var dataAccess = new Export650XmlDataAccess(context.MarketConnectionString); return(new Export650Xml(clientDataAccess, marketDataAccess, dataAccess, logger)); } case "810": { var dataAccess = new Export810XmlDataAccess(context.MarketConnectionString); return(new Export810Xml(clientDataAccess, marketDataAccess, dataAccess, logger)); } case "814": { var dataAccess = new Export814XmlDataAccess(context.MarketConnectionString); return(new Export814Xml(clientDataAccess, marketDataAccess, dataAccess, logger)); } case "820": { var dataAccess = new Export820XmlDataAccess(context.MarketConnectionString); return(new Export820Xml(clientDataAccess, marketDataAccess, dataAccess, logger)); } case "824": { var dataAccess = new Export824XmlDataAccess(context.MarketConnectionString); return(new Export824Xml(clientDataAccess, marketDataAccess, dataAccess, logger)); } } throw new ArgumentOutOfRangeException(fileType); }
public static IExportTransactionHandler GetXmlHandler(ExportFileContext context, ILogger logger) { var fileType = context.FileType; switch (fileType) { case "650": { var dataAccess = new Export650XmlDataAccess(context.MarketConnectionString); return(new Export650Handler(dataAccess, logger)); } case "810": { var dataAccess = new Export810XmlDataAccess(context.MarketConnectionString); return(new Export810Handler(dataAccess, logger)); } case "814": { var dataAccess = new Export814XmlDataAccess(context.MarketConnectionString); return(new Export814Handler(dataAccess, logger)); } case "820": { var dataAccess = new Export820XmlDataAccess(context.MarketConnectionString); return(new Export820Handler(dataAccess, logger)); } case "824": { var dataAccess = new Export824XmlDataAccess(context.MarketConnectionString); return(new Export824Handler(dataAccess, logger)); } } throw new ArgumentOutOfRangeException(fileType); }