Provides a way to specify dependencies of a method to properties or chains of properties. This class should be used from methods marked with the SafeForDependencyAnalysisAttribute custom attribute.
Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Model.dll
Syntax
public static class Depends
Remarks
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);
}
Fields
Name | Description |
---|---|
Guard | A bool value that is always |
Methods
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. |