Delen via


IProfileService.SetAttribute Method (TeamFoundationRequestContext, Guid, ProfileAttribute)

Conditionally sets an attribute in a profile.

Namespace:  Microsoft.VisualStudio.Services.Profile
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Function SetAttribute ( _
    requestContext As TeamFoundationRequestContext, _
    identityId As Guid, _
    attribute As ProfileAttribute _
) As Integer
int SetAttribute(
    TeamFoundationRequestContext requestContext,
    Guid identityId,
    ProfileAttribute attribute
)
int SetAttribute(
    TeamFoundationRequestContext^ requestContext, 
    Guid identityId, 
    ProfileAttribute^ attribute
)
abstract SetAttribute : 
        requestContext:TeamFoundationRequestContext * 
        identityId:Guid * 
        attribute:ProfileAttribute -> int
function SetAttribute(
    requestContext : TeamFoundationRequestContext, 
    identityId : Guid, 
    attribute : ProfileAttribute
) : int

Parameters

Return Value

Type: System.Int32
The revision of the updated attribute

Remarks

If attribute does not exist then a new attribute is added to the set of attributes. If attribute exists then the attribute is updated if and only if the revision passed in attribute matches with the existing attribute revision.

.NET Framework Security

See Also

Reference

IProfileService Interface

SetAttribute Overload

Microsoft.VisualStudio.Services.Profile Namespace