示例#1
0
        public static SystemMediator GetInstance()
        {
            if (_instance == null)
            {
                _instance = new SystemMediator();
            }

            return(_instance);
        }
示例#2
0
 public ADOSystem(SystemMediator systemMediator) : base(systemMediator)
 {
     dbConnections = new Dictionary <string, IDbConnection>();
 }
示例#3
0
        /// <summary>
        /// 仓库存储系统
        /// </summary>
        /// <param name="systemMediator">系统模块中间层</param>
        public StorageSystem(SystemMediator systemMediator) : base(systemMediator)
        {
            #region 实例化BL委托存储

            noParamsFuncExecuteNonModel    = new Dictionary <string, Func <ExecuteNonModel> >();
            oneParamsFuncExecuteNonModel   = new Dictionary <string, Func <string, ExecuteNonModel> >();
            twoParamsFuncExecuteNonModel   = new Dictionary <string, Func <string, string, ExecuteNonModel> >();
            threeParamsFuncExecuteNonModel = new Dictionary <string, Func <string, string, string, ExecuteNonModel> >();
            fourParamsFuncExecuteNonModel  = new Dictionary <string, Func <string, string, string, string, ExecuteNonModel> >();
            fiveParamsFuncExecuteNonModel  = new Dictionary <string, Func <string, string, string, string, string, ExecuteNonModel> >();
            sixParamsFuncExecuteNonModel   = new Dictionary <string, Func <string, string, string, string, string, string, ExecuteNonModel> >();
            sevenParamsFuncExecuteNonModel = new Dictionary <string, Func <string, string, string, string, string, string, string, ExecuteNonModel> >();
            eightParamsFuncExecuteNonModel = new Dictionary <string, Func <string, string, string, string, string, string, string, string, ExecuteNonModel> >();
            nineParamsFuncExecuteNonModel  = new Dictionary <string, Func <string, string, string, string, string, string, string, string, string, ExecuteNonModel> >();
            tenParamsFuncExecuteNonModel   = new Dictionary <string, Func <string, string, string, string, string, string, string, string, string, string, ExecuteNonModel> >();

            #endregion

            #region 实例化DT委托存储

            noParamsFuncDT    = new Dictionary <string, Func <DataTable> >();
            oneParamsFuncDT   = new Dictionary <string, Func <string, DataTable> >();
            twoParamsFuncDT   = new Dictionary <string, Func <string, string, DataTable> >();
            threeParamsFuncDT = new Dictionary <string, Func <string, string, string, DataTable> >();
            fourParamsFuncDT  = new Dictionary <string, Func <string, string, string, string, DataTable> >();
            fiveParamsFuncDT  = new Dictionary <string, Func <string, string, string, string, string, DataTable> >();
            sixParamsFuncDT   = new Dictionary <string, Func <string, string, string, string, string, string, DataTable> >();
            sevenParamsFuncDT = new Dictionary <string, Func <string, string, string, string, string, string, string, DataTable> >();
            eightParamsFuncDT = new Dictionary <string, Func <string, string, string, string, string, string, string, string, DataTable> >();
            nineParamsFuncDT  = new Dictionary <string, Func <string, string, string, string, string, string, string, string, string, DataTable> >();
            tenParamsFuncDT   = new Dictionary <string, Func <string, string, string, string, string, string, string, string, string, string, DataTable> >();

            #endregion

            #region 实例化锁

            #region DT锁

            noParams_DT    = new object();
            oneParams_DT   = new object();
            twoParams_DT   = new object();
            threeParams_DT = new object();
            fourParams_DT  = new object();
            fiveParams_DT  = new object();
            sixParams_DT   = new object();
            sevenParams_DT = new object();
            eightParams_DT = new object();
            nineParams_DT  = new object();
            tenParams_DT   = new object();

            #endregion

            #region BL锁

            noParams_BL    = new object();
            oneParams_BL   = new object();
            twoParams_BL   = new object();
            threeParams_BL = new object();
            fourParams_BL  = new object();
            fiveParams_BL  = new object();
            sixParams_BL   = new object();
            sevenParams_BL = new object();
            eightParams_BL = new object();
            nineParams_BL  = new object();
            tenParams_BL   = new object();

            #endregion

            #endregion
        }