ContentQuery Class

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

public class ContentQuery : Query, ICloneable
Inheritance:
System.Object → QueryOptionsQuery → Weavy.Core.Models.Query{Weavy.Core.Models.Content} → ContentQuery

Constructors

ContentQuery() Initializes a new instance of the ContentQuery class.
ContentQuery(Query) Initializes a new instance of the ContentQuery class with the specified Query.
ContentQuery(QueryOptions) Initializes a new instance of the ContentQuery class with the specified QueryOptions.

Properties

AppId Gets or sets the id of the App to search.
Depth Gets or sets a value indicating the depth of the search (only when ParentId and/or AppId is specified). Default is 0 which disables Depth search, 1 returns only the immediate children of the specified parent, 2 returns children and grandchildren etc. Setting Depth to null will search all descendants of the specified parent.
DraftBy Gets or sets the id of a User for which to get drafts and locked items (when this is set only drafts and locked items is returned).
Guid Gets or sets the Guid of the content type to search, default is null which finds any type of content item.
ParentId Gets or sets an the id of the parent Content item. Used to find descendants of the specified content item. Combine with Depth to specify if the search should look at all descendants or only the immediate children.
TransientBy Gets or sets the id of a User for which to include transient drafts for (drafts that has not yet been published).
Type Gets or sets the type of content to search, default is null which searches all content items regardless of type.

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.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.