Condividi tramite


IBuildDefinition.AddRetentionPolicy Method

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)

Syntax

'Dichiarazione
Function AddRetentionPolicy ( _
    reason As BuildReason, _
    status As BuildStatus, _
    numberToKeep As Integer, _
    deleteOptions As DeleteOptions _
) As IRetentionPolicy
IRetentionPolicy AddRetentionPolicy(
    BuildReason reason,
    BuildStatus status,
    int numberToKeep,
    DeleteOptions deleteOptions
)
IRetentionPolicy^ AddRetentionPolicy(
    BuildReason reason, 
    BuildStatus status, 
    int numberToKeep, 
    DeleteOptions deleteOptions
)
abstract AddRetentionPolicy : 
        reason:BuildReason * 
        status:BuildStatus * 
        numberToKeep:int * 
        deleteOptions:DeleteOptions -> IRetentionPolicy 
function AddRetentionPolicy(
    reason : BuildReason, 
    status : BuildStatus, 
    numberToKeep : int, 
    deleteOptions : DeleteOptions
) : IRetentionPolicy

Parameters

  • numberToKeep
    Type: System.Int32
    The number of builds to keep.

Return Value

Type: Microsoft.TeamFoundation.Build.Client.IRetentionPolicy
The newly added retention policy.

.NET Framework Security

See Also

Reference

IBuildDefinition Interface

Microsoft.TeamFoundation.Build.Client Namespace