Class Comment

The Comment class represents an individual instance of user-generated content within the Episerver Social platform.

Inheritance
System.Object
Comment
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Comments.Core
Assembly: EPiServer.Social.Comments.Core.dll
Version: 1.5.4
Syntax
public class Comment

Constructors

Comment(CommentId, Reference, Reference, String, Boolean)

Constructor

Declaration
public Comment(CommentId id, Reference parent, Reference author, string body, bool isVisible)
Parameters
Type Name Description
CommentId id

Unique identifier for the comment

Reference parent

Reference uniquely identifying the parent entity for the comment

Reference author

Reference uniquely identifying the contributor of the comment

System.String body

Body content of the comment

System.Boolean isVisible

Indicates whether or not this comment is intended to be displayed

Comment(CommentId, Reference, Reference, String, Boolean, IEnumerable<Reference>, DateTime, Boolean, Boolean)

Constructor

Declaration
public Comment(CommentId id, Reference parent, Reference author, string body, bool isVisible, IEnumerable<Reference> ancestors, DateTime created, bool hasChildren, bool hasVisibleChildren)
Parameters
Type Name Description
CommentId id

Unique identifier for the comment

Reference parent

Reference uniquely identifying the parent entity for the comment

Reference author

Reference uniquely identifying the contributor of the comment

System.String body

Body content of the comment

System.Boolean isVisible

Indicates whether or not this comment is intended to be displayed

System.Collections.Generic.IEnumerable<Reference> ancestors

Collection of references representing the ancestral path for this comment

System.DateTime created

Date (UTC) on which this comment was added

System.Boolean hasChildren

Indicates whether or not this comment has any replies

System.Boolean hasVisibleChildren

Indicates whether or not this comment has any replies, which are also visible

Comment(CommentId, String, Boolean)

Constructor

Declaration
public Comment(CommentId id, string body, bool isVisible)
Parameters
Type Name Description
CommentId id

Unique identifier for the comment

System.String body

Body content of the comment

System.Boolean isVisible

Indicates whether or not this comment is intended to be displayed

Comment(Reference, Reference, String, Boolean)

Constructor

Declaration
public Comment(Reference parent, Reference author, string body, bool isVisible)
Parameters
Type Name Description
Reference parent

Reference uniquely identifying the parent entity for the comment

Reference author

Reference uniquely identifying the user who contributed the comment

System.String body

Body content of the comment

System.Boolean isVisible

Indicates whether or not this comment is intended to be displayed

Comment(Reference, String, Boolean)

Constructor

Declaration
public Comment(Reference parent, string body, bool isVisible)
Parameters
Type Name Description
Reference parent

Reference uniquely identifying the parent entity for the comment

System.String body

Body content of the comment

System.Boolean isVisible

Indicates whether or not this comment is intended to be displayed

Properties

Ancestors

Gets a collection of references representing the ancestral path for this comment. The references identify ancestors in order from the root entity to this comment's parent.

Declaration
public IEnumerable<Reference> Ancestors { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<Reference>

Author

Gets a reference uniquely identifying the user who contributed this comment.

Declaration
public Reference Author { get; }
Property Value
Type Description
Reference

Body

Gets the body content of the comment.

Declaration
public virtual string Body { get; }
Property Value
Type Description
System.String

Created

Gets the date (UTC) on which this comment was added.

Declaration
public DateTime Created { get; }
Property Value
Type Description
System.DateTime

HasChildren

Gets a boolean indicating whether or not this comment has any replies.

Declaration
public bool HasChildren { get; }
Property Value
Type Description
System.Boolean

HasVisibleChildren

Gets a boolean indicating whether or not this comment has any replies, which are also visible.

Declaration
public bool HasVisibleChildren { get; }
Property Value
Type Description
System.Boolean

Id

Gets the unique identifier for this comment.

Declaration
public CommentId Id { get; }
Property Value
Type Description
CommentId
Remarks

This identifier is generated automatically by the Episerver Social platform.

IsVisible

Gets a boolean indicating whether or not this comment is intended to be displayed.

Declaration
public virtual bool IsVisible { get; }
Property Value
Type Description
System.Boolean

Parent

Gets a reference uniquely identifying the parent entity for the comment. The parent entity may be a resource within your application, such as content or a product. If this comment is intended to represent a reply to an existing comment, the parent reference should identify that existing parent.

Declaration
public Reference Parent { get; }
Property Value
Type Description
Reference
arrow_upward