...
In most cases, the context will be an IMetaClass while parsing and an IDataObject during evaluation. The properties of the class or object are those against which the parser and evaluator will validate.
Other objects
A product will generally encounter contexts when working with Delegate Expression. There are two types of objects that the product can extract from the context:
Transient objects that are specific to the call.
Singleton services provided by Quino and the product.
Transient objects
The context contains zero or more transient objects, usually an IDataSession
and IDataObject
but also sometimes an ILanguage
that indicates the preferred language, if different from the user's selected language (e.g. in some reporting functions).
...
However, a product can get the session with context.TryGetSession()
and the underlying object with context.TryGetInstance<IDataObject>()
. See Accessing the object in the context for more information.
Singleton Services
An expression function can always directly inject and use singleton services. This is the "proper" way to access services (see the chapter on the IOC for more information).
...