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
Datei anzeigen Open project: azavea/net-dao

Public Properties

Property Type Description
Uid string

Public Methods

Method 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 method

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

MemoryDescriptor() public method

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.
return Azavea.Open.Common

MemoryDescriptor() public method

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.
return Azavea.Open.Common

ToCleanString() public method

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
return string

ToCompleteString() public method

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
return string

Property Details

Uid public_oe property

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