123456789101112131415161718192021222324252627282930313233 |
- using OSHttpServer.Parser;
- namespace OSHttpServer
- {
- /// <summary>
- /// Creates request parsers when needed.
- /// </summary>
- public class RequestParserFactory : IRequestParserFactory
- {
- /// <summary>
- /// Create a new request parser.
- /// </summary>
- /// <param name="logWriter">Used when logging should be enabled.</param>
- /// <returns>A new request parser.</returns>
- public IHttpRequestParser CreateParser(ILogWriter logWriter)
- {
- return new HttpRequestParser(logWriter);
- }
- }
- /// <summary>
- /// Creates request parsers when needed.
- /// </summary>
- public interface IRequestParserFactory
- {
- /// <summary>
- /// Create a new request parser.
- /// </summary>
- /// <param name="logWriter">Used when logging should be enabled.</param>
- /// <returns>A new request parser.</returns>
- IHttpRequestParser CreateParser(ILogWriter logWriter);
- }
- }
|