public static WfSimulationSettings GetConfig() { WfSimulationSettings result = (WfSimulationSettings)ConfigurationBroker.GetSection("wfSimulationSettings", true); if (result == null) result = new WfSimulationSettings(); return result; }
/// <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); }
public static WfSimulationSettings GetConfig() { WfSimulationSettings result = (WfSimulationSettings)ConfigurationBroker.GetSection("wfSimulationSettings", true); if (result == null) { result = new WfSimulationSettings(); } return(result); }
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)); } }