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

Represents a ZPT document. More...

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

Public Member Functions

virtual string Render (IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to a System.String. More...
 
virtual void Render (TextWriter writer, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to the given System.IO.TextWriter. More...
 
virtual string Render (object model, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to a System.String. More...
 
virtual void Render (object model, TextWriter writer, IRenderingSettings options=null, Action< IModelValueContainer > contextConfigurator=null)
 Renders the document to the given System.IO.TextWriter. More...
 
abstract IMetalMacroContainer GetMacros ()
 Gets a collection of elements in the document which are defined as METAL macros. More...
 
abstract ISourceInfo GetSourceInfo ()
 Gets information about the source medium for the current instance More...
 
 ZptDocument (IElementRenderer elementRenderer=null)
 Initializes a new instance of the CSF.Zpt.ZptDocument class. More...
 

Protected Member Functions

virtual IRenderingSettings GetOptions (IRenderingSettings options)
 Gets a set of rendering options, or constructs a default set of options if a null reference is passed. More...
 
abstract void Render (TextWriter writer, IZptElement element, IRenderingSettings options)
 Renders an element to the given System.IO.TextWriter. More...
 
abstract IZptElement GetRootElement ()
 Creates a rendering model from the current instance. More...
 
abstract IRenderingSettings GetDefaultOptions ()
 Gets an instance of IRenderingSettings which represents the default options. More...
 
virtual TElement ConvertElement< TElement > (IZptElement element)
 Converts the given IZptElement to an implementation-specific subclass, or raises an exception if the conversion is not valid. More...
 
virtual IZptElement RenderElement (object model, IRenderingSettings options, Action< IModelValueContainer > contextConfigurator)
 Coordinates logic to the IElementRenderer. More...
 

Properties

abstract RenderingMode Mode [get]
 Gets the RenderingMode for which the current document type caters. More...
 
virtual IElementRenderer ElementRenderer [get]
 Gets the element renderer for the current instance. More...
 
- Properties inherited from CSF.Zpt.IZptDocument
RenderingMode Mode [get]
 Gets the RenderingMode for which the current document type caters. More...
 

Detailed Description

Represents a ZPT document.

Constructor & Destructor Documentation

CSF.Zpt.ZptDocument.ZptDocument ( IElementRenderer  elementRenderer = null)
inline

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

Parameters
elementRendererThe element renderer.

Member Function Documentation

virtual TElement CSF.Zpt.ZptDocument.ConvertElement< TElement > ( IZptElement  element)
inlineprotectedvirtual

Converts the given IZptElement to an implementation-specific subclass, or raises an exception if the conversion is not valid.

Returns
The converted element instance.
Parameters
elementThe element for conversion.
Template Parameters
TElementThe desired element type.
Type Constraints
TElement :class 
TElement :IZptElement 
abstract IRenderingSettings CSF.Zpt.ZptDocument.GetDefaultOptions ( )
protectedpure virtual

Gets an instance of IRenderingSettings which represents the default options.

Returns
The default options.

Implemented in CSF.Zpt.DocumentProviders.ZptXmlDocument, CSF.Zpt.DocumentProviders.ZptXmlLinqDocument, and CSF.Zpt.DocumentProviders.ZptHtmlDocument.

abstract IMetalMacroContainer CSF.Zpt.ZptDocument.GetMacros ( )
pure virtual

Gets a collection of elements in the document which are defined as METAL macros.

Returns
Elements representing the METAL macros.

Implements CSF.Zpt.IZptDocument.

Implemented in CSF.Zpt.DocumentProviders.ZptXmlDocument, CSF.Zpt.DocumentProviders.ZptHtmlDocument, and CSF.Zpt.DocumentProviders.ZptXmlLinqDocument.

virtual IRenderingSettings CSF.Zpt.ZptDocument.GetOptions ( IRenderingSettings  options)
inlineprotectedvirtual

Gets a set of rendering options, or constructs a default set of options if a null reference is passed.

Returns
The final non-null options.
Parameters
optionsOptions.
abstract IZptElement CSF.Zpt.ZptDocument.GetRootElement ( )
protectedpure virtual

Creates a rendering model from the current instance.

Returns
The rendering model.

Implemented in CSF.Zpt.DocumentProviders.ZptXmlDocument, CSF.Zpt.DocumentProviders.ZptXmlLinqDocument, and CSF.Zpt.DocumentProviders.ZptHtmlDocument.

abstract ISourceInfo CSF.Zpt.ZptDocument.GetSourceInfo ( )
pure virtual

Gets information about the source medium for the current instance

Returns
The source info.

Implements CSF.Zpt.IZptDocument.

Implemented in CSF.Zpt.DocumentProviders.ZptXmlDocument, CSF.Zpt.DocumentProviders.ZptXmlLinqDocument, and CSF.Zpt.DocumentProviders.ZptHtmlDocument.

virtual string CSF.Zpt.ZptDocument.Render ( IRenderingSettings  options = null,
Action< IModelValueContainer contextConfigurator = null 
)
inlinevirtual

Renders the document to a System.String.

Parameters
optionsThe rendering options to use. If null then default options are used.
contextConfiguratorAn optional action to perform upon the root IModelValueContainer, to configure it.

Implements CSF.Zpt.IZptDocument.

virtual void CSF.Zpt.ZptDocument.Render ( TextWriter  writer,
IRenderingSettings  options = null,
Action< IModelValueContainer contextConfigurator = null 
)
inlinevirtual

Renders the document to the given System.IO.TextWriter.

Parameters
writerThe text writer to render to.
optionsThe rendering options to use. If null then default options are used.
contextConfiguratorAn optional action to perform upon the root IModelValueContainer, to configure it.

Implements CSF.Zpt.IZptDocument.

virtual string CSF.Zpt.ZptDocument.Render ( object  model,
IRenderingSettings  options = null,
Action< IModelValueContainer contextConfigurator = null 
)
inlinevirtual

Renders the document to a System.String.

Parameters
modelAn object for which the ZPT document is to be applied.
optionsThe rendering options to use. If null then default options are used.
contextConfiguratorAn optional action to perform upon the root IModelValueContainer, to configure it.

Implements CSF.Zpt.IZptDocument.

virtual void CSF.Zpt.ZptDocument.Render ( object  model,
TextWriter  writer,
IRenderingSettings  options = null,
Action< IModelValueContainer contextConfigurator = null 
)
inlinevirtual

Renders the document to the given System.IO.TextWriter.

Parameters
modelAn object for which the ZPT document is to be applied.
writerThe text writer to render to.
optionsThe rendering options to use. If null then default options are used.
contextConfiguratorAn optional action to perform upon the root IModelValueContainer, to configure it.

Implements CSF.Zpt.IZptDocument.

abstract void CSF.Zpt.ZptDocument.Render ( TextWriter  writer,
IZptElement  element,
IRenderingSettings  options 
)
protectedpure virtual

Renders an element to the given System.IO.TextWriter.

Parameters
writerThe text writer to render to.
elementThe element to render.
optionsThe rendering options to use. If null then default options are used.

Implemented in CSF.Zpt.DocumentProviders.ZptXmlDocument, CSF.Zpt.DocumentProviders.ZptXmlLinqDocument, and CSF.Zpt.DocumentProviders.ZptHtmlDocument.

virtual IZptElement CSF.Zpt.ZptDocument.RenderElement ( object  model,
IRenderingSettings  options,
Action< IModelValueContainer contextConfigurator 
)
inlineprotectedvirtual

Coordinates logic to the IElementRenderer.

Returns
The rendered element.
Parameters
modelModel.
optionsOptions.
contextConfiguratorContext configurator.

Property Documentation

virtual IElementRenderer CSF.Zpt.ZptDocument.ElementRenderer
getprotected

Gets the element renderer for the current instance.

The element renderer.

abstract RenderingMode CSF.Zpt.ZptDocument.Mode
get

Gets the RenderingMode for which the current document type caters.

The rendering mode.


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