|
@@ -2356,18 +2356,18 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private class StepInfo
|
|
|
- {
|
|
|
- public StepInfo(int stepNo, Step step)
|
|
|
- {
|
|
|
- StepNo = StepNo;
|
|
|
- Step = step;
|
|
|
- }
|
|
|
- public int StepNo { get; }
|
|
|
- public Step Step { get; }
|
|
|
- }
|
|
|
-
|
|
|
- private readonly ConcurrentDictionary<int, StepInfo> _StepCache = new ConcurrentDictionary<int, StepInfo>();
|
|
|
+ //private class StepInfo
|
|
|
+ //{
|
|
|
+ // public StepInfo(int stepNo, Step step)
|
|
|
+ // {
|
|
|
+ // StepNo = StepNo;
|
|
|
+ // Step = step;
|
|
|
+ // }
|
|
|
+ // public int StepNo { get; }
|
|
|
+ // public Step Step { get; }
|
|
|
+ //}
|
|
|
+
|
|
|
+ private readonly ConcurrentDictionary<int, Step> _StepCache = new ConcurrentDictionary<int, Step>();
|
|
|
|
|
|
private void FastLoadSteps(XmlNodeList steps)
|
|
|
{
|
|
@@ -2386,17 +2386,16 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
|
|
|
|
Parallel.For(1, steps.Count, index =>
|
|
|
{
|
|
|
- Step tempStep = CreateStep(step, steps.Item(index));
|
|
|
- _StepCache[index] = new StepInfo(tempStep.StepNo, tempStep);
|
|
|
+ _StepCache[index] = CreateStep(step, steps.Item(index));
|
|
|
});
|
|
|
|
|
|
for (int i = 1; i <= _StepCache.Count; i++)
|
|
|
{
|
|
|
- if (!_StepCache.TryGetValue(i, out StepInfo stepInfo) || stepInfo is null)
|
|
|
+ if (!_StepCache.TryGetValue(i, out Step step_c) || step_c is null)
|
|
|
continue;
|
|
|
|
|
|
- StepNos.Add(stepInfo.StepNo);
|
|
|
- Steps.Add(stepInfo.Step);
|
|
|
+ StepNos.Add(step_c.StepNo);
|
|
|
+ Steps.Add(step_c);
|
|
|
}
|
|
|
|
|
|
//if (steps.Count != 0)
|