49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Sarand.Net.Standard.Dbas.Base
|
|
{
|
|
//=======================================================================
|
|
public class SaDbDfnConnection
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Definitions.
|
|
public enum ConnectionType
|
|
{
|
|
DSN,
|
|
ConnectionString,
|
|
StaticSchema
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
|
|
//-------------------------------------------------------------------
|
|
// Construction.
|
|
public SaDbDfnConnection (ConnectionType type, String databaseConnection)
|
|
{
|
|
Type = type;
|
|
if (Type == ConnectionType.DSN)
|
|
DataSourceName = databaseConnection;
|
|
else if (Type == ConnectionType.DSN)
|
|
ConnectionString = databaseConnection;
|
|
else if (Type == ConnectionType.DSN)
|
|
StaticSchemaFilePath = databaseConnection;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Properties.
|
|
public ConnectionType Type { get; }
|
|
public String DataSourceName { get; }
|
|
public String DataSourceDriver { get; set; }
|
|
public String ConnectionString { get; }
|
|
public String StaticSchemaFilePath { get; }
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|