Condividi tramite


AvatarUtils.GenerateAvatar Method

Generates a random avatar with 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

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

Syntax

'Declaration
Public Shared Function GenerateAvatar ( _
    displayName As String, _
    backgroundColor As Color, _
    avatarSizeInPixels As Integer, _
    avatarImageFormat As AvatarImageFormat _
) As Byte()
public static byte[] GenerateAvatar(
    string displayName,
    Color backgroundColor,
    int avatarSizeInPixels,
    AvatarImageFormat avatarImageFormat
)
public:
static array<unsigned char>^ GenerateAvatar(
    String^ displayName, 
    Color backgroundColor, 
    int avatarSizeInPixels, 
    AvatarImageFormat avatarImageFormat
)
static member GenerateAvatar : 
        displayName:string * 
        backgroundColor:Color * 
        avatarSizeInPixels:int * 
        avatarImageFormat:AvatarImageFormat -> byte[] 
public static function GenerateAvatar(
    displayName : String, 
    backgroundColor : Color, 
    avatarSizeInPixels : int, 
    avatarImageFormat : AvatarImageFormat
) : byte[]

Parameters

Return Value

Type: array<System.Byte[]
A byte array of the generated image

.NET Framework Security

See Also

Reference

AvatarUtils Class

Microsoft.TeamFoundation.Framework.Server Namespace