protected override void When()
 {
     var f = new SipStack();
     var messageFacttory = f.CreateMessageFactory();
     var headerFactory = f.CreateHeaderFactory();
     foreach (string message in _messages)
     {
         var parserContext = new SipParserContext(messageFacttory, headerFactory);
         parserContext.ParseCompleted += (s, e) => _subjectFoldedRequest.Add((SipRequest)e.Message);
         parserContext.Parse(SipFormatter.FormatToBytes(message));
     }
 }
Beispiel #2
0
        public SipContext CreateContext(Datagram datagram)
        {
            Check.Require(datagram, "datagram");

            _logger.Trace("Calling CreateContext...");

            var parserContext = new SipParserContext(_messageFactory, _headerFactory);
            SipContext context = null;
            parserContext.ParseCompleted += (s, e) => context = ParserContext_ParseCompleted(e, datagram);

            _logger.Trace("Calling Parse on parser context...");
            parserContext.Parse(datagram.DataBytes);
            return context;
        }
Beispiel #3
0
        public SipContext CreateContext(Datagram datagram)
        {
            Check.Require(datagram, "datagram");

            _logger.Trace("Calling CreateContext...");

            var        parserContext = new SipParserContext(_messageFactory, _headerFactory);
            SipContext context       = null;

            parserContext.ParseCompleted += (s, e) => context = ParserContext_ParseCompleted(e, datagram);

            _logger.Trace("Calling Parse on parser context...");
            parserContext.Parse(datagram.DataBytes);
            return(context);
        }