Dependency Class
A use of a type by a type of the architecture, in a declaration or in the code of a method.
public sealed class DependencyProperties
| Name | Description |
|---|---|
| Kind | Gets how the source uses the target. |
| Location | Gets the statement that uses the target, or the start of the member for a declaration, when the PDB is available. |
| Source | Gets the type that depends on Dependency.Target. The code of lambdas, local functions, iterators and async methods belongs to the type that declares them. |
| SourceMember | Gets the member of Dependency.Source whose declaration or code uses Dependency.Target, or null for a dependency of the type declaration. |
| Target | Gets the type the source depends on, without generic arguments: List<Order> gives one dependency on List<T> and one on Order. |
| TargetMember | Gets the method or field used, for DependencyKind.MethodCall, DependencyKind.ObjectCreation and DependencyKind.FieldAccess. |
Kind
Dependency.csLocation
Dependency.csGets the statement that uses the target, or the start of the member for a declaration, when the PDB is available.
public SourceLocation? Location { get; }Property value
Source
Dependency.csGets the type that depends on Dependency.Target. The code of lambdas, local functions, iterators and async methods belongs to the type that declares them.
public TypeElement Source { get; }Property value
SourceMember
Dependency.csGets the member of Dependency.Source whose declaration or code uses Dependency.Target, or null for a dependency of the type declaration.
public MemberElement? SourceMember { get; }Property value
Target
Dependency.csGets the type the source depends on, without generic arguments: List<Order> gives one dependency on List<T> and one on Order.
public TypeReference Target { get; }Property value
TargetMember
Dependency.csGets the method or field used, for DependencyKind.MethodCall, DependencyKind.ObjectCreation and DependencyKind.FieldAccess.
public MemberReference? TargetMember { get; }Property value
Methods
| Name | Description |
|---|---|
| ToString() | Returns a description of the dependency, such as MyApp.Order.Save calls MyApp.Database.Execute (Order.cs:12:9). |