Share via


IProfileService.GetAvatar Method

Retrieves the avatar for the given profile.

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

Syntax

'Declaration
Function GetAvatar ( _
    requestContext As TeamFoundationRequestContext, _
    id As Guid, _
    size As AvatarSize _
) As Avatar
Avatar GetAvatar(
    TeamFoundationRequestContext requestContext,
    Guid id,
    AvatarSize size
)
Avatar^ GetAvatar(
    TeamFoundationRequestContext^ requestContext, 
    Guid id, 
    AvatarSize size
)
abstract GetAvatar : 
        requestContext:TeamFoundationRequestContext * 
        id:Guid * 
        size:AvatarSize -> Avatar
function GetAvatar(
    requestContext : TeamFoundationRequestContext, 
    id : Guid, 
    size : AvatarSize
) : Avatar

Parameters

  • id
    Type: System.Guid

    The Guid of the Identity with which the Profile is associated. There exists a 1 to 1 mapping between an Identity and a Profile

Return Value

Type: Microsoft.VisualStudio.Services.Profile.Avatar

Remarks

If no avatar was strored then a generated avatar is returned. The randomly generated avatar has the following specs: i. Background: Solid color (chosen via Round Robin from a predefined color palette) ii. Foreground: First two initials of the display name in white iii. Size: 44 x 44 pixels iv. Format: jpeg

.NET Framework Security

See Also

Reference

IProfileService Interface

Microsoft.VisualStudio.Services.Profile Namespace