Exemplo n.º 1
0
        public static CommandClient Create(CommandClientType type, string client)
        {
            if (type == null)
            {
                return(null);
            }

            CommandClient command = null;

            switch (type)
            {
            case CommandClientType.FortsPosition:
                command = new CommandClient(CommandNames.GetFortsPosition);
                break;

            case CommandClientType.ClientLimits:
                command = new CommandClient(CommandNames.GetClientLimits);
                break;

            case CommandClientType.LeverageControl:
                command = new CommandClient(CommandNames.GetLeverageControl);
                break;

            case CommandClientType.Portfolio:
                command = new CommandClient(CommandNames.GetPortfolio);
                break;

            case CommandClientType.PortfolioMCT:
                command = new CommandClient(CommandNames.GetPortfolioMct);
                break;

            case CommandClientType.MaxBuySell:
                command = new CommandClient(CommandNames.GetMaxBuySellTPlus);
                break;
            }

            command.Client = client;

            return(command);
        }