コード例 #1
0
ファイル: NoContent.cs プロジェクト: Amann222/MicroHttpd
 public NoContent(TcpSettings tcpSettings,
                  IContentSettingsReadOnly contentSettings)
 {
     Validation.RequireValidTcpSettings(tcpSettings);
     _tcpSettings     = tcpSettings;
     _contentSettings = contentSettings
                        ?? throw new ArgumentNullException(nameof(contentSettings));
 }
コード例 #2
0
 public StaticFileServer(
     IReadOnlyList <IVirtualHostConfigReadOnly> vhostConfig,
     TcpSettings tcpSettings,
     IReadOnlyDictionary <StringCI, MimeTypeEntry> mimeTypes,
     IContentSettingsReadOnly contentSettings)
 {
     Validation.RequireValidTcpSettings(tcpSettings);
     _vhosts = vhostConfig
               ?? throw new ArgumentNullException(nameof(vhostConfig));
     _tcpSettings     = tcpSettings;
     _mimeTypes       = mimeTypes;
     _contentSettings = contentSettings
                        ?? throw new ArgumentNullException(nameof(contentSettings));
 }
コード例 #3
0
ファイル: HttpSession.cs プロジェクト: nam178/MicroHttpd
 public HttpSession(
     Stream connection,
     TcpSettings tcpSettings,
     IContent content,
     IContentSettingsReadOnly contentSettings,
     IHttpKeepAliveService keepAliveService,
     IHttpRequestInternal request,
     IHttpResponseInternal response)
 {
     Validation.RequireValidTcpSettings(tcpSettings);
     _tcpSettings = tcpSettings;
     _connection  = connection
                    ?? throw new ArgumentNullException(nameof(connection));
     _content = content
                ?? throw new ArgumentNullException(nameof(content));
     _contentSettings = contentSettings
                        ?? throw new ArgumentNullException(nameof(contentSettings));
     _keepAliveService = keepAliveService
                         ?? throw new ArgumentNullException(nameof(keepAliveService));
     _request = request
                ?? throw new ArgumentNullException(nameof(request));
     _response = response
                 ?? throw new ArgumentNullException(nameof(response));
 }