Skip to main content

RtPathEvaluator

Namespace: Meshmakers.Octo.Runtime.Contracts

Implements a path evaluator for attribute paths

public static class RtPathEvaluator

Inheritance ObjectRtPathEvaluator

Methods

GetPath(IEnumerable<PathTerm>)

Gets the path as a string from a list of path terms

public static string GetPath(IEnumerable<PathTerm> pathTerms)

Parameters

pathTerms IEnumerable<PathTerm>
List of path terms

Returns

String
The path as a string

TokenizePath(String)

Tokenizes a path into a list of path terms

public static List<PathTerm> TokenizePath(string path)

Parameters

path String
Path to be tokenized

Returns

List<PathTerm>
A list of path terms with value and type

Exceptions

InvalidPathException
Indicates that the term is invalid.

GetValue(ICkCacheService, String, RtTypeWithAttributes, String)

Gets the value of an attribute path

public static object GetValue(ICkCacheService ckCacheService, string tenantId, RtTypeWithAttributes root, string path)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

root RtTypeWithAttributes
The root object

path String
Path of attributes to be evaluated

Returns

Object
The value of the attribute path

GetValue(ICkCacheService, String, RtTypeWithAttributes, IEnumerable<PathTerm>)

Gets the value of an attribute path

public static object GetValue(ICkCacheService ckCacheService, string tenantId, RtTypeWithAttributes root, IEnumerable<PathTerm> path)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

root RtTypeWithAttributes
The root object

path IEnumerable<PathTerm>
Path of attributes to be evaluated

Returns

Object
The value of the attribute path

SetValue(ICkCacheService, String, RtTypeWithAttributes, IEnumerable<PathTerm>, Object)

Sets the value of an attribute path

public static void SetValue(ICkCacheService ckCacheService, string tenantId, RtTypeWithAttributes root, IEnumerable<PathTerm> path, object value)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

root RtTypeWithAttributes
The root object

path IEnumerable<PathTerm>
Path of attributes to be evaluated

value Object
Value to be set

SetValue(ICkCacheService, String, RtTypeWithAttributes, String, Object)

Sets the value of an attribute path

public static void SetValue(ICkCacheService ckCacheService, string tenantId, RtTypeWithAttributes root, string path, object value)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

root RtTypeWithAttributes
The root object

path String
Path of attributes to be evaluated

value Object
Value to be set

MergeFieldFilterToNavigationPairs(ICkCacheService, String, CkId<CkTypeId>, ICollection<NavigationPair>, ICollection<FieldFilter>)

Merges field filters into navigation pairs.

public static void MergeFieldFilterToNavigationPairs(ICkCacheService ckCacheService, string tenantId, CkId<CkTypeId> ckTypeId, ICollection<NavigationPair> navigationPairs, ICollection<FieldFilter> fieldFilters)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

ckTypeId CkId<CkTypeId>
Construction kit type id the association belongs to

navigationPairs ICollection<NavigationPair>
Navigation pairs to be merged with field filters

fieldFilters ICollection<FieldFilter>
> Field filters to be merged into navigation pairs

Remarks:

Field filters are updated when a merge is successful, and the field filter is removed from the collection.

TokenizeAndGetNavigationPairs(ICkCacheService, String, CkId<CkTypeId>, IEnumerable<String>)

Tokenizes a list of paths into a list of traversal navigation pairs

public static List<NavigationPair> TokenizeAndGetNavigationPairs(ICkCacheService ckCacheService, string tenantId, CkId<CkTypeId> ckTypeId, IEnumerable<string> paths)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

ckTypeId CkId<CkTypeId>
Construction kit type id the association belongs to

paths IEnumerable<String>
List of paths to be evaluated

Returns

List<NavigationPair>
A list of navigation pairs, an empty list is returned if no navigation property has been used

TokenizeAndGetNavigationPair(ICkCacheService, String, CkId<CkTypeId>, IEnumerable<PathTerm>)

Tokenizes a path into a traversable navigation pair

public static NavigationPair TokenizeAndGetNavigationPair(ICkCacheService ckCacheService, string tenantId, CkId<CkTypeId> ckTypeId, IEnumerable<PathTerm> path)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

ckTypeId CkId<CkTypeId>
Construction kit type id the association belongs to

path IEnumerable<PathTerm>
Path of attributes to be evaluated

Returns

NavigationPair
If navigation is used, the corresponding navigation pair is returned

TokenizeAndGetNavigationPair(ICkCacheService, String, CkId<CkTypeId>, String)

Tokenizes a path into a traversable navigation pair

public static NavigationPair TokenizeAndGetNavigationPair(ICkCacheService ckCacheService, string tenantId, CkId<CkTypeId> ckTypeId, string path)

Parameters

ckCacheService ICkCacheService
The cache service

tenantId String
Tenant id

ckTypeId CkId<CkTypeId>
Construction kit type id the association belongs to

path String
Path of attributes to be evaluated

Returns

NavigationPair
If navigation is used, the corresponding navigation pair is returned