Table of Contents

Class ASActivity

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

An Activity is a subtype of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity type itself serves as an abstract base type for all types of activities. It is important to note that the Activity type itself does not carry any specific semantics about the kind of action being taken.

public class ASActivity : ASObject, IASModel<ASType, ASTypeEntity>, IASModel<ASType>, IASModel<ASObject, ASObjectEntity, ASType>, IASModel<ASObject, ASObjectEntity>, IASModel<ASObject>, IASModel<ASActivity, ASActivityEntity, ASObject>, IASModel<ASActivity, ASActivityEntity>, IASModel<ASActivity>
Inheritance
ASActivity
Implements
Derived
Inherited Members

Constructors

ASActivity()

Constructs a new instance and attaches it to a new, empty type graph.

public ASActivity()

ASActivity(ASType)

Constructs a new instance and extends an existing type graph from a provided model.

public ASActivity(ASType existingGraph)

Parameters

existingGraph ASType
See Also
Extend<TModel, TEntity>()

ASActivity(TypeMap, ASActivityEntity?)

public ASActivity(TypeMap typeMap, ASActivityEntity? entity)

Parameters

typeMap TypeMap
entity ASActivityEntity

ASActivity(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 ASActivity(TypeMap typeMap, bool isExtending = true)

Parameters

typeMap TypeMap
isExtending bool

Remarks

All overrides MUST call this using

base(typeMap, false)

Exceptions

InvalidOperationException

If

extendGraph
is true and the entity type already exists in the graph
InvalidOperationException

If

extendGraph
is true and the entity requires another entity that is missing from the graph
InvalidCastException

If

extendGraph
is false and the object is not of type
TEntity
See Also
ProjectTo<TModel, TEntity>(bool)

Fields

ActivityType

ActivityStreams type name for "Activity" types.

[PublicAPI]
public const string ActivityType = "Activity"

Field Value

string

Properties

Actor

Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.

public LinkableList<ASObject> Actor { get; set; }

Property Value

LinkableList<ASObject>
See Also

Entity

private ASActivityEntity Entity { get; }

Property Value

ASActivityEntity

Instrument

Identifies one or more objects used (or to be used) in the completion of an Activity.

public LinkableList<ASObject> Instrument { get; set; }

Property Value

LinkableList<ASObject>
See Also

Object

Describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added.

public LinkableList<ASObject> Object { get; set; }

Property Value

LinkableList<ASObject>
See Also

Origin

Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A".

public LinkableList<ASObject> Origin { get; set; }

Property Value

LinkableList<ASObject>
See Also

Result

Describes the result of the activity. For instance, if a particular action results in the creation of a new resource, the result property can be used to describe that new resource.

public LinkableList<ASObject> Result { get; set; }

Property Value

LinkableList<ASObject>
See Also

Target

Describes the indirect object, or target, of the activity. The precise meaning of the target is largely dependent on the type of action being described but will often be the object of the English preposition "to". For instance, in the activity "John added a movie to his wishlist", the target of the activity is John's wishlist. An activity can have more than one target.

public LinkableList<ASObject> Target { get; set; }

Property Value

LinkableList<ASObject>
See Also

Explicit Interface Implementations

IASModel<ASActivity>.ASTypeName

AS type name of this entity. For the full list of names in the object graph, use ASTypes.

static string IASModel<ASActivity>.ASTypeName { get; }

Returns

string

IASModel<ASActivity>.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 ASActivity IASModel<ASActivity>.FromGraph(TypeMap typeMap)

Parameters

typeMap TypeMap

Returns

ASActivity

See Also