Class ASCollectionEntity
- Namespace
- ActivityPub.Types.AS.Collection
- Assembly
- ActivityPub.Types.dll
A Collection is a subtype of Object that represents unordered sets of Object or Link instances. May be paged or unpaged.
public sealed class ASCollectionEntity : ASEntity<ASCollection, ASCollectionEntity>
- Inheritance
-
ASCollectionEntity
- Inherited Members
Remarks
Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type.
Fields
_totalItems
private int? _totalItems
Field Value
- int?
Properties
Current
In a paged Collection, indicates the page that contains the most recently updated member items.
[JsonPropertyName("current")]
public Linkable<ASCollectionPage>? Current { get; set; }
Property Value
- See Also
First
In a paged Collection, indicates the furthest preceding page of items in the collection.
[JsonPropertyName("first")]
public Linkable<ASCollectionPage>? First { get; set; }
Property Value
- See Also
Items
Identifies the items contained in a collection. The items might be ordered or unordered.
[JsonPropertyName("items")]
public LinkableList<ASObject>? Items { get; set; }
Property Value
Remarks
In ordered collection types, this will map to "orderedItems". Otherwise, it maps to "items". In a paged collection, this MAY be null
- See Also
Last
In a paged Collection, indicates the furthest proceeding page of the collection.
[JsonPropertyName("last")]
public Linkable<ASCollectionPage>? Last { get; set; }
Property Value
- See Also
TotalItems
A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
[Range(0, 2147483647)]
[JsonPropertyName("totalItems")]
public int TotalItems { get; set; }
Property Value
Remarks
If not explicitly set, then this will default to the number of elements in Items. Setting this to any value will disable this logic. If neither is set, returns zero. This cannot be set to less than zero.