Class StatisticsId

The StatisticsId class is a data model representing an identifier for the statistics generated for when ratings are submitted by users within the social platform.

Inheritance
System.Object
StatisticsId
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 StatisticsId : Identifier

Constructors

StatisticsId(String)

Constructor

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

String-based identifier for a rating statistics generated by the Social platform.

Properties

Empty

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

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

Methods

Create()

Creates an empty StatisticsId.

Declaration
public static StatisticsId Create()
Returns
Type Description
StatisticsId

Empty StatisticsId instance

Create(String)

Parses a Statistics ID from a string-based identifier.

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

Identifer for the rating statistics

Returns
Type Description
StatisticsId

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

Overrides

GetHashCode()

Returns a hash code representative of this StatisticsId.

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

A 32-bit signed integer hash code.

Overrides

IsNullOrEmpty(StatisticsId)

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

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

User-submitted rating identifier to evaluate

Returns
Type Description
System.Boolean

True if the StatisticsId is null or empty, false otherwise

Operators

Equality(StatisticsId, StatisticsId)

Evaluates the equality of two StatisticsId instances.

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

The operand on the left side of the equality operator.

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

Evaluates two StatisticsId instances for inequality.

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

The operand on the left side of the inequality operator.

StatisticsId 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