Browse Source

Modify

git-svn-id: http://10.4.3.168:50001/svn/Furnace@127 dbcde07d-dcf5-c148-8a84-ac3097b7778e
Taizixuan 1 month ago
parent
commit
3a4b77133f
1 changed files with 16 additions and 17 deletions
  1. 16 17
      FrameworkLocal/UIClient/CenterViews/Editors/Recipe/RecipeDataBase.cs

+ 16 - 17
FrameworkLocal/UIClient/CenterViews/Editors/Recipe/RecipeDataBase.cs

@@ -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)