Пример #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="HttpMessageDecoder" /> class.
 /// </summary>
 public HttpMessageDecoder()
 {
     _headerParser = new HeaderParser();
     _headerParser.HeaderParsed = OnHeader;
     _headerParser.RequestLineParsed = OnRequestLine;
     _headerParser.Completed = OnHeaderParsed;
     _messageReceived = delegate { };
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="HttpMessageDecoder" /> class.
 /// </summary>
 public HttpMessageDecoder()
 {
     _headerParser = new HeaderParser();
     _headerParser.HeaderParsed      = OnHeader;
     _headerParser.RequestLineParsed = OnRequestLine;
     _headerParser.Completed         = OnHeaderParsed;
     _messageReceived = delegate { };
 }
Пример #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="HttpMessageDecoder" /> class.
 /// </summary>
 /// <param name="messageSerializer">The message serializer.</param>
 /// <exception cref="System.ArgumentNullException">messageSerializer</exception>
 public HttpMessageDecoder(IMessageSerializer messageSerializer)
 {
     if (messageSerializer == null) throw new ArgumentNullException("messageSerializer");
     _messageSerializer = messageSerializer;
     _headerParser = new HeaderParser();
     _headerParser.HeaderParsed = OnHeader;
     _headerParser.RequestLineParsed = OnRequestLine;
     _headerParser.Completed = OnHeaderParsed;
     _messageReceived = delegate { };
 }
 /// <summary>
 ///     Initializes a new instance of the <see cref="HttpMessageDecoder" /> class.
 /// </summary>
 /// <param name="messageSerializer">The message serializer.</param>
 /// <exception cref="System.ArgumentNullException">messageSerializer</exception>
 public HttpMessageDecoder(IMessageSerializer messageSerializer)
 {
     if (messageSerializer == null)
     {
         throw new ArgumentNullException("messageSerializer");
     }
     _messageSerializer              = messageSerializer;
     _headerParser                   = new HeaderParser();
     _headerParser.HeaderParsed      = OnHeader;
     _headerParser.RequestLineParsed = OnRequestLine;
     _headerParser.Completed         = OnHeaderParsed;
     _messageReceived                = delegate { };
 }