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.EqualityContractAtProtoRecord.ExtensionData
Constructors
EmbeddedGallery(ICollection<GalleryImage>)
Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.
public EmbeddedGallery(ICollection<GalleryImage> items)Parameters
itemsICollection<GalleryImage>-
The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.
Exceptions
- ArgumentNullException
-
Thrown when
itemsis 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
otherEmbeddedGallery-
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
otheris null.
EmbeddedGallery(ICollection<EmbeddedImage>)
Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.
public EmbeddedGallery(ICollection<EmbeddedImage> items)Parameters
itemsICollection<EmbeddedImage>-
The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.
Exceptions
- ArgumentNullException
-
Thrown when
itemsis null. - ArgumentException
-
Thrown when the items collection contains null values or items with invalid properties.
EmbeddedGallery(ICollection<GalleryImage>)
Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.
public EmbeddedGallery(ICollection<GalleryImage> items)Parameters
itemsICollection<GalleryImage>-
The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.
Exceptions
- ArgumentNullException
-
Thrown when
itemsis 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
otherEmbeddedGallery-
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
otheris null.
EmbeddedGallery(ICollection<EmbeddedImage>)
Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.
public EmbeddedGallery(ICollection<EmbeddedImage> items)Parameters
itemsICollection<EmbeddedImage>-
The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.
Exceptions
- ArgumentNullException
-
Thrown when
itemsis null. - ArgumentException
-
Thrown when the items collection contains null values or items with invalid properties.
EmbeddedGallery(ICollection<GalleryImage>)
Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.
public EmbeddedGallery(ICollection<GalleryImage> items)Parameters
itemsICollection<GalleryImage>-
The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.
Exceptions
- ArgumentNullException
-
Thrown when
itemsis 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
otherEmbeddedGallery-
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
otheris null.
EmbeddedGallery(ICollection<EmbeddedImage>)
Creates a new instance of the idunno.Bluesky.Embed.EmbeddedGallery class.
public EmbeddedGallery(ICollection<EmbeddedImage> items)Parameters
itemsICollection<EmbeddedImage>-
The collection of idunno.Bluesky.Embed.EmbeddedImage items to include in the gallery.
Exceptions
- ArgumentNullException
-
Thrown when
itemsis 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
Count
Gets the number of elements contained in the gallery.
[JsonIgnore]
public int Count { get; }Property Value
Count
Gets the number of elements contained in the gallery.
[JsonIgnore]
public int Count { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
EqualityContract
protected override Type EqualityContract { get; }Property Value
Items
Gets the collection of idunno.Bluesky.Embed.Gallery.GalleryImage items in the gallery.
[JsonInclude]
[JsonRequired]
public IReadOnlyList<GalleryImage> Items { get; }Property Value
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
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
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
<Clone>$()
public override EmbeddedGallery <Clone>$()Returns
<Clone>$()
public override EmbeddedGallery <Clone>$()Returns
Add(GalleryImage)
Adds an idunno.Bluesky.Embed.Gallery.GalleryImage item to the gallery.
public void Add(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.Gallery.GalleryImage item to add.
Exceptions
- ArgumentNullException
-
Thrown when
itemis null. - ArgumentException
-
Thrown when
itemhas no image, or its image is not an image MIME type. - InvalidOperationException
-
Thrown when the gallery already contains the maximum number of items.
Add(GalleryImage)
Adds an idunno.Bluesky.Embed.Gallery.GalleryImage item to the gallery.
public void Add(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.Gallery.GalleryImage item to add.
Exceptions
- ArgumentNullException
-
Thrown when
itemis null. - ArgumentException
-
Thrown when
itemhas no image, or its image is not an image MIME type. - InvalidOperationException
-
Thrown when the gallery already contains the maximum number of items.
Add(GalleryImage)
Adds an idunno.Bluesky.Embed.Gallery.GalleryImage item to the gallery.
public void Add(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.Gallery.GalleryImage item to add.
Exceptions
- ArgumentNullException
-
Thrown when
itemis null. - ArgumentException
-
Thrown when
itemhas 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()Contains(GalleryImage)
Determines whether the gallery contains a specific idunno.Bluesky.Embed.EmbeddedImage item.
public bool Contains(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.EmbeddedImage item to locate in the gallery.
Returns
Contains(GalleryImage)
Determines whether the gallery contains a specific idunno.Bluesky.Embed.EmbeddedImage item.
public bool Contains(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.EmbeddedImage item to locate in the gallery.
Returns
Contains(GalleryImage)
Determines whether the gallery contains a specific idunno.Bluesky.Embed.EmbeddedImage item.
public bool Contains(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.EmbeddedImage item to locate in the gallery.
Returns
CopyTo(GalleryImage[], int)
Copies the elements of the gallery to an array, starting at a particular array index.
public void CopyTo(GalleryImage[] array, int arrayIndex)Parameters
arrayGalleryImage[]-
The destination array.
arrayIndexint-
The zero-based index in the array at which copying begins.
CopyTo(GalleryImage[], int)
Copies the elements of the gallery to an array, starting at a particular array index.
public void CopyTo(GalleryImage[] array, int arrayIndex)Parameters
arrayGalleryImage[]-
The destination array.
arrayIndexint-
The zero-based index in the array at which copying begins.
CopyTo(GalleryImage[], int)
Copies the elements of the gallery to an array, starting at a particular array index.
public void CopyTo(GalleryImage[] array, int arrayIndex)Parameters
arrayGalleryImage[]-
The destination array.
arrayIndexint-
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
otherEmbeddedGallery?-
The idunno.Bluesky.Embed.EmbeddedGallery to compare against the current instance.
Returns
Remarks
idunno.Bluesky.Embed.EmbeddedGallery.Items is compared by its contents rather than by reference.
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(EmbeddedMediaBase?)
public override sealed bool Equals(EmbeddedMediaBase? other)Parameters
otherEmbeddedMediaBase?
Returns
Equals(EmbeddedGallery?)
Determines whether the specified idunno.Bluesky.Embed.EmbeddedGallery is equal to the current instance.
public virtual bool Equals(EmbeddedGallery? other)Parameters
otherEmbeddedGallery?-
The idunno.Bluesky.Embed.EmbeddedGallery to compare against the current instance.
Returns
Remarks
idunno.Bluesky.Embed.EmbeddedGallery.Items is compared by its contents rather than by reference.
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(EmbeddedMediaBase?)
public override sealed bool Equals(EmbeddedMediaBase? other)Parameters
otherEmbeddedMediaBase?
Returns
Equals(EmbeddedGallery?)
Determines whether the specified idunno.Bluesky.Embed.EmbeddedGallery is equal to the current instance.
public virtual bool Equals(EmbeddedGallery? other)Parameters
otherEmbeddedGallery?-
The idunno.Bluesky.Embed.EmbeddedGallery to compare against the current instance.
Returns
Remarks
idunno.Bluesky.Embed.EmbeddedGallery.Items is compared by its contents rather than by reference.
Equals(object?)
public override bool Equals(object? obj)Parameters
objobject?
Returns
Equals(EmbeddedMediaBase?)
public override sealed bool Equals(EmbeddedMediaBase? other)Parameters
otherEmbeddedMediaBase?
Returns
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
builderStringBuilder
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)Parameters
builderStringBuilder
Returns
Remove(GalleryImage)
Removes a specific idunno.Bluesky.Embed.Gallery.GalleryImage item from the gallery.
public bool Remove(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.Gallery.GalleryImage item to remove.
Returns
Remove(GalleryImage)
Removes a specific idunno.Bluesky.Embed.Gallery.GalleryImage item from the gallery.
public bool Remove(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.Gallery.GalleryImage item to remove.
Returns
Remove(GalleryImage)
Removes a specific idunno.Bluesky.Embed.Gallery.GalleryImage item from the gallery.
public bool Remove(GalleryImage item)Parameters
itemGalleryImage-
The idunno.Bluesky.Embed.Gallery.GalleryImage item to remove.
Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(EmbeddedGallery?, EmbeddedGallery?)
public static bool operator ==(EmbeddedGallery? left, EmbeddedGallery? right)Parameters
leftEmbeddedGallery?rightEmbeddedGallery?
Returns
operator ==(EmbeddedGallery?, EmbeddedGallery?)
public static bool operator ==(EmbeddedGallery? left, EmbeddedGallery? right)Parameters
leftEmbeddedGallery?rightEmbeddedGallery?
Returns
operator ==(EmbeddedGallery?, EmbeddedGallery?)
public static bool operator ==(EmbeddedGallery? left, EmbeddedGallery? right)Parameters
leftEmbeddedGallery?rightEmbeddedGallery?
Returns
operator !=(EmbeddedGallery?, EmbeddedGallery?)
public static bool operator !=(EmbeddedGallery? left, EmbeddedGallery? right)Parameters
leftEmbeddedGallery?rightEmbeddedGallery?
Returns
operator !=(EmbeddedGallery?, EmbeddedGallery?)
public static bool operator !=(EmbeddedGallery? left, EmbeddedGallery? right)Parameters
leftEmbeddedGallery?rightEmbeddedGallery?
Returns
operator !=(EmbeddedGallery?, EmbeddedGallery?)
public static bool operator !=(EmbeddedGallery? left, EmbeddedGallery? right)Parameters
leftEmbeddedGallery?rightEmbeddedGallery?