Share via


DomainIdentifier Class

Definition

Represents a unique domain identifier.

public class DomainIdentifier
type DomainIdentifier = class
Public Class DomainIdentifier
Inheritance
DomainIdentifier

Remarks

The domain identifier has three components:

  • Service identifier - Unique identifier of the service to which the domain belongs.
  • Account identifier - Unique identifier of the account within the service.
  • Revision - Identifies the version of the domain to which this identifier refers. A revision's value is the time stamp of when it was created and is represented by the number of seconds since midnight January 1, 1970, in universal coordinated time. Valid revision values are between 1 and 0xFFFFFFFF (inclusive).

When a client makes a request to join the domain, the service uses this class to create a domain identifier for the client and passes it to the DomainCertificateBuilder to build a valid domain certificate. The service also passes it along with other information to the JoinDomainResponse object so the server returns a valid response to the client. See the DomainMembership.cs sample for an example of a domain join implementation that utilizes this class. During license acquisition, this class can also be used to store the relevant domain identifier data for the client parsed from the challenge. The service's domain identifier data can subsequently be stored in another instance of this class and then used to verify that the client's domain identifier is valid with the service.

Constructors

DomainIdentifier()

Initializes a new instance of the DomainIdentifier class.

DomainIdentifier(Guid)

Initializes a new instance of the DomainIdentifier class with the given service identifier. An account identifier is randomly generated and the revision is set to CurrentRevision.

DomainIdentifier(Guid, Guid)

Initializes a new instance of the DomainIdentifier class with the given service identifier and account identifier. The revision is set to CurrentRevision.

DomainIdentifier(Guid, Guid, DateTime)

Initializes a new instance of the DomainIdentifier class with the given service identifier, account identifier, and revision represented as a time stamp.

DomainIdentifier(Guid, Guid, Int64)

Initializes a new instance of the DomainIdentifier class with the given service identifier, account identifier, and revision represented as a long.

Fields

MaxRevision

The maximum allowed revision value. Equals 0xFFFFFFFF.

MinRevision

The minimum allowed revision value. Equals zero.

Properties

AccountId

Gets or sets the unique identifier of the account within the service.

CurrentRevision

Returns tevision based on the current date and time. The returned revision represents the number of seconds since midnight Jan 1, 1970 in Universal Coordinated Time.

IsEmpty

Gets whether this domain identifier is empty or not.

Revision

Gets or sets the version of the domain to which this identifier refers.

ServiceId

Gets or sets the unique identifier of the service to which the domain belongs.

Methods

GetRevision(DateTime)

Converts the given DateTime value to a revision. The returned revision represents the number of seconds since midnight Jan 1, 1970 in Universal Coordinated Time.

GetTimestamp(Int64)

Converts the given revision value to a DateTime. The given revision represents the number of seconds since midnight Jan 1, 1970 in Universal Coordinated Time.

Applies to