Class IdentityDefinitionBase
Represents a base class for all identity definition objects.
Inheritance
Inherited Members
Namespace: Nevatech.Vsb.Repository.Services.Identities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
public abstract class IdentityDefinitionBase : IValidator, IExtensibleDataObjectConstructors
IdentityDefinitionBase()
Initializes an empty instance.
Declaration
protected IdentityDefinitionBase()IdentityDefinitionBase(Identity)
Initializes new instance from provided Identity object.
Declaration
protected IdentityDefinitionBase(Identity identity)Parameters
| Type | Name | Description | 
|---|---|---|
| Identity | identity | Identity object used to populate new instance. | 
Properties
Created
Gets this object's created date and time.
Declaration
public DateTime Created { get; protected set; }Property Value
| Type | Description | 
|---|---|
| System.DateTime | 
Description
Gets or sets the identity description.
Declaration
public string Description { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | 
ErrorMessage
Gets the summary of validation errors populated by the call to Validate() method.
Declaration
public string ErrorMessage { get; protected set; }Property Value
| Type | Description | 
|---|---|
| System.String | 
Expired
Gets or sets the UTC date and time when identity expires and can no longer be used. If Null, then identity never expires.
Declaration
public DateTime? Expired { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.DateTime> | 
ExtensionData
Gets or sets System.Runtime.Serialization.ExtensionDataObject that enables serialization round-trips.
Declaration
public ExtensionDataObject ExtensionData { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Runtime.Serialization.ExtensionDataObject | 
FolderId
Gets or sets identifier of folder that identity belongs to.
Declaration
public int? FolderId { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.Int32> | 
FriendlyName
Gets or sets the friendly name describing stored identity.
Declaration
public abstract string FriendlyName { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | 
Id
Gets or sets identity's database identifier.
Declaration
public int Id { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Int32 | 
IsEndpointIdentity
Gets flag indicating that identity can be used to create System.ServiceModel.EndpointIdentity.
Declaration
public virtual bool IsEndpointIdentity { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
IsPublic
Gets or sets flag telling that identity is public and can be shared across multiple endpoints. This property cannot be changed for an existing identity.
Declaration
public bool IsPublic { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
Key
Gets or sets identity's unique identifier.
Declaration
public Guid Key { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Guid | 
Kind
Gets stored identity kind (like X.509 certificate, SPN, etc).
Declaration
public abstract IdentityKind Kind { get; protected set; }Property Value
| Type | Description | 
|---|---|
| IdentityKind | 
Updated
Gets this object's updated date and time.
Declaration
public DateTime? Updated { get; protected set; }Property Value
| Type | Description | 
|---|---|
| System.Nullable<System.DateTime> | 
Methods
Create(Identity)
Returns an instance of specific identity definition populated from provided Identity object.
Declaration
public static IdentityDefinitionBase Create(Identity identity)Parameters
| Type | Name | Description | 
|---|---|---|
| Identity | identity | Identity used to populate specific identity definition. | 
Returns
| Type | Description | 
|---|---|
| IdentityDefinitionBase | Instance of specific identity definition populated from provided Identity object. | 
Create(EndpointIdentity)
Returns an instance of specific service identity definition populated from provided System.ServiceModel.EndpointIdentity object.
Declaration
public static IdentityDefinitionBase Create(EndpointIdentity identity)Parameters
| Type | Name | Description | 
|---|---|---|
| System.ServiceModel.EndpointIdentity | identity | Endpoint identity used to populate specific identity definition. | 
Returns
| Type | Description | 
|---|---|
| IdentityDefinitionBase | Instance of specific service identity definition populated from provided System.ServiceModel.EndpointIdentity object. | 
GetConfiguration()
Returns endpoint <identity/> configuration element corresponding to the identity stored in this instance. This method is applied to service identities only.
Declaration
public virtual string GetConfiguration()Returns
| Type | Description | 
|---|---|
| System.String | Endpoint <identity/> configuration element corresponding to the identity stored in this instance. | 
Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown, if this method is called on the client identity type. | 
GetEndpointIdentity()
Returns System.ServiceModel.EndpointIdentity object populated with the data stored in this instance. This method is applied to service identities only.
Declaration
public virtual EndpointIdentity GetEndpointIdentity()Returns
| Type | Description | 
|---|---|
| System.ServiceModel.EndpointIdentity | System.ServiceModel.EndpointIdentity object populated with the data stored in this instance. | 
Exceptions
| Type | Condition | 
|---|---|
| System.NotSupportedException | Thrown, if this method is called on the client identity type. | 
GetIdentity()
Returns Identity object populated with the data stored in this instance. The returned object can be used to persist identity data to database.
Declaration
public virtual Identity GetIdentity()Returns
| Type | Description | 
|---|---|
| Identity | Identity object populated with the data stored in this instance. | 
IsMatch(IdentityDefinitionBase, IdentityDefinitionBase)
Returns flag indicating that provided instances represent the same entity, i.e. the object's natural keys are the same. This method assumes that both instances are assigned to the same parent object.
Declaration
public static bool IsMatch(IdentityDefinitionBase identity1, IdentityDefinitionBase identity2)Parameters
| Type | Name | Description | 
|---|---|---|
| IdentityDefinitionBase | identity1 | First instance to be compared. | 
| IdentityDefinitionBase | identity2 | Second instance to be compared. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True, if provided instances represent the same entity. False, otherwise. | 
ToString()
Returns the current credentials display name.
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| System.String | The current credentials display name. | 
Overrides
Validate()
Validates this domain object's state.
Declaration
public virtual bool Validate()Returns
| Type | Description | 
|---|---|
| System.Boolean | True if object's state is valid; otherwise, false. | 
Validate(Boolean)
Validates this domain object's state.
Declaration
public bool Validate(bool throwOnError)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | throwOnError | Flag indicating that ValidationException must be thrown, if entity is not valid. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if object's state is valid; otherwise, false. |