private void FilterCollection(MiningAttributeCollection parentCollection, MiningFeatureSelection filter) { MiningAttributeCollection.Enumerator enumerator = parentCollection.GetEnumerator(); while (enumerator.MoveNext()) { MiningAttribute current = enumerator.Current; bool flag = false; switch (filter) { case MiningFeatureSelection.All: flag = true; break; case MiningFeatureSelection.NotSelected: flag = (current.FeatureSelection == MiningFeatureSelection.NotSelected); break; case MiningFeatureSelection.Selected: flag = (current.FeatureSelection == MiningFeatureSelection.Input || current.FeatureSelection == MiningFeatureSelection.Output || current.FeatureSelection == MiningFeatureSelection.InputAndOutput); break; case (MiningFeatureSelection)3: case (MiningFeatureSelection)5: case (MiningFeatureSelection)6: case (MiningFeatureSelection)7: break; case MiningFeatureSelection.Input: flag = (current.FeatureSelection == MiningFeatureSelection.Input); break; case MiningFeatureSelection.Output: flag = (current.FeatureSelection == MiningFeatureSelection.Output); break; default: if (filter == MiningFeatureSelection.InputAndOutput) { flag = (current.FeatureSelection == MiningFeatureSelection.InputAndOutput); } break; } if (flag) { this.arAttributesInternal.Add(current); } } }
internal Enumerator(MiningAttributeCollection miningModelAttributes) { this.currentIndex = -1; this.attributes = miningModelAttributes; }