Class ServiceExtentions
Inheritance
Namespace:InfinniPlatform.Http
Assembly:InfinniPlatform.Core.Abstractions.dll
Syntax
public static class ServiceExtentions : object
Methods
| Improve this Doc View SourceRegisterHttpServices(IContainerBuilder, Assembly)
Регистрирует все прикладные сервисы текущей сборки.
Declaration
public static void RegisterHttpServices(this IContainerBuilder builder, Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
IContainerBuilder | builder | |
Assembly | assembly |
Remarks
Сервисы будут зарегистрированы со стратегией SingleInstance().
Examples
RegisterHttpServices(GetType().Assembly)
|
Improve this Doc
View Source
SetContentDispositionAttachment(IHttpResponse, String, String)
Устанавливает заголовок 'Content-Disposition' типа 'attachment' (файл нужно скачать и не отображать средствами браузера).
Declaration
public static void SetContentDispositionAttachment(this IHttpResponse response, string fileName, string userAgent)
Parameters
Type | Name | Description |
---|---|---|
IHttpResponse | response | Ответ. |
System.String | fileName | Имя файла. |
System.String | userAgent | Значение заголовка запроса 'User-Agent'. |
SetContentDispositionAttachment(StreamHttpResponse, String)
Устанавливает заголовок 'Content-Disposition' типа 'attachment' (файл нужно скачать и не отображать средствами браузера).
Declaration
public static void SetContentDispositionAttachment(this StreamHttpResponse response, string userAgent)
Parameters
Type | Name | Description |
---|---|---|
StreamHttpResponse | response | Ответ. |
System.String | userAgent | Значение заголовка запроса 'User-Agent'. |
SetContentDispositionInline(IHttpResponse, String, String)
Устанавливает заголовок 'Content-Disposition' типа 'inline' (файл нужно отобразить средствами браузера).
Declaration
public static void SetContentDispositionInline(this IHttpResponse response, string fileName, string userAgent)
Parameters
Type | Name | Description |
---|---|---|
IHttpResponse | response | Ответ. |
System.String | fileName | Имя файла. |
System.String | userAgent | Значение заголовка запроса 'User-Agent'. |
SetContentDispositionInline(StreamHttpResponse, String)
Устанавливает заголовок 'Content-Disposition' типа 'inline' (файл нужно отобразить средствами браузера).
Declaration
public static void SetContentDispositionInline(this StreamHttpResponse response, string userAgent)
Parameters
Type | Name | Description |
---|---|---|
StreamHttpResponse | response | Ответ. |
System.String | userAgent | Значение заголовка запроса 'User-Agent'. |