ObjectGraphUtilsProduceAdjacencyListsTEntity Method |
Produces adjancency lists for the entities in the complete graph reachable from the entity passed in, using a non-recursive search algorithm. This routine figures out
the graph to process by walking it, using a hashtable (recursed) to take note which nodes are already processed.
When it finds an entity A and an entity B having a relation in the graph (have 'an edge'), and A is depending on B, we add B to the
adjacency list of A, though we don't add A to the adjacency list of B.
Additionally, it adds the type of B to the adjacency list of the type of A. This way we can determine the order of types.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
Syntax public void ProduceAdjacencyLists<TEntity>(
TEntity entityInGraph,
Dictionary<Guid, Dictionary<Guid, TEntity>> adjacencyLists,
Dictionary<Guid, TEntity> recursed,
MultiValueDictionary<Type, Type> typeAdjacencyLists
)
where TEntity : class, IEntityCore
Public Sub ProduceAdjacencyLists(Of TEntity As {Class, IEntityCore}) (
entityInGraph As TEntity,
adjacencyLists As Dictionary(Of Guid, Dictionary(Of Guid, TEntity)),
recursed As Dictionary(Of Guid, TEntity),
typeAdjacencyLists As MultiValueDictionary(Of Type, Type)
)
Parameters
- entityInGraph
- Type: TEntity
An entity in the graph to traverse - adjacencyLists
- Type: System.Collections.GenericDictionaryGuid, DictionaryGuid, TEntity
The dictionary with per seen entity (objectid, key) the adjancency list (Hashtable of entities, key is objectid, value is entity) - recursed
- Type: System.Collections.GenericDictionaryGuid, TEntity
The hashtable with objectids of the entities already processed to build the adjacency lists. - typeAdjacencyLists
- Type: SD.LLBLGen.Pro.ORMSupportClassesMultiValueDictionaryType, Type
The dictionary with per type (key) the list of types it depends on
Type Parameters
- TEntity
See Also