//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── public void ForEach_Children(DELEGATE_E_DefFnc_Children dlgt1) { bool bBreak = false; bool bRemove = false; // 読取り順は予想できない。 foreach (KeyValuePair <string, Expression_Node_Function> kvP in this.dictionary_Item) { dlgt1(kvP.Key, kvP.Value, ref bRemove, ref bBreak); if (bRemove) { this.dictionary_Item.Remove(kvP.Key); bRemove = false; } if (bBreak) { break; } } }
//──────────────────────────────────────── public void ForEach_Children(DELEGATE_E_DefFnc_Children dlgt1) { bool bBreak = false; bool bRemove = false; // 読取り順は予想できない。 foreach (KeyValuePair<string, Expression_Node_Function> kvP in this.dictionary_Item) { dlgt1(kvP.Key, kvP.Value, ref bRemove, ref bBreak); if (bRemove) { this.dictionary_Item.Remove(kvP.Key); bRemove = false; } if (bBreak) { break; } } }