Newer
Older
BRServer / BRServer.DALFactory / Alarm.cs
root on 14 Mar 2019 650 bytes version 1.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace BRServer.DALFactory
{
    public class Alarm
    {
        public static BRServer.IDAL.IAlarm Create()
        {
            // Look up the DAL implementation we should be using
            string path = System.Configuration.ConfigurationManager.AppSettings["mysqlDAL"];
            string className = path + ".Alarm";

            // Using the evidence given in the config file load the appropriate assembly and class
            return (BRServer.IDAL.IAlarm)Assembly.Load(path).CreateInstance(className);
        }
    }
}