Class RoleId

The RoleId class is a data model representing an identifier for a Role within the social platform.

Inheritance
System.Object
RoleId
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.Groups.Core
Assembly: EPiServer.Social.Groups.Core.dll
Version: 1.5.4
Syntax
public class RoleId : Identifier

Constructors

RoleId(String)

Constructor

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

String-based identifier for a role

Properties

Empty

Returns a newly created RoleId instance representing an 'empty' role ID.

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

Methods

Create()

Creates an empty RoleId.

Declaration
public static RoleId Create()
Returns
Type Description
RoleId

Empty RoleId instance

Create(String)

Parses a role ID from a string-based identifier.

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

Identifer for the role

Returns
Type Description
RoleId

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

Overrides

GetHashCode()

Returns a hash code representative of this RoleId.

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

A 32-bit signed integer hash code.

Overrides

IsNullOrEmpty(RoleId)

Returns true if the specified RoleId has not been initialized or represents an empty role identifier, false otherwise.

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

Role identifier to evaluate

Returns
Type Description
System.Boolean

True if the RoleId is null or empty, false otherwise

Operators

Equality(RoleId, RoleId)

Evaluates the equality of two RoleId instances.

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

The operand on the left side of the equality operator.

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

Evaluates two RoleId instances for inequality.

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

The operand on the left side of the inequality operator.

RoleId 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