Class RatingId

The RatingId class is a data model representing an identifier for an user-submitted rating within the social platform.

Inheritance
System.Object
RatingId
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Ratings.Core
Assembly: EPiServer.Social.Ratings.Core.dll
Version: 1.5.4
Syntax
public class RatingId : Identifier

Constructors

RatingId(String)

Constructor

Declaration
public RatingId(string id)
Parameters
Type Name Description
System.String id

String-based identifier for an user-submitted rating

Properties

Empty

Returns a newly created RatingId instance representing an 'empty' RatingId.

Declaration
public static RatingId Empty { get; }
Property Value
Type Description
RatingId

Methods

Create()

Creates an empty RatingId.

Declaration
public static RatingId Create()
Returns
Type Description
RatingId

Empty RatingId instance

Create(String)

Parses a rating ID from a string-based identifier.

Declaration
public static RatingId Create(string id)
Parameters
Type Name Description
System.String id

Identifer for the user-submitted rating

Returns
Type Description
RatingId

Instance of RatingId 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 RatingId have the same value of the underlying rating identifier, else returns false.

Overrides

GetHashCode()

Returns a hash code representative of this RatingId.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A 32-bit signed integer hash code.

Overrides

IsNullOrEmpty(RatingId)

Returns true if the specified RatingId has not been initialized or represents an empty user-submitted rating identifier, false otherwise.

Declaration
public static bool IsNullOrEmpty(RatingId id)
Parameters
Type Name Description
RatingId id

User-submitted rating identifier to evaluate

Returns
Type Description
System.Boolean

True if the RatingId is null or empty, false otherwise

Operators

Equality(RatingId, RatingId)

Evaluates the equality of two RatingId instances.

Declaration
public static bool operator ==(RatingId a, RatingId b)
Parameters
Type Name Description
RatingId a

The operand on the left side of the equality operator.

RatingId 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(RatingId, RatingId)

Evaluates two RatingId instances for inequality.

Declaration
public static bool operator !=(RatingId a, RatingId b)
Parameters
Type Name Description
RatingId a

The operand on the left side of the inequality operator.

RatingId 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.

arrow_upward