[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Adds a retention policy to the list of retention policies of this build definition.
Assembly: Microsoft.TeamFoundation.Build.Client (in Microsoft.TeamFoundation.Build.Client.dll)
IRetentionPolicy^ AddRetentionPolicy( BuildReason reason, BuildStatus status, int numberToKeep, DeleteOptions deleteOptions )
- Type: Microsoft.TeamFoundation.Build.Client::BuildReason
The reason for the retention policy.
- Type: Microsoft.TeamFoundation.Build.Client::BuildStatus
The status of the retention policy.
- Type: System::Int32
The number of builds to keep.
- Type: Microsoft.TeamFoundation.Build.Client::DeleteOptions
The parts of the build to delete.
Return ValueType: Microsoft.TeamFoundation.Build.Client::IRetentionPolicy
The newly added retention policy.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.