Class BlockActivity
- Namespace
- ActivityPub.Types.AS.Extended.Activity
- Assembly
- ActivityPub.Types.dll
Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. The typical use is to support social systems that allow one user to block activities or content of other users. The target and origin typically have no defined meaning.
public class BlockActivity : IgnoreActivity, IASModel<ASType, ASTypeEntity>, IASModel<ASType>, IASModel<ASObject, ASObjectEntity, ASType>, IASModel<ASObject, ASObjectEntity>, IASModel<ASObject>, IASModel<ASActivity, ASActivityEntity, ASObject>, IASModel<ASActivity, ASActivityEntity>, IASModel<ASActivity>, IASModel<IgnoreActivity, IgnoreActivityEntity, ASActivity>, IASModel<IgnoreActivity, IgnoreActivityEntity>, IASModel<IgnoreActivity>, IASModel<BlockActivity, BlockActivityEntity, IgnoreActivity>, IASModel<BlockActivity, BlockActivityEntity>, IASModel<BlockActivity>
- Inheritance
-
BlockActivity
- Implements
- Inherited Members
Constructors
BlockActivity()
Constructs a new instance and attaches it to a new, empty type graph.
public BlockActivity()
BlockActivity(ASType)
Constructs a new instance and extends an existing type graph from a provided model.
public BlockActivity(ASType existingGraph)
Parameters
existingGraph
ASType
- See Also
-
Extend<TModel, TEntity>()
BlockActivity(TypeMap, BlockActivityEntity?)
public BlockActivity(TypeMap typeMap, BlockActivityEntity? entity)
Parameters
typeMap
TypeMapentity
BlockActivityEntity
BlockActivity(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 BlockActivity(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
BlockType
ActivityStreams type name for "Block" types.
[PublicAPI]
public const string BlockType = "Block"
Field Value
Properties
Entity
private BlockActivityEntity Entity { get; }
Property Value
Explicit Interface Implementations
IASModel<BlockActivity>.ASTypeName
AS type name of this entity. For the full list of names in the object graph, use ASTypes.
static string IASModel<BlockActivity>.ASTypeName { get; }
Returns
IASModel<BlockActivity>.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 BlockActivity IASModel<BlockActivity>.FromGraph(TypeMap typeMap)
Parameters
typeMap
TypeMap