コード例 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            TcpChannel channel = new TcpChannel();

            ChannelServices.RegisterChannel(channel, false);
            dbHelpFactory = (IDBHelpFactory)Activator.GetObject(typeof(IDBHelpFactory), "tcp://192.168.11.82:8085/DBService");
            DALBus        = (IDALBus)Activator.GetObject(typeof(IDALBus), "tcp://192.168.11.82:8085/DALServer");
        }
コード例 #2
0
        public static IDALBus GetBusDA()
        {
            IDALBus d = null;

            if (String.IsNullOrEmpty(dataAccessStringType))
            {
                throw (new NullReferenceException("DataAccessType in Web.config is null or empty"));
            }
            else
            {
                if (dataAccessStringType.Equals("SQLSERVER"))
                {
                    Type t = Type.GetType("DAL.DALBus");
                    d = (DALBus)Activator.CreateInstance(t);
                }
            }
            return(d);
        }