/// <summary>
        /// 得到模拟的连接名,如果Enabled则使用模拟的连接名称
        /// </summary>
        /// <param name="origianlConnectionName">如果不仿真,使用原来的连接串</param>
        /// <returns></returns>
        public string GetConnectionName(string origianlConnectionName)
        {
            string result = origianlConnectionName;

            if (WfRuntime.ProcessContext.EnableSimulation && WfSimulationSettings.GetConfig().ConnectionName.IsNotEmpty())
            {
                result = WfSimulationSettings.GetConfig().ConnectionName;
            }

            return(result);
        }
示例#2
0
        internal static void WriteSimulationInfo(IWfProcess process, WfSimulationOperationType operationType)
        {
            if (WfRuntime.ProcessContext.EnableSimulation)
            {
                if (operationType == WfSimulationOperationType.MoveTo)
                {
                    WfRuntime.ProcessContext.SimulationContext.MoveToCount++;
                }

                WfSimulationSettings.GetConfig().Writers.ForEach(writer => writer.Write(process, operationType, WfRuntime.ProcessContext.SimulationContext));
            }
        }