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
TypeMapentity
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
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
RelationshipType
ActivityStreams type name for "Relationship" types.
[PublicAPI]
public const string RelationshipType = "Relationship"
Field Value
Properties
Entity
private RelationshipObjectEntity Entity { get; }
Property Value
Object
Describes the entity to which the subject is related.
public LinkableList<ASObject> Object { get; set; }
Property Value
- 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
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
- 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
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