Table of Contents

Class AspectRatio

Namespace
idunno.Bluesky.Embed
Assembly
idunno.Bluesky.dll

Represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit

public sealed record AspectRatio : IEquatable<AspectRatio>

Inheritance

Implements

Inherited Members

Constructors

AspectRatio(int, int)

Creates a new instance of idunno.Bluesky.Embed.AspectRatio.

[JsonConstructor]
public AspectRatio(int width, int height)

Parameters

width int

The ratio width.

height int

The ratio height.

Exceptions

ArgumentOutOfRangeException

Thrown when width or height is less than 1.

AspectRatio(int, int)

Creates a new instance of idunno.Bluesky.Embed.AspectRatio.

[JsonConstructor]
public AspectRatio(int width, int height)

Parameters

width int

The ratio width.

height int

The ratio height.

Exceptions

ArgumentOutOfRangeException

Thrown when width or height is less than 1.

AspectRatio(int, int)

Creates a new instance of idunno.Bluesky.Embed.AspectRatio.

[JsonConstructor]
public AspectRatio(int width, int height)

Parameters

width int

The ratio width.

height int

The ratio height.

Exceptions

ArgumentOutOfRangeException

Thrown when width or height is less than 1.

Properties

Height

Gets the height of this instance

[JsonInclude]
[JsonRequired]
public int Height { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1.

Height

Gets the height of this instance

[JsonInclude]
[JsonRequired]
public int Height { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1.

Height

Gets the height of this instance

[JsonInclude]
[JsonRequired]
public int Height { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1.

Width

Gets the width of this instance

[JsonInclude]
[JsonRequired]
public int Width { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1.

Width

Gets the width of this instance

[JsonInclude]
[JsonRequired]
public int Width { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1.

Width

Gets the width of this instance

[JsonInclude]
[JsonRequired]
public int Width { get; init; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Thrown when the value is less than 1.

Methods

<Clone>$()

public AspectRatio <Clone>$()

Returns

AspectRatio

<Clone>$()

public AspectRatio <Clone>$()

Returns

AspectRatio

<Clone>$()

public AspectRatio <Clone>$()

Returns

AspectRatio

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AspectRatio?)

public bool Equals(AspectRatio? other)

Parameters

other AspectRatio?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AspectRatio?)

public bool Equals(AspectRatio? other)

Parameters

other AspectRatio?

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(AspectRatio?)

public bool Equals(AspectRatio? other)

Parameters

other AspectRatio?

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AspectRatio?, AspectRatio?)

public static bool operator ==(AspectRatio? left, AspectRatio? right)

Parameters

left AspectRatio?
right AspectRatio?

Returns

bool

operator ==(AspectRatio?, AspectRatio?)

public static bool operator ==(AspectRatio? left, AspectRatio? right)

Parameters

left AspectRatio?
right AspectRatio?

Returns

bool

operator ==(AspectRatio?, AspectRatio?)

public static bool operator ==(AspectRatio? left, AspectRatio? right)

Parameters

left AspectRatio?
right AspectRatio?

Returns

bool

operator !=(AspectRatio?, AspectRatio?)

public static bool operator !=(AspectRatio? left, AspectRatio? right)

Parameters

left AspectRatio?
right AspectRatio?

Returns

bool

operator !=(AspectRatio?, AspectRatio?)

public static bool operator !=(AspectRatio? left, AspectRatio? right)

Parameters

left AspectRatio?
right AspectRatio?

Returns

bool

operator !=(AspectRatio?, AspectRatio?)

public static bool operator !=(AspectRatio? left, AspectRatio? right)

Parameters

left AspectRatio?
right AspectRatio?

Returns

bool