November Happy Hour will be moved to Thursday December 5th.

Class Identity

Represents the identity of an item stored in the Dynamic Data Store

Inheritance
System.Object
Identity
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data
Assembly: EPiServer.Data.dll
Version: 9.12.2
Syntax
public class Identity

Constructors

Identity()

Declaration
protected Identity()

Identity(Guid)

Declaration
protected Identity(Guid externalId)
Parameters
Type Name Description
System.Guid externalId

Identity(Guid, Int64, String)

Declaration
protected Identity(Guid externalId, long storeId, string storeName)
Parameters
Type Name Description
System.Guid externalId
System.Int64 storeId
System.String storeName

Identity(String)

Declaration
protected Identity(string value)
Parameters
Type Name Description
System.String value

Properties

ExternalId

The external part of the identity

Declaration
public Guid ExternalId { get; }
Property Value
Type Description
System.Guid

StoreId

The store part of the identity

Declaration
public long StoreId { get; }
Property Value
Type Description
System.Int64

Methods

Copy()

Declaration
public Identity Copy()
Returns
Type Description
Identity

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.Object.Equals(System.Object)

GetHashCode()

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

NewIdentity()

Creates a new instance of Identity

Declaration
public static Identity NewIdentity()
Returns
Type Description
Identity

A Identity

NewIdentity(Guid)

Creates a new instance of a Identity using the externalId

Declaration
public static Identity NewIdentity(Guid externalId)
Parameters
Type Name Description
System.Guid externalId

The value to use for the ExternalId

Returns
Type Description
Identity

A Identity

Parse(String)

Parses the string and tries to create a new instance of a Identity

Declaration
public static Identity Parse(string value)
Parameters
Type Name Description
System.String value

The System.String

Returns
Type Description
Identity

A Identity

Exceptions
Type Condition
System.FormatException

Thrown when the format of value is incorrect

ToString()

Converts the objects to it's string representation. The string returned can be passed back to the Parse(String) method to reconstruct the object

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String

Overrides
System.Object.ToString()

TryParse(String, out Identity)

Parses the string and tries to create a new instance of a Identity

Declaration
public static bool TryParse(string value, out Identity id)
Parameters
Type Name Description
System.String value

The System.String

Identity id

The new Identity or null os the format of value is incorrect

Returns
Type Description
System.Boolean true if a new Identity instance has been created, otherwise false

Operators

Equality(Identity, Identity)

Declaration
public static bool operator ==(Identity obj1, Identity obj2)
Parameters
Type Name Description
Identity obj1
Identity obj2
Returns
Type Description
System.Boolean

Implicit(Guid to Identity)

System.Guid to Identity implicit operator. This does the same as calling the NewIdentity(Guid) method with an external id.

Declaration
public static implicit operator Identity(Guid externalId)
Parameters
Type Name Description
System.Guid externalId

The value to use for the ExternalId

Returns
Type Description
Identity

A Identity

Inequality(Identity, Identity)

Declaration
public static bool operator !=(Identity obj1, Identity obj2)
Parameters
Type Name Description
Identity obj1
Identity obj2
Returns
Type Description
System.Boolean

Extension Methods