Class Rating
Represents a rating submitted by a user for a target resource in an application.
Inheritance
Inherited Members
Namespace: EPiServer.Social.Ratings.Core
Assembly: EPiServer.Social.Ratings.Core.dll
Version: 1.5.4Syntax
public class Rating
Constructors
Rating(Reference, Reference, RatingValue)
Constructs and returns an initialized Rating instance.
Declaration
public Rating(Reference rater, Reference target, RatingValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | rater | A user reference to the user who rated the target resource. |
| Reference | target | A reference to the target resource the rating applies to. |
| RatingValue | value | The user rating value encapsulated in a rating instance. |
Rating(Reference, Reference, RatingValue, DateTime, DateTime)
Constructs and returns an initialized Rating instance.
Declaration
public Rating(Reference rater, Reference target, RatingValue value, DateTime created, DateTime modified)
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | rater | A user reference to the user who rated the target. |
| Reference | target | A reference to the target resource the rating applies to. |
| RatingValue | value | The user rating value encapsulated in a RatingValue instance. |
| System.DateTime | created | The date/time when the rating was created. |
| System.DateTime | modified | The date/time when the rating was modified. |
Rating(RatingId, Reference, Reference, RatingValue)
Constructs and returns an initialized Rating instance.
Declaration
public Rating(RatingId id, Reference rater, Reference target, RatingValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| RatingId | id | The identifier for the user-submitted rating. |
| Reference | rater | A user reference to the user who rated the target resource. |
| Reference | target | A reference to the target resource the rating applies to. |
| RatingValue | value | The user rating value encapsulated in a rating instance. |
Rating(RatingId, Reference, Reference, RatingValue, DateTime, DateTime)
Constructs and returns an initialized Rating instance.
Declaration
public Rating(RatingId id, Reference rater, Reference target, RatingValue value, DateTime created, DateTime modified)
Parameters
| Type | Name | Description |
|---|---|---|
| RatingId | id | The identifier for the user-submitted rating. |
| Reference | rater | A user reference to the user who rated the target resource. |
| Reference | target | A reference to the target resource the rating applies to. |
| RatingValue | value | The user rating value encapsulated in a RatingValue instance. |
| System.DateTime | created | The date and time when the rating was submitted. |
| System.DateTime | modified | The date and time when the rating was updated. |
Properties
Created
Gets the date/time when the rating was created.
Declaration
public DateTime Created { get; }
Property Value
| Type | Description |
|---|---|
| System.DateTime |
Id
Gets the unique identifier for this user-submitted rating.
Declaration
public RatingId Id { get; }
Property Value
| Type | Description |
|---|---|
| RatingId |
Modified
Gets the date/time when the rating was last modified.
Declaration
public DateTime Modified { get; }
Property Value
| Type | Description |
|---|---|
| System.DateTime |
Rater
Gets the rater user reference the rating applies to.
Declaration
public Reference Rater { get; }
Property Value
| Type | Description |
|---|---|
| Reference |
Target
Gets a target reference the rating applies to.
Declaration
public Reference Target { get; }
Property Value
| Type | Description |
|---|---|
| Reference |
Value
Gets the rating value.
Declaration
public RatingValue Value { get; }
Property Value
| Type | Description |
|---|---|
| RatingValue |