Delen via


IGraphContext Interface

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Interface representing a context which specifies a desired set of data.

Providers place the requested data in the provided graph and the output nodes collection.

Namespace:  Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

Syntax

'Declaration
Public Interface IGraphContext
public interface IGraphContext
public interface class IGraphContext
type IGraphContext =  interface end
public interface IGraphContext

The IGraphContext type exposes the following members.

Properties

  Name Description
Public property CancelToken Get the current CancellationToken
Public property Direction The direction to traverse starting from the input nodes.
Public property Errors A list of the reported errors.
Public property Graph The graph that new data will be added to.
Public property InputNodes The initial nodes from which the GraphContext navigates. An empty collection implies a search of the global scope (ex: looking for top level namespaces).
Public property LinkCategories The link categories to navigate from the input nodes (that is what relationships to traverse). For example, "Calls", or "Calls and References", and so on An empty collection implies that all links should be traversed.
Public property LinkDepth How many links away from the input nodes to return. int.MaxValue means fetch everything that is reachable from the input nodes.
Public property NodeCategories The target node categories that will be put in the OutputNodes collection. An empty collection implies that all target nodes should be output nodes.
Public property OutputNodes The nodes that answer the query posed by the context. More data may be present in the Graph than in the OutputNodes. OutputNodes must be part of the Graph.
Public property RequestedProperties The properties requested to be on the returned input and output nodes.
Public property TrackChanges True if the graph context wants to continue to be informed of changes to the output nodes. The Cancel method stops this tracking.

Top

Methods

  Name Description
Public method GetValue<T> Retrieves a value that the caller has passed in.
Public method HasValue Find out if the caller has passed in a value with the given name.
Public method OnCompleted Called to raise the Completed event when the IGraphContext is finished being processed.
Public method ReportError Called by the provider to report exceptions and errors.
Public method ReportProgress Called by the providers to report progress.
Public method SetValue<T> Adds a new value to the context's property bag. This can be used to pass extra information to providers.

Top

Events

  Name Description
Public event Canceled Raised when this context is canceled.
Public event Completed Raised when the results of the context have been populated.

Top

See Also

Reference

Microsoft.VisualStudio.GraphModel Namespace