Depends Class |
Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: 2023.0.3.0 (2023.0.3.0)
public static class Depends
The Depends type exposes the following members.
Name | Description | |
---|---|---|
On(Object) |
Specifies an explicit dependency between the calling method and the argument passed to this method.
| |
On(Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object, Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
| |
On(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Specifies an explicit dependency between the calling method and the arguments passed to this method.
|
Members of this class are considered metadata-only. They are used only at build time, where their arguments are decompiled. They have no runtime effect. For performance reason, it is preferable to skip their runtime execution. This can be achieved by using the Guard field in the construct:
if ( Depends.Guard ) { Depends.On(this.foo.Bar); }