Attachment Class

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

An file attached to an entity, e.g. Content, Comment, Message or Post.

[Boost(0.8F)]
[Guid("78AFE63C-9EFF-4353-9290-28DDFB7593E4")]
public class Attachment : Expando, IExpando, IDynamicMetaObjectProvider, IEnumerable>, IEnumerable, ISpaceEntity, ITrashable, IEntity, ICloneable
Inheritance:
System.Object → ExpandoAttachment
Attributes:
BoostAttribute, System.Runtime.InteropServices.GuidAttribute
Implements:
IExpando, ISpaceEntity, ITrashable, IEntity

Constructors

Attachment() Initializes a new instance of the Attachment class.

Properties

Blob Gets or sets the Blob containing metadata about, and pointing to, the actual binary data.
CreatedAt Gets or sets the time the entity was created.
CreatedById Gets or sets the id of the User that created the entity.
Id Gets the id of the entity.
ModifiedAt Gets or sets the time (UTC) the entity was last modified.
ModifiedById Gets or sets the id of the User that last updated the entity.
Parent Gets a reference to the entity where the file is attached.
SpaceId Gets the id of the space where the file is attached.
Timestamp Gets the timestamp.
TrashedAt Gets the time (UTC) the entity was trashed.
TrashedById Gets the id of the User that trashed the entity.
Type Gets the type of the entity.

Methods

Clone() Create a deep copy of the current object.
GetExcerpt(Boolean)
GetIcon()
GetTitle()

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.
FileUrl(Attachment, String, Boolean, Boolean) Returns the url to the binary data of an attachment.
PreviewUrl(Attachment, Boolean) Returns the url used to preview the specified attachment.
OfficeUrl(Attachment) Returns an url that can be used to open an Office document in Microsoft Word, Excel or Powerpoint using the Office URI Schemes.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.