Class ActivityId
The ActivityId class is a data model representing an identifier for an activity (of interest to one or more subscribers) for which a feed item was generated when that activity was received by the ActivityStreams system.
Inherited Members
Namespace: EPiServer.Social.ActivityStreams.Core
Assembly: EPiServer.Social.ActivityStreams.Core.dll
Version: 1.5.4Syntax
public class ActivityId : Identifier
Constructors
ActivityId(String)
Constructor
Declaration
public ActivityId(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | String-based identifier for an activity. |
Properties
Empty
Returns a newly created ActivityId instance representing an 'empty' activity ID.
Declaration
public static ActivityId Empty { get; }
Property Value
| Type | Description |
|---|---|
| ActivityId |
Methods
Create()
Creates an empty ActivityId.
Declaration
public static ActivityId Create()
Returns
| Type | Description |
|---|---|
| ActivityId | Empty ActivityId instance |
Create(String)
Parses an activity ID from a string-based identifier.
Declaration
public static ActivityId Create(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Identifer for the activity |
Returns
| Type | Description |
|---|---|
| ActivityId | Instance of ActivityId representing the specified identifier |
Equals(Object)
Compares this instance with another object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | the object to compare with this instance. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if this instance and another specified object, of type ActivityId have the same value of the underlying activity identifier, else returns false. |
Overrides
GetHashCode()
Returns a hash code representative of this ActivityId.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A 32-bit signed integer hash code. |
Overrides
IsNullOrEmpty(ActivityId)
Returns true if the specified ActivityId has not been initialized or represents an empty activity identifier, false otherwise.
Declaration
public static bool IsNullOrEmpty(ActivityId id)
Parameters
| Type | Name | Description |
|---|---|---|
| ActivityId | id | Activity identifier to evaluate |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the ActivityId is null or empty, false otherwise |
Operators
Equality(ActivityId, ActivityId)
Evaluates the equality of two ActivityId instances.
Declaration
public static bool operator ==(ActivityId a, ActivityId b)
Parameters
| Type | Name | Description |
|---|---|---|
| ActivityId | a | The operand on the left side of the equality operator. |
| ActivityId | b | The operand on the right side of the equality operator. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the specified instances are equivalent, false otherwise. |
Inequality(ActivityId, ActivityId)
Evaluates two ActivityId instances for inequality.
Declaration
public static bool operator !=(ActivityId a, ActivityId b)
Parameters
| Type | Name | Description |
|---|---|---|
| ActivityId | a | The operand on the left side of the inequality operator. |
| ActivityId | b | The operand on the right side of the inequality operator. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the specified instances are not equivalent, false otherwise. |