Class ASCollectionPage
- Namespace
- ActivityPub.Types.AS.Collection
- Assembly
- ActivityPub.Types.dll
Used to represent distinct subsets of items from a Collection.
public class ASCollectionPage : ASCollection, IASModel<ASType, ASTypeEntity>, IASModel<ASType>, IASModel<ASObject, ASObjectEntity, ASType>, IASModel<ASObject, ASObjectEntity>, IASModel<ASObject>, IASModel<ASCollection, ASCollectionEntity, ASObject>, IASModel<ASCollection, ASCollectionEntity>, IASModel<ASCollection>, IEnumerable<Linkable<ASObject>>, IEnumerable, IASModel<ASCollectionPage, ASCollectionPageEntity, ASCollection>, IASModel<ASCollectionPage, ASCollectionPageEntity>, IASModel<ASCollectionPage>
- Inheritance
-
ASCollectionPage
- Implements
- Inherited Members
Remarks
Refer to the Activity Streams 2.0 Core specification for a complete description of the CollectionPage type.
Constructors
ASCollectionPage()
Constructs a new instance and attaches it to a new, empty type graph.
public ASCollectionPage()
ASCollectionPage(ASType)
Constructs a new instance and extends an existing type graph from a provided model.
public ASCollectionPage(ASType existingGraph)
Parameters
existingGraph
ASType
- See Also
-
Extend<TModel, TEntity>()
ASCollectionPage(TypeMap, ASCollectionPageEntity?)
public ASCollectionPage(TypeMap typeMap, ASCollectionPageEntity? entity)
Parameters
typeMap
TypeMapentity
ASCollectionPageEntity
ASCollectionPage(TypeMap, bool)
Constructs a new instance from an existing type graph. The existing graph is either extended or wrapped, depending on the value of
isExtending
public ASCollectionPage(TypeMap typeMap, bool isExtending = true)
Parameters
Remarks
All overrides MUST call this using
base(typeMap, false)
Exceptions
- InvalidOperationException
If
is true and the entity type already exists in the graphextendGraph
- InvalidOperationException
If
is true and the entity requires another entity that is missing from the graphextendGraph
- InvalidCastException
If
is false and the object is not of typeextendGraph
TEntity
- See Also
Fields
CollectionPageType
ActivityStreams type name for "CollectionPage" types.
[PublicAPI]
public const string CollectionPageType = "CollectionPage"
Field Value
Properties
Entity
private ASCollectionPageEntity Entity { get; }
Property Value
Next
In a paged Collection, indicates the next page of items.
public Linkable<ASCollectionPage>? Next { get; set; }
Property Value
- See Also
PartOf
Identifies the Collection to which a CollectionPage objects items belong.
public Linkable<ASCollection>? PartOf { get; set; }
Property Value
- See Also
Prev
In a paged Collection, indicates the previous page of items.
public Linkable<ASCollectionPage>? Prev { get; set; }
Property Value
- See Also
StartIndex
A non-negative integer value identifying the relative position within the logical view of a strictly ordered collection. This is only valid on OrderedCollectionPage, but it exists on unordered CollectionPage due to technical limitations.
public int? StartIndex { get; set; }
Property Value
- int?
- See Also
Operators
implicit operator ASCollectionPage(List<ASObject>)
Converts a list of objects into a collection page.
public static implicit operator ASCollectionPage(List<ASObject> collection)
Parameters
Returns
Explicit Interface Implementations
IASModel<ASCollectionPage>.ASTypeName
AS type name of this entity. For the full list of names in the object graph, use ASTypes.
static string IASModel<ASCollectionPage>.ASTypeName { get; }
Returns
IASModel<ASCollectionPage>.FromGraph(TypeMap)
Constructs an instance from this type from a pre-populated type graph. The provided TypeMap instance is guaranteed to include an instance of type EntityType.
static ASCollectionPage IASModel<ASCollectionPage>.FromGraph(TypeMap typeMap)
Parameters
typeMap
TypeMap