Exemple #1
0
        private void InvokeQuote(SymbolInfoResult symbol, Match j)
        {
            var match         = j.Groups;
            var symbol_origin = match["symbol"].ToString().ToUpper();
            var handler       = OnNewQuote;

            if (handler != null)
            {
                handler(this, new QuoteInfoEventArgs(symbol_origin,
                                                     symbol.ask, symbol.bid, symbol.lasttime));
            }
        }
Exemple #2
0
        public void EnsureSymbolNameTooLongThrowsException()
        {
            string symbolNameThatIsTooLong = "AAA445TTT";
            bool   exceptionCaught         = false;

            try
            {
                SymbolInfoResult symbolInfoResult = new SymbolInfoResult(symbolNameThatIsTooLong);
            }
            catch (ArgumentOutOfRangeException)
            {
                exceptionCaught = true;
            }

            Assert.IsTrue(exceptionCaught);
        }