public static void TestBook() { var msg = "M:PETR3:A:0:A:13.08:100:15:11071759:0:5"; BookParseProtocolCMP parse = new BookParseProtocolCMP(); var bookCol11 = parse.Parse(msg); BookAdd bookAdd = (BookAdd)bookCol11.BookHeader; Console.WriteLine(bookAdd.BrokerId); msg = "M:PETR4:A:0:A:99.99:100:131:11041005"; var bookCol9 = parse.Parse(msg); bookAdd = (BookAdd)bookCol9.BookHeader; Console.WriteLine(bookAdd.BrokerId); msg = "M:PETR3:D:3:5"; var bookDel = parse.Parse(msg); var book = (BookDelete)bookDel.BookHeader; Console.WriteLine(book.DeleteType); }
private MessageBase ParseBook(string msg) { return(bookParse.Parse(msg)); }