Embed Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

Represents an embedded object.

public class Embed : OEmbed, IValidatableObject, ICloneable
Inheritance:
System.Object → OEmbedEmbed

Constructors

Embed() Initializes a new instance of the Embed class.
Embed(OEmbed) Initializes a new instance of the Embed class with the given oEmbed data.

Properties

CreatedAt Gets the time (UTC) the embed url was fetched.
CreatedById Gets the id of the user that created the embed.
Description Gets or sets a description for the embed.
Host Gets the name of the host/domain where the embed originates.
Id Gets the embed id.
Image Gets the primary image for the embed (if any).
IsLink Gets or sets a UI hint telling the UI to render this embed as a link.
OriginalUrl Gets the original url the user provided.
Parent Gets a reference to the entity where the embed is embedded.

Methods

Clone() Creates a new object that is a copy of the current instance.
Validate(ValidationContext) Performs custom validation.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
ThumbPlaceholderUrl(Embed, Boolean, Boolean) Returns a placeholder url to a thumbnail image of the specified Embed. The url contains the string "{options}" which can be replaced with the desired resize options, e.g. "128", "128x0", "0x128", "128x256" etc.
ThumbUrl(Embed, Nullable, Nullable, Boolean, FitMode, ScaleMode, ContentAlignment, Nullable, Int32, Int32, Boolean, Boolean, Boolean, Boolean) Returns an url to a thumbnail image for the specified embed
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.