Class CommentId
The CommentId class is a data model representing an identifier for a moderation workflow within the social platform.
Inherited Members
Namespace: EPiServer.Social.Comments.Core
Assembly: EPiServer.Social.Comments.Core.dll
Version: 1.5.4Syntax
public class CommentId : Identifier
Properties
Empty
Returns a newly created CommentId instance whose comment identifier is initialized to an empty string.
Declaration
public static CommentId Empty { get; }
Property Value
| Type | Description |
|---|---|
| CommentId |
Methods
Create()
Returns a newly created and initialized CommentId instance
Declaration
public static CommentId Create()
Returns
| Type | Description |
|---|---|
| CommentId | A comment ID. |
Create(String)
Parses a comment ID from a string-based comment identifier.
Declaration
public static CommentId Create(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | the comment identifier value to initialize with for the new CommentId instance being returned. |
Returns
| Type | Description |
|---|---|
| CommentId |
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 CommentId have the same value of the underlying comment identifier, else returns false. |
Overrides
GetHashCode()
Returns the hash code of the underlying comment identifier of this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A 32-bit signed integer hash code. |
Overrides
Operators
Equality(CommentId, CommentId)
Overloads the equality operator on the CommentId class.
Declaration
public static bool operator ==(CommentId a, CommentId b)
Parameters
| Type | Name | Description |
|---|---|---|
| CommentId | a | The operand on the left side of the equality operator. |
| CommentId | b | The operand on the right side of the equality operator. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if the both objects are null or the same instance or have the same value of the underlying comment identifier. Returns false if either object is null or both objects have different values of the underlying comment identifier. |
Inequality(CommentId, CommentId)
Overloads the inequality operator on the CommentId class.
Declaration
public static bool operator !=(CommentId a, CommentId b)
Parameters
| Type | Name | Description |
|---|---|---|
| CommentId | a | The operand on the left side of the inequality operator. |
| CommentId | b | The operand on the right side of the inequality operator. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns true if either object is null or both objects have different values of the underlying comment identifier. Returns false if the both objects are null or the same instance or have the same value of the underlying comment identifier. |