C# 클래스 EnterpriseWebLibrary.MailMerging.MergeOps

Contains methods that perform mail merging operations.
파일 보기 프로젝트 열기: enduracode/enterprise-web-library

공개 메소드들

메소드 설명
CreateExcelWorkbook ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, Stream destinationStream, bool useMsWordFieldNames = false ) : void

Creates a single-sheet Excel Workbook from the top level of a row tree and writes it to a stream. 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.

CreateMsWordDoc ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, Stream inputStream, Stream destinationStream ) : void

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

CreatePdf ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, MemoryStream sourcePdfStream, Stream destinationStream, bool useLegacyBehaviorOfIgnoringInvalidFields = false ) : void

Merges a row tree with a PDF document containing form fields.

CreatePdf ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, string sourcePdfFilePath, Stream destinationStream, bool useLegacyBehaviorOfIgnoringInvalidFields = false ) : void

Merges a row tree with a PDF document containing form fields.

CreatePdfFromMsWordDoc ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, string inputFilePath, Stream destinationStream ) : void

Merges a row tree with a Microsoft Word document and writes the result to a stream as a PDF 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.

CreateString ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRow row, bool ensureAllFieldsHaveValues, string template ) : string

Merges a row with a template string.

CreateTabularTextFile ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, TextWriter destinationWriter, bool useTabAsSeparator = false ) : void

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

CreateXmlDocument ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, EnterpriseWebLibrary.MailMerging.MergeFieldNameTree fieldNameTree, Stream destinationStream ) : void

Creates an XML document from a row tree and writes it to a stream using UTF-8 encoding.

GetExcelSupportedMergeFields ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree ) : IEnumerable

Gets an IEnumerable of the merge field names from the top level of the specified row tree that are supported by the CreateExcelWorkbook method.

GetMergeFieldsInTemplateString ( string template ) : EnterpriseWebLibrary.MailMerging.MergeFieldNameTree

Gets a merge field name tree of the fields that exist in the specified template string.

GetTabularTextSupportedMergeFields ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree ) : IEnumerable

Gets the names of the merge fields from the top level of the specified row tree that are supported by the CreateTabularTextFile method.

GetXmlSupportedMergeFields ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree ) : EnterpriseWebLibrary.MailMerging.MergeFieldNameTree

Gets a merge field name tree of the fields that are supported by the CreateXmlDocument method.

비공개 메소드들

메소드 설명
CreateExcelFileWriter ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, bool useMsWordFieldNames ) : EnterpriseWebLibrary.IO.ExcelFileWriter
Test ( ) : void
createMsWordDocOrPdfFromMsWordDoc ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, Stream inputStream, Stream destinationStream, bool saveAsMsWordDoc ) : void
getFieldsInTemplateString ( string template ) : IEnumerable
mergeValueTypeIsSupportedByExcel ( MergeValue mv ) : bool
mergeValueTypeIsSupportedInTabularText ( MergeValue mv ) : bool
mergeValueTypeIsSupportedInXml ( MergeValue mv ) : bool
writeRowTreeXmlElement ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, EnterpriseWebLibrary.MailMerging.MergeFieldNameTree fieldNameTree, XmlWriter writer ) : void

메소드 상세

CreateExcelWorkbook() 공개 정적인 메소드

Creates a single-sheet Excel Workbook from the top level of a row tree and writes it to a stream. 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 CreateExcelWorkbook ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, Stream destinationStream, bool useMsWordFieldNames = false ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
fieldNames IEnumerable
destinationStream Stream
useMsWordFieldNames bool
리턴 void

CreateMsWordDoc() 공개 정적인 메소드

Merges 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 CreateMsWordDoc ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, Stream inputStream, Stream destinationStream ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
ensureAllFieldsHaveValues bool
inputStream Stream
destinationStream Stream
리턴 void

CreatePdf() 공개 정적인 메소드

Merges a row tree with a PDF document containing form fields.
public static CreatePdf ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, MemoryStream sourcePdfStream, Stream destinationStream, bool useLegacyBehaviorOfIgnoringInvalidFields = false ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
ensureAllFieldsHaveValues bool
sourcePdfStream System.IO.MemoryStream
destinationStream Stream
useLegacyBehaviorOfIgnoringInvalidFields bool
리턴 void

CreatePdf() 공개 정적인 메소드

Merges a row tree with a PDF document containing form fields.
public static CreatePdf ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, string sourcePdfFilePath, Stream destinationStream, bool useLegacyBehaviorOfIgnoringInvalidFields = false ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
ensureAllFieldsHaveValues bool
sourcePdfFilePath string
destinationStream Stream
useLegacyBehaviorOfIgnoringInvalidFields bool
리턴 void

CreatePdfFromMsWordDoc() 공개 정적인 메소드

Merges a row tree with a Microsoft Word document and writes the result to a stream as a PDF 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 CreatePdfFromMsWordDoc ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, bool ensureAllFieldsHaveValues, string inputFilePath, Stream destinationStream ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
ensureAllFieldsHaveValues bool
inputFilePath string
destinationStream Stream
리턴 void

CreateString() 공개 정적인 메소드

Merges a row with a template string.
public static CreateString ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRow row, bool ensureAllFieldsHaveValues, string template ) : string
row EnterpriseWebLibrary.MailMerging.RowTree.MergeRow
ensureAllFieldsHaveValues bool
template string
리턴 string

CreateTabularTextFile() 공개 정적인 메소드

Creates a comma-separated values (CSV) or tab-separated values file 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 CreateTabularTextFile ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, IEnumerable fieldNames, TextWriter destinationWriter, bool useTabAsSeparator = false ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
fieldNames IEnumerable
destinationWriter System.IO.TextWriter
useTabAsSeparator bool
리턴 void

CreateXmlDocument() 공개 정적인 메소드

Creates an XML document from a row tree and writes it to a stream using UTF-8 encoding.
public static CreateXmlDocument ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree, EnterpriseWebLibrary.MailMerging.MergeFieldNameTree fieldNameTree, Stream destinationStream ) : void
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
fieldNameTree EnterpriseWebLibrary.MailMerging.MergeFieldNameTree
destinationStream Stream
리턴 void

GetExcelSupportedMergeFields() 공개 정적인 메소드

Gets an IEnumerable of the merge field names from the top level of the specified row tree that are supported by the CreateExcelWorkbook method.
public static GetExcelSupportedMergeFields ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree ) : IEnumerable
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
리턴 IEnumerable

GetMergeFieldsInTemplateString() 공개 정적인 메소드

Gets a merge field name tree of the fields that exist in the specified template string.
public static GetMergeFieldsInTemplateString ( string template ) : EnterpriseWebLibrary.MailMerging.MergeFieldNameTree
template string
리턴 EnterpriseWebLibrary.MailMerging.MergeFieldNameTree

GetTabularTextSupportedMergeFields() 공개 정적인 메소드

Gets the names of the merge fields from the top level of the specified row tree that are supported by the CreateTabularTextFile method.
public static GetTabularTextSupportedMergeFields ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree ) : IEnumerable
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
리턴 IEnumerable

GetXmlSupportedMergeFields() 공개 정적인 메소드

Gets a merge field name tree of the fields that are supported by the CreateXmlDocument method.
public static GetXmlSupportedMergeFields ( EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree rowTree ) : EnterpriseWebLibrary.MailMerging.MergeFieldNameTree
rowTree EnterpriseWebLibrary.MailMerging.RowTree.MergeRowTree
리턴 EnterpriseWebLibrary.MailMerging.MergeFieldNameTree