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
Exceptions
- ArgumentOutOfRangeException
-
Thrown when
widthorheightis less than 1.
AspectRatio(int, int)
Creates a new instance of idunno.Bluesky.Embed.AspectRatio.
[JsonConstructor]
public AspectRatio(int width, int height)Parameters
Exceptions
- ArgumentOutOfRangeException
-
Thrown when
widthorheightis less than 1.
AspectRatio(int, int)
Creates a new instance of idunno.Bluesky.Embed.AspectRatio.
[JsonConstructor]
public AspectRatio(int width, int height)Parameters
Exceptions
- ArgumentOutOfRangeException
-
Thrown when
widthorheightis less than 1.
Properties
Height
Gets the height of this instance
[JsonInclude]
[JsonRequired]
public int Height { get; init; }Property Value
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
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
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
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
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
Exceptions
- ArgumentOutOfRangeException
-
Thrown when the value is less than 1.
Methods
<Clone>$()
public AspectRatio <Clone>$()Returns
<Clone>$()
public AspectRatio <Clone>$()Returns
<Clone>$()
public AspectRatio <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(AspectRatio?)
public bool Equals(AspectRatio? other)Parameters
otherAspectRatio?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(AspectRatio?)
public bool Equals(AspectRatio? other)Parameters
otherAspectRatio?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(AspectRatio?)
public bool Equals(AspectRatio? other)Parameters
otherAspectRatio?
Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(AspectRatio?, AspectRatio?)
public static bool operator ==(AspectRatio? left, AspectRatio? right)Parameters
leftAspectRatio?rightAspectRatio?
Returns
operator ==(AspectRatio?, AspectRatio?)
public static bool operator ==(AspectRatio? left, AspectRatio? right)Parameters
leftAspectRatio?rightAspectRatio?
Returns
operator ==(AspectRatio?, AspectRatio?)
public static bool operator ==(AspectRatio? left, AspectRatio? right)Parameters
leftAspectRatio?rightAspectRatio?
Returns
operator !=(AspectRatio?, AspectRatio?)
public static bool operator !=(AspectRatio? left, AspectRatio? right)Parameters
leftAspectRatio?rightAspectRatio?
Returns
operator !=(AspectRatio?, AspectRatio?)
public static bool operator !=(AspectRatio? left, AspectRatio? right)Parameters
leftAspectRatio?rightAspectRatio?
Returns
operator !=(AspectRatio?, AspectRatio?)
public static bool operator !=(AspectRatio? left, AspectRatio? right)Parameters
leftAspectRatio?rightAspectRatio?