示例#1
0
 /// <summary>
 /// 复制条件
 /// </summary>
 /// <param name="queue">队列</param>
 internal void Copy(Queue queue)
 {
     ID = queue.ID;
     Context = queue.Context;
     _expBuilder = queue.ExpBuilder;
     queue.Dispose();
 }
示例#2
0
 internal Queue(InternalContext context, EntityDataMap map)
 {
     ID = Guid.NewGuid();
     Context = context;
     Map = map;
     CreateAt = DateTime.Now;
 }
示例#3
0
        /// <summary>
        /// 初始化数据库环境(共享自其它上下文)、实例化子类中,所有Set属性
        /// </summary>
        /// <param name="currentContextType">外部上下文类型</param>
        /// <param name="masterContext">其它上下文(主上下文)</param>
        public InternalContext(Type currentContextType, InternalContext masterContext)
        {
            this.ContextType = currentContextType;
            this._contextConnection = masterContext._contextConnection;

            // 上下文映射关系
            ContextMap = new ContextDataMap(ContextType);
            // 手动编写SQL
            ManualSql = masterContext.ManualSql;
            // 默认SQL执行者
            Executeor = masterContext.Executeor;
            // 数据库提供者
            DbProvider = masterContext.DbProvider;
            // 队列管理者
            QueueManger = masterContext.QueueManger;

            IsInitializer = true;
        }