Ejemplo n.º 1
0
        public static BaseDbActionService CreateNewDbAction(ConnectInfo connectInfo)
        {
            if (db == null)
            {
                lock (lockeObject) {
                    if (db == null)
                    {
                        db = new DbAction();
                    }
                }
            }
            BaseDbActionService service = db.GetDbConnection(connectInfo);

            return(service);
        }
Ejemplo n.º 2
0
        public static unsafe SqlDataBaseService.sqlAction.BaseDbActionService CreateNewDbAction(SqlDataBaseService.ConnectInfo connectInfo)
        {
            bool flag;

            SqlDataBaseService.DbAction action;
            bool flag2;
            bool flag3;

            SqlDataBaseService.sqlAction.BaseDbActionService service;
            if ((db == null) == null)
            {
                goto Label_0047;
            }
            action = lockeObject;
            flag2  = 0;
Label_0016:
            try
            {
                Monitor.Enter(action, &flag2);
                if ((db == null) == null)
                {
                    goto Label_0038;
                }
                db = new SqlDataBaseService.DbAction();
Label_0038:
                goto Label_0046;
            }
            finally
            {
Label_003B:
                if (flag2 == null)
                {
                    goto Label_0045;
                }
                Monitor.Exit(action);
                Label_0045 :;
            }
            Label_0046 :;
Label_0047:
            service = db.GetDbConnection(connectInfo);
Label_0056:
            return(service);
        }