Table of Contents

Class EmbeddedGallery

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

An assortment of media embedded in a Bluesky record (eg, a post).

public record EmbeddedGallery : EmbeddedMediaBase, IEquatable<AtProtoRecord>, IEquatable<EmbeddedBase>, IEquatable<EmbeddedMediaBase>, IEquatable<EmbeddedGallery>

Inheritance

AtProtoRecord

Implements

Inherited Members

AtProtoRecord.Equals(AtProtoRecord?)
AtProtoRecord.GetHashCode()
AtProtoRecord.ToString()
AtProtoRecord.PrintMembers(StringBuilder)
AtProtoRecord.Equals(object?)
AtProtoRecord.<Clone>$()
AtProtoRecord.EqualityContract
AtProtoRecord.ExtensionData

Constructors

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.

public EmbeddedGallery(ICollection<GalleryImage> items)

Parameters

items ICollection<GalleryImage>

The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.

Exceptions

ArgumentNullException

Thrown when items is null.

ArgumentException

Thrown when the items collection contains null values or items with invalid properties.

EmbeddedGallery(EmbeddedGallery)

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class from an existing instance.

protected EmbeddedGallery(EmbeddedGallery other)

Parameters

other EmbeddedGallery

The instance to copy.

Remarks

The items are copied, so a gallery produced by a with expression does not share its items with the instance it was copied from.

Exceptions

ArgumentNullException

Thrown when other is null.

EmbeddedGallery(ICollection<EmbeddedImage>)

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.

public EmbeddedGallery(ICollection<EmbeddedImage> items)

Parameters

items ICollection<EmbeddedImage>

The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.

Exceptions

ArgumentNullException

Thrown when items is null.

ArgumentException

Thrown when the items collection contains null values or items with invalid properties.

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.

public EmbeddedGallery(ICollection<GalleryImage> items)

Parameters

items ICollection<GalleryImage>

The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.

Exceptions

ArgumentNullException

Thrown when items is null.

ArgumentException

Thrown when the items collection contains null values or items with invalid properties.

EmbeddedGallery(EmbeddedGallery)

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class from an existing instance.

protected EmbeddedGallery(EmbeddedGallery other)

Parameters

other EmbeddedGallery

The instance to copy.

Remarks

The items are copied, so a gallery produced by a with expression does not share its items with the instance it was copied from.

Exceptions

ArgumentNullException

Thrown when other is null.

EmbeddedGallery(ICollection<EmbeddedImage>)

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.

public EmbeddedGallery(ICollection<EmbeddedImage> items)

Parameters

items ICollection<EmbeddedImage>

The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.

Exceptions

ArgumentNullException

Thrown when items is null.

ArgumentException

Thrown when the items collection contains null values or items with invalid properties.

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.

public EmbeddedGallery(ICollection<GalleryImage> items)

Parameters

items ICollection<GalleryImage>

The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.

Exceptions

ArgumentNullException

Thrown when items is null.

ArgumentException

Thrown when the items collection contains null values or items with invalid properties.

EmbeddedGallery(EmbeddedGallery)

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class from an existing instance.

protected EmbeddedGallery(EmbeddedGallery other)

Parameters

other EmbeddedGallery

The instance to copy.

Remarks

The items are copied, so a gallery produced by a with expression does not share its items with the instance it was copied from.

Exceptions

ArgumentNullException

Thrown when other is null.

EmbeddedGallery(ICollection<EmbeddedImage>)

Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.

public EmbeddedGallery(ICollection<EmbeddedImage> items)

Parameters

items ICollection<EmbeddedImage>

The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.

Exceptions

ArgumentNullException

Thrown when items is null.

ArgumentException

Thrown when the items collection contains null values or items with invalid properties.

Properties

Count

Gets the number of elements contained in the gallery.

[JsonIgnore]
public int Count { get; }

Property Value

int

Count

Gets the number of elements contained in the gallery.

[JsonIgnore]
public int Count { get; }

Property Value

int

Count

Gets the number of elements contained in the gallery.

