public static Factory GetInstance(Warpper _warpper) { if (null == factory) { factory = new Factory(); factory.warpper = _warpper; } return(factory); }
static void Main(string[] args) { //初始化容器 Warpper warpper = new Warpper(); Factory factory = Factory.GetInstance(warpper); string cur = ""; if (args.Count() > 0) { string path = args[0]; StreamReader sr = new StreamReader(path, Encoding.Default); cur = sr.ReadToEnd(); } #if DEBUG //cur = @"read -p C:\Users\yuanwuyang\Desktop\Net2.xls;arr -p C:\Users\yuanwuyang\Desktop\arr -n 20;cnn -i C:\Users\yuanwuyang\Desktop\arr -o C:\Users\yuanwuyang\Desktop\CNN -c C:\Users\yuanwuyang\Desktop\CNN.txt"; cur = @"read -p C:\Users\yuanwuyang\Desktop\Net1.xls;gen -p C:\Users\yuanwuyang\Desktop\Net1.txt; arr -p C:\Users\yuanwuyang\Desktop\arr -n 20;sim -i C:\Users\yuanwuyang\Desktop\arr -o C:\Users\yuanwuyang\Desktop\BPC -c C:\Users\yuanwuyang\Desktop\Net1.txt;oac -i C:\Users\yuanwuyang\Desktop\arr -o C:\Users\yuanwuyang\Desktop\OAC"; //cur = @"read -p C:\Users\yuanwuyang\Desktop\Net1.xls;anahead -o C:\Users\yuanwuyang\Desktop\res.txt;ana -i C:\Users\yuanwuyang\Desktop\arr -s C:\Users\yuanwuyang\Desktop\OAC\Sell -c C:\Users\yuanwuyang\Desktop\OAC\Control -o C:\Users\yuanwuyang\Desktop\res.txt"; #endif while (cur != "" || (cur = Console.ReadLine()) != "exit") { string[] r = cur.Split(new char[] { ';' }); foreach (string s in r) { args = s.Trim().Split(new char[] { ' ' }); if (args.Count() > 0) { if (args[0] == "exit") { return; } Command Command = factory.Create(args[0]); ExecuteCommand(args, Command); } } cur = ""; } }
public ShowIndexsCommand(Warpper _warpper) : base(_warpper) { }
public AnalysisCommand(Warpper _warpper) : base(_warpper) { }
public ReadDataCommand(Warpper _warpper) : base(_warpper) { }
public SimCNNestingCommand(Warpper _warpper) : base(_warpper) { }
public SimOACCommand(Warpper _warpper) : base(_warpper) { }
public Command(Warpper _warpper) { this.warpper = _warpper; }
public SimArrCommand(Warpper _warpper) : base(_warpper) { }
public GenBidPriceCommand(Warpper _warpper) : base(_warpper) { }