Table of Contents

Class RelationshipObject

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

Describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals.

public class RelationshipObject : ASObject, IASModel<ASType, ASTypeEntity>, IASModel<ASType>, IASModel<ASObject, ASObjectEntity, ASType>, IASModel<ASObject, ASObjectEntity>, IASModel<ASObject>, IASModel<RelationshipObject, RelationshipObjectEntity, ASObject>, IASModel<RelationshipObject, RelationshipObjectEntity>, IASModel<RelationshipObject>
Inheritance
RelationshipObject
Implements
Inherited Members

Constructors

RelationshipObject()

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

public RelationshipObject()

RelationshipObject(ASType)

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

public RelationshipObject(ASType existingGraph)

Parameters

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

RelationshipObject(TypeMap, RelationshipObjectEntity?)

public RelationshipObject(TypeMap typeMap, RelationshipObjectEntity? entity)

Parameters

typeMap TypeMap
entity RelationshipObjectEntity

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

RelationshipType

ActivityStreams type name for "Relationship" types.

[PublicAPI]
public const string RelationshipType = "Relationship"

Field Value

string

Properties

Entity

private RelationshipObjectEntity Entity { get; }

Property Value

RelationshipObjectEntity

Object

Describes the entity to which the subject is related.

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

Property Value

LinkableList<ASObject>
See Also

Relationship

On a Relationship object, the relationship property identifies the kind of relationship that exists between subject and object.

public Linkable<ASObject>? Relationship { get; set; }

Property Value

Linkable<ASObject>

Remarks

This is supposed to be Range = "Object", but all the examples have a string URL

See Also

Subject

On a Relationship object, the subject property identifies one of the connected individuals. For instance, for a Relationship object describing "John is related to Sally", subject would refer to John.

public Linkable<ASObject>? Subject { get; set; }

Property Value

Linkable<ASObject>
See Also

Explicit Interface Implementations

IASModel<RelationshipObject>.ASTypeName

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

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

Returns

string

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

Parameters

typeMap TypeMap

Returns

RelationshipObject