Class LookupFilters
Contains a set of helper functions for dynamicaly creating QueryableFilter for selecting valid entities, instruments or paths for a transaction depending on their context
Inherited Members
Namespace: LemonEdge.API.Core.FinancialServices.Processors.Transactional
Assembly: LemonEdge.API.Core.FinancialServices.dll
Syntax
public static class LookupFilters
Methods
GetEntityFilter(IBaseEntity, IBaseEntity, IEntityRetriever, string)
Returns the entities that can be selected against the specified transaction
currentItem
If the transaction is against an instrument, only the OwningEntityID is allowed, else the entities in the path of the transaction are allowed
Declaration
public static Task<IEnumerable<IBaseEntity>> GetEntityFilter(IBaseEntity currentItem, IBaseEntity parentItem, IEntityRetriever context, string searchText)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | currentItem | The transaction to return valid entities for |
IBaseEntity | parentItem | Any parent item associated with this transaction |
IEntityRetriever | context | The current context this processor is running with |
string | searchText | The name of the entity to filter on |
Returns
Type | Description |
---|---|
Task<IEnumerable<IBaseEntity>> | A queryable filter for the entities that can be selected against the specified transaction
|
GetInstrumentFilter(IEntityRetriever, IBaseEntity, IBaseEntity, IReadOnlyCache)
Returns a queryable filter for the instruments that can be selected against the specified transaction
currentItem
If the transaction is against an entity, only allow instruments that have it as their OwningEntityID,
else if against a path only allow instruments that have their OwningEntityID as an entity in the pathDeclaration
public static Task<QueryableFilter> GetInstrumentFilter(this IEntityRetriever retriever, IBaseEntity currentItem, IBaseEntity parentItem, IReadOnlyCache cache)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | The current context this processor is running with |
IBaseEntity | currentItem | The transaction to return valid instruments for |
IBaseEntity | parentItem | Any parent item associated with this transaction |
IReadOnlyCache | cache |
Returns
Type | Description |
---|---|
Task<QueryableFilter> | A queryable filter for the instruments that can be selected against the specified transaction
|
GetOriginalEntityFilter(IBaseEntity, IBaseEntity, IEntityRetriever, string)
Declaration
public static Task<IEnumerable<IBaseEntity>> GetOriginalEntityFilter(IBaseEntity currentItem, IBaseEntity parentItem, IEntityRetriever context, string searchText)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | currentItem | |
IBaseEntity | parentItem | |
IEntityRetriever | context | |
string | searchText |
Returns
Type | Description |
---|---|
Task<IEnumerable<IBaseEntity>> |
GetOriginalInstrumentFilter(IEntityRetriever, IBaseEntity, IBaseEntity)
Declaration
public static Task<QueryableFilter> GetOriginalInstrumentFilter(this IEntityRetriever retriever, IBaseEntity currentItem, IBaseEntity parentItem)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | |
IBaseEntity | currentItem | |
IBaseEntity | parentItem |
Returns
Type | Description |
---|---|
Task<QueryableFilter> |
GetPathFilter(IEntityRetriever, IBaseEntity, IBaseEntity)
Returns a queryable filter for the paths that can be selected against the specified transaction
currentItem
If the transaction is against an entity, only allow paths that contain rules against that entity,
Declaration
public static Task<QueryableFilter> GetPathFilter(this IEntityRetriever retriever, IBaseEntity currentItem, IBaseEntity parentItem)
Parameters
Type | Name | Description |
---|---|---|
IEntityRetriever | retriever | The current context this processor is running with |
IBaseEntity | currentItem | The transaction to return valid paths for |
IBaseEntity | parentItem | Any parent item associated with this transaction |
Returns
Type | Description |
---|---|
Task<QueryableFilter> | A queryable filter for the paths that can be selected against the specified transaction
|