GetTemplateProcessor

GetTemplateProcessor(MemoryStream, Encoding, FormValidationLogic)

创建 TemplateProcessor 实例,以便使用指定的模板。

public TemplateProcessor GetTemplateProcessor(MemoryStream templateContent, Encoding textEncoding, 
    FormValidationLogic logic = FormValidationLogic.Ignore)
参数Type描述
templateContentMemoryStream包含模板文本内容的内存流
textEncoding编码模板内容编码
logicFormValidationLogic枚举,用于在模板验证规则之一被破坏时控制行为

返回值

TemplateProcessor 实例

另请参阅


GetTemplateProcessor(string, FormValidationLogic)

创建 TemplateProcessor 实例,以便使用指定的模板。

public TemplateProcessor GetTemplateProcessor(string templatePath, 
    FormValidationLogic logic = FormValidationLogic.Ignore)
参数Type描述
templatePathStringOMR 模板文件的路径
logicFormValidationLogic枚举,用于在模板验证规则之一被破坏时控制行为

返回值

TemplateProcessor 实例

异常

异常条件
FileNotFoundException如果 templatePath 未指向现有文件

另请参阅