ZPT-Sharp
v1.0.0
Zope Page Templates for .NET
|
Object which represents a System.IO.DirectoryInfo
- and implements ITalesPathHandler to wrap that directory in a TALES-friendly manner.
More...
Public Member Functions | |
virtual bool | HandleTalesPath (string pathFragment, out object result, Rendering.IRenderingContext currentContext) |
Gets an System.Object based upon a TALES path fragment. More... | |
FilesystemDirectory (DirectoryInfo directory, bool mandatoryExtensions=false) | |
Initializes a new instance of the CSF.Zpt.Tales.FilesystemDirectory class. More... | |
![]() | |
bool | HandleTalesPath (string pathFragment, out object result, IRenderingContext currentContext) |
Gets an System.Object based upon a TALES path fragment. More... | |
Protected Member Functions | |
virtual FilesystemDirectory | CreateChild (DirectoryInfo directory) |
Creates a child instance of FilesystemDirectory for the given subdirectory. More... | |
Properties | |
bool | MandatoryExtensions [get] |
Gets a value indicating whether or not filename extensions are mandatory or not. More... | |
DirectoryInfo | DirectoryInfo [get] |
Gets the DirectoryInfo associated with the current instance. More... | |
Object which represents a System.IO.DirectoryInfo
- and implements ITalesPathHandler to wrap that directory in a TALES-friendly manner.
|
inline |
Initializes a new instance of the CSF.Zpt.Tales.FilesystemDirectory class.
directory | The root directory for the current instance. |
mandatoryExtensions | A value indicating whether filename extensions are mandatory or not. |
|
inlineprotectedvirtual |
Creates a child instance of FilesystemDirectory for the given subdirectory.
directory | Directory. |
Reimplemented in CSF.Zpt.Tales.TemplateDirectory.
|
inlinevirtual |
Gets an System.Object
based upon a TALES path fragment.
This method should return a System.Object
which represents the traversal of a single-level TALES path fragment, from the current instance. The value of that fragment is passed via the name pathFragment .
The precise meaning of 'traversal' is left to the implementation, but typical semantics will see an object return an associated object from an object graph.
In this simple example, the Employee
class may return data from a related Person
object, without exposing the Person object directly. This might be because (as shown in this example), the API of that Person
object is more complex than desired, and so TALES should see a simplified version.
Note that the return value does not need to be a primitive type. It may be a complex object, and the return value may also implement ITalesPathHandler if desired.
true
if the path traversal was a success; false
otherwise.pathFragment | The path fragment. |
result | Exposes the result if the traversal was a success |
currentContext | Gets the current rendering context. |
Reimplemented in CSF.Zpt.Tales.TemplateDirectory.
|
get |
Gets the DirectoryInfo associated with the current instance.
The directory info.
|
getprotected |
Gets a value indicating whether or not filename extensions are mandatory or not.
true
if extensions are mandatory; otherwise, false
.