共用方式為


TeamFoundationVersionControlService.CreateAnnotation Method

Create and persist an instance of an annotation.

Namespace:  Microsoft.TeamFoundation.VersionControl.Server
Assembly:  Microsoft.TeamFoundation.VersionControl.Server (in Microsoft.TeamFoundation.VersionControl.Server.dll)

Syntax

'Declaration
Public Sub CreateAnnotation ( _
    requestContext As TeamFoundationRequestContext, _
    annotationName As String, _
    annotatedItem As String, _
    version As Integer, _
    annotationValue As String, _
    comment As String, _
    overwrite As Boolean _
)
public void CreateAnnotation(
    TeamFoundationRequestContext requestContext,
    string annotationName,
    string annotatedItem,
    int version,
    string annotationValue,
    string comment,
    bool overwrite
)
public:
void CreateAnnotation(
    TeamFoundationRequestContext^ requestContext, 
    String^ annotationName, 
    String^ annotatedItem, 
    int version, 
    String^ annotationValue, 
    String^ comment, 
    bool overwrite
)
member CreateAnnotation : 
        requestContext:TeamFoundationRequestContext * 
        annotationName:string * 
        annotatedItem:string * 
        version:int * 
        annotationValue:string * 
        comment:string * 
        overwrite:bool -> unit
public function CreateAnnotation(
    requestContext : TeamFoundationRequestContext, 
    annotationName : String, 
    annotatedItem : String, 
    version : int, 
    annotationValue : String, 
    comment : String, 
    overwrite : boolean
)

Parameters

  • annotationName
    Type: System.String

    This is the name of the annotation.

  • annotatedItem
    Type: System.String

    Optional item to associate the annotation with.

  • version
    Type: System.Int32

    This is the version of the item to associate the annotation with.

  • annotationValue
    Type: System.String

    This is the value of the annotation.

  • comment
    Type: System.String

    Optional comment to tag together with the annotation.

  • overwrite
    Type: System.Boolean

    If overwrite is true and the annotation exists this will cause it to be overwritten. If it does not it will be created. If it is false then this instance is added even if others already exist.

.NET Framework Security

See Also

Reference

TeamFoundationVersionControlService Class

Microsoft.TeamFoundation.VersionControl.Server Namespace