36 lines
990 B
C#
36 lines
990 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using TrackerLibrary.DataAccess;
|
|
using System.Configuration;
|
|
|
|
namespace TrackerLibrary
|
|
{
|
|
public static class GlobalConfig
|
|
{
|
|
public static List<IDataConnection> Connections { get; private set; } = new List<IDataConnection>();
|
|
public static void InitializeConnections(bool database, bool textFiles)
|
|
{
|
|
if (database)
|
|
{
|
|
// TODO - Set up the sql connector properly !
|
|
SqlConnector sql = new SqlConnector();
|
|
Connections.Add(sql);
|
|
}
|
|
|
|
if (textFiles)
|
|
{
|
|
// TODO - Create the text Connection
|
|
TextConnector text = new TextConnector();
|
|
Connections.Add(text);
|
|
}
|
|
|
|
}
|
|
|
|
public static string CnnString(string name)
|
|
{
|
|
return ConfigurationManager.ConnectionStrings[name].ConnectionString;
|
|
}
|
|
}
|
|
}
|