Content Class

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

Base class for all content items.

Used as fallback when actual item implementation cannot be resolved.

[Guid("5AC93172-18CA-4650-A206-472634E892D8")]
[Content(Icon = "file-document-box", Color = "theme-500", Name = "Content item", SingularName = "a content item", PluralName = "content items", Description = "Used as fallback when actual content type could not be resolved.")]
public class Content : Expando, IExpando, IDynamicMetaObjectProvider, IEnumerable>, IEnumerable, IContent, IExtension, IAppEntity, ISpaceEntity, ITrashable, IEntity, ICloneable, IValidatableObject
Inheritance:
System.Object → ExpandoContent
Attributes:
System.Runtime.InteropServices.GuidAttribute, ContentAttribute
Implements:
IExpando, IContent, IExtension, IAppEntity, ISpaceEntity, ITrashable, IEntity

Constructors

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

Properties

AppId Gets the id of the App where the content item is located.
ContentGuid Gets the guid of the underlying content type.
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 entity id.
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.
Name Gets or sets the name of the content item.
ParentId Gets the id of the parent content item (for hierarchical content items).
SpaceId Gets the space id.
Timestamp Gets the timestamp.
TrashedAt Gets or sets the time (UTC) the entity was trashed.
TrashedById Gets or sets the id of the User that trashed the entity.
Type Gets the entity type.

Methods

Clone() Create a deep copy of the current object.
CreateThumb(FileInfo) Create and write a thumbnail image for this content item. Subclasses can override this method to supply their own implementation.
GetExcerpt(Boolean) Gets an excerpt or summary suitable for display in lists and search results. Subclasses can override this method to supply their own implementation.
GetIcon() Get the icon for the content item. Subclasses can override this method to supply their own implementation.
GetKind() Get the kind of the content (as a lowercased string). Subclasses can override this method to supply their own implementation.
GetTitle() Gets a title suitable for display in lists and search results. Subclasses can override this method to supply their own implementation.
Validate(ValidationContext) Performs custom validation. Subclasses can override this method to add their own validation.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
MetaData(Content) Gets meta data for the specified content item.
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.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.
FAB(Content) Returns a FAB with links for adding child content.