C# Класс EnterpriseWebLibrary.EnterpriseWebFramework.EwfResponse

An HTTP response, minus any caching information.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Create ( string contentType, EnterpriseWebLibrary.EnterpriseWebFramework.EwfResponseBodyCreator bodyCreator, Func fileNameCreator = null ) : EwfResponse

Creates a response.

CreateExcelWorkbookResponse ( Func extensionlessFileNameCreator, Func workbookCreator ) : EwfResponse

Creates an Excel workbook response. Automatically converts the specified file name to a safe file name.

CreateMergedCsvResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames ) : EwfResponse

Creates a response containing a comma-separated values (CSV) file created from the top level of a row tree. There will be one column for each merge field specified in the list of field names.

CreateMergedExcelWorkbookResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, bool useMsWordFieldNames = false ) : EwfResponse

Creates a response containing a single-sheet Excel workbook created from the top level of a row tree. There will be one column for each merge field specified in the list of field names. Each column head will be named by calling ToEnglishFromCamel on the merge field's name or using the Microsoft Word name without modification, the latter if useMsWordFieldNames is true.

CreateMergedMsWordDocResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, Action inputStreamProvider ) : EwfResponse

Creates a response by merging a row tree with a Microsoft Word document. If you would like each row to be on a separate page, set the first paragraph in the input file to have a page break before it.

CreateMergedMsWordDocResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, string inputFilePath ) : EwfResponse

Creates a response by merging a row tree with a Microsoft Word document. If you would like each row to be on a separate page, set the first paragraph in the input file to have a page break before it.

EwfResponse ( FullResponse fullResponse ) : System

EWF use only.

Приватные методы

Метод Описание
CreateFullResponse ( ) : FullResponse
EwfResponse ( string contentType, Func fileNameCreator, EnterpriseWebLibrary.EnterpriseWebFramework.EwfResponseBodyCreator bodyCreator ) : System

Описание методов

Create() публичный статический Метод

Creates a response.
public static Create ( string contentType, EnterpriseWebLibrary.EnterpriseWebFramework.EwfResponseBodyCreator bodyCreator, Func fileNameCreator = null ) : EwfResponse
contentType string The media type of the response. We recommend that you always specify this, but pass the empty string if you don't have it. Do /// not pass null.
bodyCreator EnterpriseWebLibrary.EnterpriseWebFramework.EwfResponseBodyCreator The response body creator.
fileNameCreator Func A function that creates the file name for saving the response. If you return a nonempty string, the response will be /// processed as an attachment with the specified file name. Do not return null from the function.
Результат EwfResponse

CreateExcelWorkbookResponse() публичный статический Метод

Creates an Excel workbook response. Automatically converts the specified file name to a safe file name.
public static CreateExcelWorkbookResponse ( Func extensionlessFileNameCreator, Func workbookCreator ) : EwfResponse
extensionlessFileNameCreator Func
workbookCreator Func
Результат EwfResponse

CreateMergedCsvResponse() публичный статический Метод

Creates a response containing a comma-separated values (CSV) file created from the top level of a row tree. There will be one column for each merge field specified in the list of field names.
public static CreateMergedCsvResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames ) : EwfResponse
extensionlessFileNameCreator Func
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
fieldNames IEnumerable
Результат EwfResponse

CreateMergedExcelWorkbookResponse() публичный статический Метод

Creates a response containing a single-sheet Excel workbook created from the top level of a row tree. There will be one column for each merge field specified in the list of field names. Each column head will be named by calling ToEnglishFromCamel on the merge field's name or using the Microsoft Word name without modification, the latter if useMsWordFieldNames is true.
public static CreateMergedExcelWorkbookResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, bool useMsWordFieldNames = false ) : EwfResponse
extensionlessFileNameCreator Func
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
fieldNames IEnumerable
useMsWordFieldNames bool
Результат EwfResponse

CreateMergedMsWordDocResponse() публичный статический Метод

Creates a response by merging a row tree with a Microsoft Word document. If you would like each row to be on a separate page, set the first paragraph in the input file to have a page break before it.
public static CreateMergedMsWordDocResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, Action inputStreamProvider ) : EwfResponse
extensionlessFileNameCreator Func
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
ensureAllFieldsHaveValues bool
inputStreamProvider Action
Результат EwfResponse

CreateMergedMsWordDocResponse() публичный статический Метод

Creates a response by merging a row tree with a Microsoft Word document. If you would like each row to be on a separate page, set the first paragraph in the input file to have a page break before it.
public static CreateMergedMsWordDocResponse ( Func extensionlessFileNameCreator, EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, string inputFilePath ) : EwfResponse
extensionlessFileNameCreator Func
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
ensureAllFieldsHaveValues bool
inputFilePath string
Результат EwfResponse

EwfResponse() публичный Метод

EWF use only.
public EwfResponse ( FullResponse fullResponse ) : System
fullResponse FullResponse
Результат System