This documentation is archived and is not being maintained.
IBuildDefinition::AddRetentionPolicy Method
Visual Studio 2013
Adds a retention policy to the list of retention policies of this build definition.
Namespace: Microsoft.TeamFoundation.Build.Client
Assembly: Microsoft.TeamFoundation.Build.Client (in Microsoft.TeamFoundation.Build.Client.dll)
IRetentionPolicy^ AddRetentionPolicy(
BuildReason reason,
BuildStatus status,
int numberToKeep,
DeleteOptions deleteOptions
)
Parameters
- reason
- Type: Microsoft.TeamFoundation.Build.Client::BuildReason
The reason for the retention policy.
- status
- Type: Microsoft.TeamFoundation.Build.Client::BuildStatus
The status of the retention policy.
- numberToKeep
- Type: System::Int32
The number of builds to keep.
- deleteOptions
- Type: Microsoft.TeamFoundation.Build.Client::DeleteOptions
The parts of the build to delete.
Return Value
Type: Microsoft.TeamFoundation.Build.Client::IRetentionPolicyThe 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.
Show: