Table of Contents

Class ASOrderedCollectionEntity

Namespace
ActivityPub.Types.AS.Collection
Assembly
ActivityPub.Types.dll

A Collection is a subtype of Object that represents ordered sets of Object or Link instances. May be paged or unpaged.

public sealed class ASOrderedCollectionEntity : ASEntity<ASOrderedCollection, ASOrderedCollectionEntity>
Inheritance
ASOrderedCollectionEntity
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<ASOrderedCollectionPage>? Current { get; set; }

Property Value

Linkable<ASOrderedCollectionPage>
See Also

First

In a paged Collection, indicates the furthest preceding page of items in the collection.

[JsonPropertyName("first")]
public Linkable<ASOrderedCollectionPage>? First { get; set; }

Property Value

Linkable<ASOrderedCollectionPage>
See Also

Items

Identifies the items contained in a collection. The items might be ordered or unordered.

[JsonPropertyName("orderedItems")]
public LinkableList<ASObject>? Items { get; set; }

Property Value

LinkableList<ASObject>

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<ASOrderedCollectionPage>? Last { get; set; }

Property Value

Linkable<ASOrderedCollectionPage>
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

int

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.

See Also