Table of Contents

Class AddActivity

Namespace
ActivityPub.Types.AS.Extended.Activity
Assembly
ActivityPub.Types.dll

Indicates that the actor has added the object to the target. If the target property is not explicitly specified, the target would need to be determined implicitly by context. The origin can be used to identify the context from which the object originated.

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

Constructors

AddActivity()

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

public AddActivity()

AddActivity(ASType)

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

public AddActivity(ASType existingGraph)

Parameters

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

AddActivity(TypeMap, AddActivityEntity?)

public AddActivity(TypeMap typeMap, AddActivityEntity? entity)

Parameters

typeMap TypeMap
entity AddActivityEntity

AddActivity(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 AddActivity(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

AddType

ActivityStreams type name for "Add" types.

[PublicAPI]
public const string AddType = "Add"

Field Value

string

Properties

Entity

private AddActivityEntity Entity { get; }

Property Value

AddActivityEntity

Explicit Interface Implementations

IASModel<AddActivity>.ASTypeName

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

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

Returns

string

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

Parameters

typeMap TypeMap

Returns

AddActivity