AvatarColorPair Struct

Represents a background/foreground color pair used to render an avatar.

public readonly struct AvatarColorPair : IEquatable<AvatarColorPair>

Remarks

This is a struct, so default bypasses the constructor and leaves both colors null. AvatarGenerator.CreateSvg rejects such an entry in the palette.

Implements

Constructors

NameDescription
AvatarColorPair(string, string)Initializes a new instance of the AvatarColorPair struct.

AvatarColorPair(string, string)

AvatarColorPair.cs

Initializes a new instance of the AvatarColorPair struct.

public AvatarColorPair(string backgroundColor, string foregroundColor)

Parameters

backgroundColor string
The background color.
foregroundColor string
The foreground color.

Properties

NameDescription
BackgroundColorGets the background color.
ForegroundColorGets the foreground color.

BackgroundColor

AvatarColorPair.cs

Gets the background color.

public string BackgroundColor { get; }

Property value

string

ForegroundColor

AvatarColorPair.cs

Gets the foreground color.

public string ForegroundColor { get; }

Property value

string

Methods

NameDescription
Equals(AvatarColorPair)
Equals(object)
GetHashCode()
ToString()

Equals overloads

Equals(AvatarColorPair)

public bool Equals(AvatarColorPair other)
Parameters
other AvatarColorPair
Returns

bool

No documentation is available.

Equals(object)

public override bool Equals(object obj)
Parameters
obj object
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(AvatarColorPair, AvatarColorPair)
operator !=(AvatarColorPair, AvatarColorPair)

operator ==(AvatarColorPair, AvatarColorPair)

public static bool operator ==(AvatarColorPair left, AvatarColorPair right)

Parameters

left AvatarColorPair
right AvatarColorPair

Returns

bool

No documentation is available.

operator !=(AvatarColorPair, AvatarColorPair)

public static bool operator !=(AvatarColorPair left, AvatarColorPair right)

Parameters

left AvatarColorPair
right AvatarColorPair

Returns

bool

No documentation is available.