[JsonIgnore]
public int Count { get; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Items

Gets the collection of idunno.Bluesky.Embed.Gallery.GalleryImage items in the gallery.

[JsonInclude]
[JsonRequired]
public IReadOnlyList<GalleryImage> Items { get; }

Property Value

IReadOnlyList<GalleryImage>

Remarks

The collection is read-only. Use idunno.Bluesky.Embed.EmbeddedGallery.Add(idunno.Bluesky.Embed.Gallery.GalleryImage), idunno.Bluesky.Embed.EmbeddedGallery.Remove(idunno.Bluesky.Embed.Gallery.GalleryImage) and idunno.Bluesky.Embed.EmbeddedGallery.Clear to change its contents, so that the gallery's authoring limits are applied.

Exceptions

ArgumentNullException

Thrown when the value being set is null.

Items

Gets the collection of idunno.Bluesky.Embed.Gallery.GalleryImage items in the gallery.

[JsonInclude]
[JsonRequired]
public IReadOnlyList<GalleryImage> Items { get; }

Property Value

IReadOnlyList<GalleryImage>

Remarks

The collection is read-only. Use idunno.Bluesky.Embed.EmbeddedGallery.Add(idunno.Bluesky.Embed.Gallery.GalleryImage), idunno.Bluesky.Embed.EmbeddedGallery.Remove(idunno.Bluesky.Embed.Gallery.GalleryImage) and idunno.Bluesky.Embed.EmbeddedGallery.Clear to change its contents, so that the gallery's authoring limits are applied.

Exceptions

ArgumentNullException

Thrown when the value being set is null.

Items

Gets the collection of idunno.Bluesky.Embed.Gallery.GalleryImage items in the gallery.

[JsonInclude]
[JsonRequired]
public IReadOnlyList<GalleryImage> Items { get; }

Property Value

IReadOnlyList<GalleryImage>

Remarks

The collection is read-only. Use idunno.Bluesky.Embed.EmbeddedGallery.Add(idunno.Bluesky.Embed.Gallery.GalleryImage), idunno.Bluesky.Embed.EmbeddedGallery.Remove(idunno.Bluesky.Embed.Gallery.GalleryImage) and idunno.Bluesky.Embed.EmbeddedGallery.Clear to change its contents, so that the gallery's authoring limits are applied.

Exceptions

ArgumentNullException

Thrown when the value being set is null.

Methods

<Clone>$()

public override EmbeddedGallery <Clone>$()

Returns

EmbeddedGallery

<Clone>$()

public override EmbeddedGallery <Clone>$()

Returns

EmbeddedGallery

<Clone>$()

public override EmbeddedGallery <Clone>$()

Returns

EmbeddedGallery

Adds an idunno.Bluesky.Embed.Gallery.GalleryImage item to the gallery.

public void Add(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.Gallery.GalleryImage item to add.

Exceptions

ArgumentNullException

Thrown when item is null.

ArgumentException

Thrown when item has no image, or its image is not an image MIME type.

InvalidOperationException

Thrown when the gallery already contains the maximum number of items.

Adds an idunno.Bluesky.Embed.Gallery.GalleryImage item to the gallery.

public void Add(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.Gallery.GalleryImage item to add.

Exceptions

ArgumentNullException

Thrown when item is null.

ArgumentException

Thrown when item has no image, or its image is not an image MIME type.

InvalidOperationException

Thrown when the gallery already contains the maximum number of items.

Adds an idunno.Bluesky.Embed.Gallery.GalleryImage item to the gallery.

public void Add(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.Gallery.GalleryImage item to add.

Exceptions

ArgumentNullException

Thrown when item is null.

ArgumentException

Thrown when item has no image, or its image is not an image MIME type.

InvalidOperationException

Thrown when the gallery already contains the maximum number of items.

Clear()

Removes all items from the gallery.

public void Clear()

Clear()

Removes all items from the gallery.

public void Clear()

Clear()

Removes all items from the gallery.

public void Clear()

Determines whether the gallery contains a specific idunno.Bluesky.Embed.EmbeddedImage item.

public bool Contains(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.EmbeddedImage item to locate in the gallery.

Returns

bool

true if the item is found; otherwise, false.

Determines whether the gallery contains a specific idunno.Bluesky.Embed.EmbeddedImage item.

public bool Contains(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.EmbeddedImage item to locate in the gallery.

Returns

bool

true if the item is found; otherwise, false.

Determines whether the gallery contains a specific idunno.Bluesky.Embed.EmbeddedImage item.

public bool Contains(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.EmbeddedImage item to locate in the gallery.

Returns

bool

true if the item is found; otherwise, false.

Copies the elements of the gallery to an array, starting at a particular array index.

public void CopyTo(GalleryImage[] array, int arrayIndex)

Parameters

array GalleryImage[]

The destination array.

arrayIndex int

The zero-based index in the array at which copying begins.

Copies the elements of the gallery to an array, starting at a particular array index.

public void CopyTo(GalleryImage[] array, int arrayIndex)

Parameters

array GalleryImage[]

The destination array.

arrayIndex int

The zero-based index in the array at which copying begins.

Copies the elements of the gallery to an array, starting at a particular array index.

public void CopyTo(GalleryImage[] array, int arrayIndex)

Parameters

array GalleryImage[]

The destination array.

arrayIndex int

The zero-based index in the array at which copying begins.

Equals(EmbeddedGallery?)

Determines whether the specified idunno.Bluesky.Embed.EmbeddedGallery is equal to the current instance.

public virtual bool Equals(EmbeddedGallery? other)

Parameters

other EmbeddedGallery?

The idunno.Bluesky.Embed.EmbeddedGallery to compare against the current instance.

Returns

bool

true if other is equal to the current instance, otherwise false.

Remarks

idunno.Bluesky.Embed.EmbeddedGallery.Items is compared by its contents rather than by reference.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(EmbeddedMediaBase?)

public override sealed bool Equals(EmbeddedMediaBase? other)

Parameters

other EmbeddedMediaBase?

Returns

bool

Equals(EmbeddedGallery?)

Determines whether the specified idunno.Bluesky.Embed.EmbeddedGallery is equal to the current instance.

public virtual bool Equals(EmbeddedGallery? other)

Parameters

other EmbeddedGallery?

The idunno.Bluesky.Embed.EmbeddedGallery to compare against the current instance.

Returns

bool

true if other is equal to the current instance, otherwise false.

Remarks

idunno.Bluesky.Embed.EmbeddedGallery.Items is compared by its contents rather than by reference.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(EmbeddedMediaBase?)

public override sealed bool Equals(EmbeddedMediaBase? other)

Parameters

other EmbeddedMediaBase?

Returns

bool

Equals(EmbeddedGallery?)

Determines whether the specified idunno.Bluesky.Embed.EmbeddedGallery is equal to the current instance.

public virtual bool Equals(EmbeddedGallery? other)

Parameters

other EmbeddedGallery?

The idunno.Bluesky.Embed.EmbeddedGallery to compare against the current instance.

Returns

bool

true if other is equal to the current instance, otherwise false.

Remarks

idunno.Bluesky.Embed.EmbeddedGallery.Items is compared by its contents rather than by reference.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(EmbeddedMediaBase?)

public override sealed bool Equals(EmbeddedMediaBase? other)

Parameters

other EmbeddedMediaBase?

Returns

bool

GetHashCode()

Returns the hash code for the current instance.

public override int GetHashCode()

Returns

int

The hash code for the current instance.

Remarks

The hash code is derived from the items the gallery currently contains, so it changes if the gallery is mutated. Do not mutate an instance while it is being used as a key in a hashed collection.

GetHashCode()

Returns the hash code for the current instance.

public override int GetHashCode()

Returns

int

The hash code for the current instance.

Remarks

The hash code is derived from the items the gallery currently contains, so it changes if the gallery is mutated. Do not mutate an instance while it is being used as a key in a hashed collection.

GetHashCode()

Returns the hash code for the current instance.

public override int GetHashCode()

Returns

int

The hash code for the current instance.

Remarks

The hash code is derived from the items the gallery currently contains, so it changes if the gallery is mutated. Do not mutate an instance while it is being used as a key in a hashed collection.

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

Removes a specific idunno.Bluesky.Embed.Gallery.GalleryImage item from the gallery.

public bool Remove(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.Gallery.GalleryImage item to remove.

Returns

bool

true if the item was successfully removed; otherwise, false.

Removes a specific idunno.Bluesky.Embed.Gallery.GalleryImage item from the gallery.

public bool Remove(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.Gallery.GalleryImage item to remove.

Returns

bool

true if the item was successfully removed; otherwise, false.

Removes a specific idunno.Bluesky.Embed.Gallery.GalleryImage item from the gallery.

public bool Remove(GalleryImage item)

Parameters

item GalleryImage

The idunno.Bluesky.Embed.Gallery.GalleryImage item to remove.

Returns

bool

true if the item was successfully removed; otherwise, false.

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

ToString()

public override string ToString()

Returns

string

Operators

operator ==(EmbeddedGallery?, EmbeddedGallery?)

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

Parameters

left EmbeddedGallery?
right EmbeddedGallery?

Returns

bool

operator ==(EmbeddedGallery?, EmbeddedGallery?)

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

Parameters

left EmbeddedGallery?
right EmbeddedGallery?

Returns

bool

operator ==(EmbeddedGallery?, EmbeddedGallery?)

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

Parameters

left EmbeddedGallery?
right EmbeddedGallery?

Returns

bool

operator !=(EmbeddedGallery?, EmbeddedGallery?)

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

Parameters

left EmbeddedGallery?
right EmbeddedGallery?

Returns

bool

operator !=(EmbeddedGallery?, EmbeddedGallery?)

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

Parameters

left EmbeddedGallery?
right EmbeddedGallery?

Returns

bool

operator !=(EmbeddedGallery?, EmbeddedGallery?)

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

Parameters

left EmbeddedGallery?
right EmbeddedGallery?

Returns

bool