private void SaveBlocks(IEnumerable <MyWorkingNode> nodeList) { MyMemoryBlockSerializer serializer = new MyMemoryBlockSerializer(); var isFirst = true; foreach (MyWorkingNode node in nodeList) { if (SaveAllNodesData || node.SaveOnStop) { foreach (MyAbstractMemoryBlock mb in MyMemoryManager.Instance.GetBlocks(node)) { if (mb.Persistable) { if (isFirst) { MyLog.INFO.WriteLine("Saving state to: " + MyMemoryBlockSerializer.GetTempStorage(m_project)); } isFirst = false; serializer.SaveBlock(mb); } } } } }
private void SaveBlocks(List <MyWorkingNode> nodeList) { MyMemoryBlockSerializer serializer = new MyMemoryBlockSerializer(); for (int j = 0; j < nodeList.Count; j++) { MyWorkingNode node = nodeList[j]; if (SaveAllNodesData || node.SaveOnStop) { foreach (MyAbstractMemoryBlock mb in MyMemoryManager.Instance.GetBlocks(node)) { if (mb.Persistable) { serializer.SaveBlock(mb); } } } } }