Class UserReference

A class that encapsulates the identifier that can be used to retrieve a user from a memebrship provider.

Inheritance
System.Object
UserReference
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.Common
Assembly: EPiServer.Social.Common.dll
Version: 1.5.4
Syntax
[Obsolete("This class is deprecated.  Please use Reference.")]
public class UserReference : Reference

Constructors

UserReference()

Returns a newly created and initialized Reference instance.

Declaration
protected UserReference()

UserReference(String)

Returns a newly created and initialized Reference instance.

Declaration
protected UserReference(string id)
Parameters
Type Name Description
System.String id

String representing an identifier to be used as a reference.

Properties

Empty

Gets an instance of a Reference denoting an 'empty' value.

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

Methods

Create(String)

Creates a Reference.

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

String representing an identifier to be used as a reference.

Returns
Type Description
UserReference

The created Reference object.

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

Overrides

GetHashCode()

Returns the hash code of the underlying reference identifier of this instance.

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

A 32-bit signed integer hash code.

Overrides

IsNullOrEmpty(UserReference)

Returns true if the specified user reference is null or represents an empty UserReference, false otherwise.

Declaration
public static bool IsNullOrEmpty(UserReference userReference)
Parameters
Type Name Description
UserReference userReference

UserReference instance to verify

Returns
Type Description
System.Boolean

True if the reference is null or empty, false otherwise

Operators

Equality(UserReference, UserReference)

Overloads the equality operator on the Reference class.

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

The operand on the left side of the equality operator.

UserReference b

The operand on the right side of the equality operator.

Returns
Type Description
System.Boolean

Returns true if the both objects are null or the same instance or have the same value of the underlying reference identifier. Returns false if either object is null or both objects have different values of the underlying reference identifier.

Inequality(UserReference, UserReference)

Overloads the inequality operator on the Reference class.

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

The operand on the left side of the inequality operator.

UserReference b

The operand on the right side of the inequality operator.

Returns
Type Description
System.Boolean

Returns true if either object is null or both objects have different values of the underlying reference identifier. Returns false if the both objects are null or the same instance or have the same value of the underlying reference identifier.

arrow_upward