//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ using System; namespace System.IdentityModel.Metadata { /// /// Describes the entity id. /// public class EntityId { const int MaximumLength = 1024; string _id; /// /// The empty constructor. /// public EntityId() : this(null) { } /// /// Constructs an entity id with the id. /// /// The id for this instance. public EntityId(string id) { _id = id; } /// /// Gets or sets the id. /// /// If length of the id is larger than the maximum length. public string Id { get { return _id; } set { if (value != null) { if (value.ToString().Length > MaximumLength) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("value", SR.GetString(SR.ID3199)); } } _id = value; } } } }