Partilhar via


SfcDependencyEngine Class

Definition

The DepEngine class provides the graph manipulation, population, storage and discovery execution logic to perform complete discovery services, and is then accessed from DepIterators afterwards to walk results in various ways.

public sealed class SfcDependencyEngine : IDisposable, Microsoft.SqlServer.Management.Sdk.Sfc.ISfcDependencyDiscoveryObjectSink
type SfcDependencyEngine = class
    interface ISfcDependencyDiscoveryObjectSink
    interface IDisposable
Public NotInheritable Class SfcDependencyEngine
Implements IDisposable, ISfcDependencyDiscoveryObjectSink
Inheritance
SfcDependencyEngine
Implements

Constructors

SfcDependencyEngine(SfcDependencyDiscoveryMode, SfcDependencyAction)

Properties

Action

Methods

Add(SfcInstance, SfcInstance, SfcTypeRelation)

Add a new tuple relation of a parent node and its child node which depends on it. A node can be added multiple times as a parent, child or single node in successive calls.

Add(SfcInstance)

Add a new single object node with no directional relation to either a parent or child node. If the node already exists in ther graph any existing relations will not be disturbed since Add() always only augments but never detracts. A node can be added multiple times as a parent, child or single node in successive calls.

Discover()

Perform complete dependency relation discovery. Start with asking each DomainContext to do what it can, then each DomainContext Type and finally resort to asking each node about its own relationships.

Currently we only ask for bulk per DomainContext once, then simply do individual discovery until all nodes have had a discovery pass.

For v2, we would introduce bulk DomainContext Type discovery after doing the DomainContext discovery, and maybe even repeat bulk discovery until no new nodes are contributed from it, then resort to individual discovery.

Also we may need to give bulk handlers an iterator, unless we want to rely on handing them acess to the DepEngine itself as a sink for adding new nodes discovered as well as traversing directly on the nodes. This is okay as long as we assume (or know) that the bulk handlers themselves just make a temp collection to hold the nodes before making the query. They have to be done walking the graph before they start adding nodes. Just like any other iterator use, if they try to violate this order and add nodes before they are finished Next'ing on the iterator, the iterator will throw (which is what we want to happen).

Dispose()
GetListEnumerator()

Return a DependencyListEnumerator which can be used to walk the graph as a list by the client.

GetTreeEnumerator()

Return a DependencyTreeEnumerator which can be used to walk the graph tree by the client.

Explicit Interface Implementations

ISfcDependencyDiscoveryObjectSink.Add(SfcDependencyDirection, IEnumerator, SfcTypeRelation, Boolean)
ISfcDependencyDiscoveryObjectSink.Add(SfcDependencyDirection, SfcInstance, SfcTypeRelation, Boolean)
ISfcDependencyDiscoveryObjectSink.Add<T>(SfcDependencyDirection, IEnumerable<T>, SfcTypeRelation, Boolean)

Applies to