PostSharpAPI ReferencePost­Sharp.​Patterns.​ModelDepends
Open sandboxFocus

Depends Class

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.

Inheritance
Depends
Namespace: PostSharp.Patterns.Model
Assembly: PostSharp.Patterns.Model.dll
Syntax
public static class Depends : Object
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 Boolean value that is always false.

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.