C# Class Azavea.Open.DAO.Memory.MemoryDescriptor

Describes a connection to "memory". This is mostly intended as a test implementation, the data source is just a structure in memory, but it is possible this will have some practical applications as well. Two connections using the same uid will hit the same in-memory collection of objects.
Inheritance: ConnectionDescriptor
Afficher le fichier Open project: azavea/net-dao

Méthodes publiques

Свойство Type Description
Uid string

Méthodes publiques

Méthode Description
CreateDataAccessLayer ( ) : IDaLayer

Returns the appropriate data access layer for this connection.

MemoryDescriptor ( Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate ) : Azavea.Open.Common

Populates the descriptor's values from a config file.

MemoryDescriptor ( string uid ) : Azavea.Open.Common

Instantiate an in-memory datastore connection.

ToCleanString ( ) : string

This method is similar to ToString, except it will not contain any "sensitive" information, I.E. passwords. This method is intended to be used for logging or error handling, where we do not want to display passwords to (potentially) just anyone, but we do want to indicate what DB connection we were using.

ToCompleteString ( ) : string

Since we often need to represent database connection info as strings, child classes must implement ToCompleteString() such that this.Equals(that) and this.ToCompleteString().Equals(that.ToCompleteString()) will behave the same.

Method Details

CreateDataAccessLayer() public méthode

Returns the appropriate data access layer for this connection.
public CreateDataAccessLayer ( ) : IDaLayer
Résultat IDaLayer

MemoryDescriptor() public méthode

Populates the descriptor's values from a config file.
public MemoryDescriptor ( Config config, string component, ConnectionInfoDecryptionDelegate decryptionDelegate ) : Azavea.Open.Common
config Azavea.Open.Common.Config Config to get params from.
component string Section of the config XML to look in for db params.
decryptionDelegate ConnectionInfoDecryptionDelegate Delegate to call to decrypt password fields. /// May be null if passwords are in plain text.
Résultat Azavea.Open.Common

MemoryDescriptor() public méthode

Instantiate an in-memory datastore connection.
public MemoryDescriptor ( string uid ) : Azavea.Open.Common
uid string The ID of the in-memory store this descriptor connects to.
Résultat Azavea.Open.Common

ToCleanString() public méthode

This method is similar to ToString, except it will not contain any "sensitive" information, I.E. passwords. This method is intended to be used for logging or error handling, where we do not want to display passwords to (potentially) just anyone, but we do want to indicate what DB connection we were using.
public ToCleanString ( ) : string
Résultat string

ToCompleteString() public méthode

Since we often need to represent database connection info as strings, child classes must implement ToCompleteString() such that this.Equals(that) and this.ToCompleteString().Equals(that.ToCompleteString()) will behave the same.
public ToCompleteString ( ) : string
Résultat string

Property Details

Uid public_oe property

The ID of the in-memory store this descriptor connects to.
public string Uid
Résultat string