ZPT-Sharp
v1.0.0
Zope Page Templates for .NET
|
Represents the root of an object model. More...
Public Member Functions | |
virtual void | AddLocal (string name, object value) |
Adds a new item to the current local model, identified by a given name and containing a given value. More... | |
virtual void | AddGlobal (string name, object value) |
Adds a new item to the current local model, identified by a given name and containing a given value. More... | |
virtual void | AddRepetitionInfo (IRepetitionInfo info) |
Adds information about a repetition to the current instance. More... | |
virtual void | AddError (object error) |
Adds information about an encountered error to the current model instance. More... | |
abstract IModel | CreateChildModel () |
Creates and returns a child Model instance. More... | |
virtual IModel | CreateSiblingModel () |
Creates and returns a sibling Model instance. More... | |
virtual IDictionary< string, object > | GetAllDefinitions () |
Gets all variable definitions for the current model instance. More... | |
abstract ExpressionResult | Evaluate (string expression, IRenderingContext context) |
Evaluate the specified expression and return the result. More... | |
Model (IModel parent, IModel root, object modelObject=null) | |
Initializes a new instance of the CSF.Zpt.Rendering.Model class. More... | |
Model (NamedObjectWrapper options, object modelObject=null) | |
Initializes a new root of the CSF.Zpt.Rendering.Model class. More... | |
Protected Member Functions | |
virtual IDictionary< string, object > | GetBuiltinDefinitions () |
Gets a collection of the current model's built-in definitions. More... | |
abstract Model | CreateTypedSiblingModel () |
Override in implementor classes to create a strongly-typed instance of Model, using the same model-type as the implementor class. More... | |
virtual bool | TryGetItem (string name, IRenderingContext context, out object result) |
Tries to get a named item from the current instance. More... | |
virtual bool | TryRecursivelyGetLocalItem (string name, out object result) |
Tries recursively to get an item from the local scope exposed by the current instance and its parents. More... | |
virtual IEnumerable < IRepetitionInfo > | RecursivelyGetAllRepetitions () |
Recursively gets all of the IRepetitionInfo instances from the current model and all of its parents. More... | |
virtual void | RecursivelyGetAllRepetitions (ref List< IRepetitionInfo > repetitions) |
Recursively gets all of the IRepetitionInfo instances from the current model and all of its parents. More... | |
virtual RepetitionMetadataCollectionWrapper | GetRepetitionSummaries () |
Gets the contextualised repetition summaries. More... | |
virtual NamedObjectWrapper | GetKeywordOptions () |
Gets the keyword options specified upon the current instance. More... | |
virtual IDictionary< string, object > | MergeDefinitionsDictionaries (IDictionary< string, object > first, IDictionary< string, object > second) |
Merges two dictionaries which contain variable definitions together. More... | |
virtual IDictionary< string, object > | GetAllLocalDefinitions () |
Gets a dictionary containing all of the local variable definitions. More... | |
Properties | |
virtual Dictionary< string, object > | GlobalDefinitions [get] |
Gets the global definitions. More... | |
virtual Dictionary< string, object > | LocalDefinitions [get] |
Gets the local definitions. More... | |
virtual object | Error [get] |
Gets information about an error, or a null reference if no error was encountered. More... | |
virtual IModel | Parent [get] |
Gets a reference to the parent model (if applicable). More... | |
virtual IModel | Root [get] |
Gets a reference to the root model instance in the current hierarchy. More... | |
virtual IRepetitionInfo | RepetitionInfo [get] |
Gets the repetition info for the current model instance. More... | |
object | ModelObject [get, protected set] |
Gets the model object being rendered. More... | |
static Model | Empty [get] |
Gets an empty model/null object. More... | |
![]() | |
object | Error [get] |
Gets information about an error, or a null reference if no error was encountered. More... | |
IModel | Parent [get] |
Gets a reference to the parent model (if applicable). More... | |
Represents the root of an object model.
Initializes a new instance of the CSF.Zpt.Rendering.Model class.
parent | A reference to the parent model instance, if applicable. |
root | A reference to the root of the model hierarchy. |
modelObject | The model to be rendered. |
|
inline |
Initializes a new root of the CSF.Zpt.Rendering.Model class.
options | Keyword options. |
modelObject | The model to be rendered. |
|
inlinevirtual |
Adds information about an encountered error to the current model instance.
error | Error. |
Implements CSF.Zpt.Rendering.IModel.
|
inlinevirtual |
Adds a new item to the current local model, identified by a given name and containing a given value.
name | The new item name. |
value | The item value. |
Implements CSF.Zpt.Rendering.IModelValueStore.
|
inlinevirtual |
Adds a new item to the current local model, identified by a given name and containing a given value.
name | The new item name. |
value | The item value. |
Implements CSF.Zpt.Rendering.IModelValueStore.
|
inlinevirtual |
Adds information about a repetition to the current instance.
info | The repetition information. |
Implements CSF.Zpt.Rendering.IModel.
|
pure virtual |
Creates and returns a child Model instance.
Implements CSF.Zpt.Rendering.IModel.
Implemented in CSF.Zpt.MVC.Tales.MvcTalesModel, and CSF.Zpt.Tales.TalesModel.
|
inlinevirtual |
Creates and returns a sibling Model instance.
Implements CSF.Zpt.Rendering.IModel.
|
protectedpure virtual |
Override in implementor classes to create a strongly-typed instance of Model, using the same model-type as the implementor class.
Implemented in CSF.Zpt.MVC.Tales.MvcTalesModel, and CSF.Zpt.Tales.TalesModel.
|
pure virtual |
Evaluate the specified expression and return the result.
expression | The expression to evaluate. |
context | The rendering context for which we are evaluating a result. |
Implements CSF.Zpt.Rendering.IModel.
Implemented in CSF.Zpt.Tales.TalesModel.
|
inlinevirtual |
Gets all variable definitions for the current model instance.
Implements CSF.Zpt.Rendering.IModel.
|
inlineprotectedvirtual |
Gets a dictionary containing all of the local variable definitions.
|
inlineprotectedvirtual |
Gets a collection of the current model's built-in definitions.
Reimplemented in CSF.Zpt.Tales.TalesModel, and CSF.Zpt.MVC.Tales.MvcTalesModel.
|
inlineprotectedvirtual |
Gets the keyword options specified upon the current instance.
|
inlineprotectedvirtual |
Gets the contextualised repetition summaries.
|
inlineprotectedvirtual |
Merges two dictionaries which contain variable definitions together.
The first dictionary will always 'win' in any naming conflicts. Thus if an identically-named deifinition exists in both the first and second dictionaries, then the value from the first will be used.
first | The first dictionary. |
second | The second dictionary. |
|
inlineprotectedvirtual |
Recursively gets all of the IRepetitionInfo instances from the current model and all of its parents.
|
inlineprotectedvirtual |
Recursively gets all of the IRepetitionInfo instances from the current model and all of its parents.
repetitions | The repetitions retrieved so far. |
|
inlineprotectedvirtual |
Tries to get a named item from the current instance.
true
, if an item was found, false
otherwise.name | The item name. |
context | The rendering context for which we are evaluating a result. |
result | Exposes the item which was found. |
|
inlineprotectedvirtual |
Tries recursively to get an item from the local scope exposed by the current instance and its parents.
true
, if an item was found, false
otherwise.name | The item name. |
result | Exposes the item which was found. |
|
staticget |
Gets an empty model/null object.
The empty model.
|
get |
Gets information about an error, or a null
reference if no error was encountered.
The error.
|
getprotected |
Gets the global definitions.
The global definitions.
|
getprotected |
Gets the local definitions.
The local definitions.
|
getprotected set |
Gets the model object being rendered.
The model object.
|
get |
Gets a reference to the parent model (if applicable).
The parent.
|
getprotected |
Gets the repetition info for the current model instance.
The repetition info.
|
getprotected |
Gets a reference to the root model instance in the current hierarchy.
The root.