Show / Hide Table of Contents

Class ServiceExtentions

Inheritance
System.Object
ServiceExtentions
Namespace:InfinniPlatform.Http
Assembly:InfinniPlatform.Core.Abstractions.dll
Syntax
public static class ServiceExtentions : object

Methods

| Improve this Doc View Source

RegisterHttpServices(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'.

| Improve this Doc View Source

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'.

| Improve this Doc View Source

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'.

| Improve this Doc View Source

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'.

  • Improve this Doc
  • View Source
Back to top © Copyright Infinnity Solutions Ltd, 2010–2017.