Table of Contents

Class MentionLink

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

A specialized Link that represents an @mention.

public class MentionLink : ASLink, IASModel<ASType, ASTypeEntity>, IASModel<ASType>, IASModel<ASLink, ASLinkEntity, ASType>, IASModel<ASLink, ASLinkEntity>, IASModel<ASLink>, IASModel<MentionLink, MentionLinkEntity, ASLink>, IASModel<MentionLink, MentionLinkEntity>, IASModel<MentionLink>
Inheritance
MentionLink
Implements
Inherited Members

Constructors

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

public MentionLink()
public MentionLink(ASType existingGraph)

Parameters

existingGraph ASType
public MentionLink(TypeMap typeMap, MentionLinkEntity? entity)

Parameters

typeMap TypeMap
entity MentionLinkEntity

Constructs a new instance from an existing type graph. The existing graph is either extended or wrapped, depending on the value of

isExtending
public MentionLink(TypeMap typeMap, bool isExtending = true)

Parameters

typeMap TypeMap
isExtending bool

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

ActivityStreams type name for "Mention" types.

[PublicAPI]
public const string MentionType = "Mention"

Field Value

string

Properties

private MentionLinkEntity Entity { get; }

Property Value

MentionLinkEntity

Operators

Implicitly converts the link to an ASUri using the value of HRef.

public static implicit operator ASUri(MentionLink link)

Parameters

link MentionLink

Returns

ASUri

Implicitly converts the link to a string using the value of HRef.

public static implicit operator string(MentionLink link)

Parameters

link MentionLink

Returns

string

Implicitly converts the link to a Uri using the value of HRef.

public static implicit operator Uri(MentionLink link)

Parameters

link MentionLink

Returns

Uri

Implicitly converts an ASUri into a link. Uri value will be assigned to HRef.

public static implicit operator MentionLink(ASUri asUri)

Parameters

asUri ASUri

Returns

MentionLink

Implicitly converts a string into a link. String value will be assigned to HRef.

public static implicit operator MentionLink(string str)

Parameters

str string

Returns

MentionLink

Implicitly converts a Uri into a link. Uri value will be assigned to HRef.

public static implicit operator MentionLink(Uri uri)

Parameters

uri Uri

Returns

MentionLink

Explicit Interface Implementations

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

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

Returns

string

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

Parameters

typeMap TypeMap

Returns

MentionLink