ZPT-Sharp  v1.0.0
Zope Page Templates for .NET
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
CSF.Zpt.ZptDocumentFactory Class Reference

Default implementation of IZptDocumentFactory. More...

Inheritance diagram for CSF.Zpt.ZptDocumentFactory:
Collaboration diagram for CSF.Zpt.ZptDocumentFactory:

Public Member Functions

bool TryDetectMode (FileInfo sourceFile, out RenderingMode detectedMode)
 Gets a value indicating the RenderingMode detected for a given source file. More...
 
IZptDocument CreateDocument (FileInfo sourceFile, Encoding encoding, RenderingMode?renderingMode)
 Creates a document from the given source file. More...
 
IZptDocument CreateDocument (FileInfo sourceFile, Type providerType, Encoding encoding=null)
 Creates a document from the given source file. More...
 
IZptDocument CreateDocument (Stream source, RenderingMode renderingMode, ISourceInfo sourceInfo=null, Encoding encoding=null)
 Creates a document from the given source stream. More...
 
IZptDocument CreateDocument (Stream source, Type providerType, ISourceInfo sourceInfo=null, Encoding encoding=null)
 Creates a document from the given source file. More...
 
Tales.TemplateFile CreateTemplateFile (FileInfo sourceFile, Encoding encoding, RenderingMode?renderingMode)
 Creates a template file from the given source file. More...
 
Tales.TemplateFile CreateTemplateFile (FileInfo sourceFile, Type providerType, Encoding encoding=null)
 Creates a template file from the given source file. More...
 
Tales.TemplateFile CreateTemplateFile (IZptDocument document)
 Creates a template file from the given ZPT document. More...
 
 ZptDocumentFactory (IZptDocumentProviderService providers=null)
 Initializes a new instance of the CSF.Zpt.ZptDocumentFactory class. More...
 

Static Public Member Functions

static IEnumerable< string > GetHtmlExtensions ()
 Gets the file extensions which indicate that an RenderingMode.Html should be used. More...
 
static IEnumerable< string > GetXmlExtensions ()
 Gets the file extensions which indicate that an RenderingMode.Xml should be used. More...
 

Properties

virtual IEnumerable< string > SupportedFileExtensions [get]
 Gets the supported file extensions. More...
 

Detailed Description

Default implementation of IZptDocumentFactory.

Constructor & Destructor Documentation

CSF.Zpt.ZptDocumentFactory.ZptDocumentFactory ( IZptDocumentProviderService  providers = null)
inline

Initializes a new instance of the CSF.Zpt.ZptDocumentFactory class.

Member Function Documentation

IZptDocument CSF.Zpt.ZptDocumentFactory.CreateDocument ( FileInfo  sourceFile,
Encoding  encoding,
RenderingMode renderingMode 
)
inline

Creates a document from the given source file.

Parameters
sourceFileThe source file containing the document to create.
encodingThe text encoding to use in reading the source file.
renderingModeThe rendering mode to use in creating the output document.

Implements CSF.Zpt.IZptDocumentFactory.

IZptDocument CSF.Zpt.ZptDocumentFactory.CreateDocument ( FileInfo  sourceFile,
Type  providerType,
Encoding  encoding = null 
)
inline

Creates a document from the given source file.

Parameters
sourceFileThe source file containing the document to create.
providerTypeThe IZptDocumentProvider type to use for creating the document.
encodingThe text encoding to use in reading the source file.

Implements CSF.Zpt.IZptDocumentFactory.

IZptDocument CSF.Zpt.ZptDocumentFactory.CreateDocument ( Stream  source,
RenderingMode  renderingMode,
ISourceInfo  sourceInfo = null,
Encoding  encoding = null 
)
inline

Creates a document from the given source stream.

Parameters
sourceThe stream containing the document to create.
renderingModeThe rendering mode to use in creating the output document.
sourceInfoOptional information about the source of the document.
encodingThe text encoding to use in reading the source file.

Implements CSF.Zpt.IZptDocumentFactory.

IZptDocument CSF.Zpt.ZptDocumentFactory.CreateDocument ( Stream  source,
Type  providerType,
ISourceInfo  sourceInfo = null,
Encoding  encoding = null 
)
inline

Creates a document from the given source file.

Parameters
sourceThe stream containing the document to create.
providerTypeThe IZptDocumentProvider type to use for creating the document.
sourceInfoOptional information about the source of the document.
encodingThe text encoding to use in reading the source file.

Implements CSF.Zpt.IZptDocumentFactory.

Tales.TemplateFile CSF.Zpt.ZptDocumentFactory.CreateTemplateFile ( FileInfo  sourceFile,
Encoding  encoding,
RenderingMode renderingMode 
)
inline

Creates a template file from the given source file.

Parameters
sourceFileThe source file containing the document to create.
encodingThe text encoding to use in reading the source file.
renderingModeThe rendering mode to use in creating the output document.

Implements CSF.Zpt.Tales.ITemplateFileFactory.

Tales.TemplateFile CSF.Zpt.ZptDocumentFactory.CreateTemplateFile ( FileInfo  sourceFile,
Type  providerType,
Encoding  encoding = null 
)
inline

Creates a template file from the given source file.

Parameters
sourceFileThe source file containing the document to create.
providerTypeThe IZptDocumentProvider type to use for creating the document.
encodingThe text encoding to use in reading the source file.

Implements CSF.Zpt.Tales.ITemplateFileFactory.

Tales.TemplateFile CSF.Zpt.ZptDocumentFactory.CreateTemplateFile ( IZptDocument  document)
inline

Creates a template file from the given ZPT document.

Returns
The template file.
Parameters
documentDocument.

Implements CSF.Zpt.Tales.ITemplateFileFactory.

static IEnumerable<string> CSF.Zpt.ZptDocumentFactory.GetHtmlExtensions ( )
inlinestatic

Gets the file extensions which indicate that an RenderingMode.Html should be used.

Returns
The HTML extensions.
static IEnumerable<string> CSF.Zpt.ZptDocumentFactory.GetXmlExtensions ( )
inlinestatic

Gets the file extensions which indicate that an RenderingMode.Xml should be used.

Returns
The XML extensions.
bool CSF.Zpt.ZptDocumentFactory.TryDetectMode ( FileInfo  sourceFile,
out RenderingMode  detectedMode 
)
inline

Gets a value indicating the RenderingMode detected for a given source file.

Returns
true if the RenderingMode could be auto-detected; false if not.
Parameters
sourceFileThe source file.
detectedModeExposes the detected rendering mode.

Implements CSF.Zpt.IZptDocumentFactory.

Property Documentation

virtual IEnumerable<string> CSF.Zpt.ZptDocumentFactory.SupportedFileExtensions
get

Gets the supported file extensions.

The supported file extensions.


The documentation for this class was generated from the following file: