Class ContextHolderExtensions
Some extension methods for ContextHolder for easier access to Relations related elements.
Inherited Members
Namespace: Xareus.Scenarios.Relations
Assembly: Xareus.Scenarios.Relations.dll
Syntax
public static class ContextHolderExtensions
Methods
GetEnvironment(ContextHolder)
Gets the Environment from the ExternalContext using the path-based lookup pattern. Falls back to casting if the context is an Environment (backward compatibility).
Declaration
public static Environment GetEnvironment(this ContextHolder contexts)
Parameters
| Type | Name | Description |
|---|---|---|
| ContextHolder | contexts |
Returns
| Type | Description |
|---|---|
| Environment | The Environment instance, or null if not found |
GetRelationEngine(ContextHolder)
Gets the RelationEngine from the ExternalContext using the path-based lookup pattern. This follows the same pattern used in TypeConverters (RelationConverter, IObjectConverter).
Declaration
public static IEngine GetRelationEngine(this ContextHolder contexts)
Parameters
| Type | Name | Description |
|---|---|---|
| ContextHolder | contexts |
Returns
| Type | Description |
|---|---|
| IEngine | The IEngine instance, or null if not found |