public void Init(Pump pump, IEnumerable <ExtractItem> extractItems, String rootSavePath, DefaultMultiTaskReporter asyn) { DataPump = pump.GetDataPump(); Context = DataPump.CreateContext(pump, rootSavePath, null, null, asyn); }
/// <summary> /// 设置上下文的自定义数据。 /// </summary> /// <param name="context">上下文。</param> /// <param name="name">数据名称。</param> /// <param name="value">数据值。</param> public static void SetContextData(this DataPumpExecutionContext context, String name, Object value) { context[name] = value; }
/// <summary> /// 初始化执行上下文。 /// </summary> /// <param name="context">执行上下文。</param> /// <returns>成功返回true;否则返回false。</returns> protected virtual Boolean InitExecutionContext(DataPumpExecutionContext context) { return(true); }
/// <summary> /// 获取上下文的自定义数据。 /// </summary> /// <param name="context"上下文。</param> /// <param name="name">数据名称。</param> /// <returns>数据值。</returns> public static Object GetContextData(this DataPumpExecutionContext context, String name) { return(context[name]); }
/// <summary> /// 使用特定的执行上下文执行服务。 /// </summary> /// <param name="context">执行上下文。</param> protected abstract void ExecuteCore(DataPumpExecutionContext context);