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
MentionLink()
Constructs a new instance and attaches it to a new, empty type graph.
public MentionLink()
MentionLink(ASType)
public MentionLink(ASType existingGraph)
Parameters
existingGraph
ASType
MentionLink(TypeMap, MentionLinkEntity?)
public MentionLink(TypeMap typeMap, MentionLinkEntity? entity)
Parameters
typeMap
TypeMapentity
MentionLinkEntity
MentionLink(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 MentionLink(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
MentionType
ActivityStreams type name for "Mention" types.
[PublicAPI]
public const string MentionType = "Mention"
Field Value
Properties
Entity
private MentionLinkEntity Entity { get; }
Property Value
Operators
implicit operator ASUri(MentionLink)
Implicitly converts the link to an ASUri using the value of HRef.
public static implicit operator ASUri(MentionLink link)
Parameters
link
MentionLink
Returns
implicit operator string(MentionLink)
Implicitly converts the link to a string using the value of HRef.
public static implicit operator string(MentionLink link)
Parameters
link
MentionLink
Returns
implicit operator Uri(MentionLink)
Implicitly converts the link to a Uri using the value of HRef.
public static implicit operator Uri(MentionLink link)
Parameters
link
MentionLink
Returns
implicit operator MentionLink(ASUri)
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
implicit operator MentionLink(string)
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
implicit operator MentionLink(Uri)
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
Explicit Interface Implementations
IASModel<MentionLink>.ASTypeName
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
IASModel<MentionLink>.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 MentionLink IASModel<MentionLink>.FromGraph(TypeMap typeMap)
Parameters
typeMap
TypeMap