private void PopulateCollection(MiningModel parentModel)
        {
            this.hashAttrIDs = new Hashtable();
            AdomdCommand adomdCommand = new AdomdCommand();

            adomdCommand.Connection = parentModel.ParentConnection;
            int num = 0;

            MiningModelColumnCollection.Enumerator enumerator = parentModel.Columns.GetEnumerator();
            while (enumerator.MoveNext())
            {
                MiningModelColumn current = enumerator.Current;
                if (current.IsTable)
                {
                    MiningModelColumnCollection.Enumerator enumerator2 = current.Columns.GetEnumerator();
                    while (enumerator2.MoveNext())
                    {
                        MiningModelColumn arg_54_0 = enumerator2.Current;
                        num++;
                    }
                }
            }
            adomdCommand.CommandText = string.Format(CultureInfo.InvariantCulture, MiningAttributeCollection.attribQueryStmt, new object[]
            {
                parentModel.Name
            });
            AdomdDataReader adomdDataReader = adomdCommand.ExecuteReader(CommandBehavior.SequentialAccess);

            while (adomdDataReader.Read())
            {
                int             @int            = adomdDataReader.GetInt32(MiningAttributeCollection.attIdIndex);
                string          @string         = adomdDataReader.GetString(MiningAttributeCollection.nameIndex);
                string          string2         = adomdDataReader.GetString(MiningAttributeCollection.shortNameIndex);
                bool            boolean         = adomdDataReader.GetBoolean(MiningAttributeCollection.isInputIndex);
                bool            boolean2        = adomdDataReader.GetBoolean(MiningAttributeCollection.isPredictableIndex);
                int             int2            = adomdDataReader.GetInt32(MiningAttributeCollection.featureSelectionIndex);
                string          string3         = adomdDataReader.GetString(MiningAttributeCollection.keyColumnIndex);
                string          string4         = adomdDataReader.GetString(MiningAttributeCollection.valueColumnIndex);
                MiningAttribute miningAttribute = new MiningAttribute(parentModel);
                miningAttribute.attributeID      = @int;
                miningAttribute.name             = @string;
                miningAttribute.shortName        = string2;
                miningAttribute.isInput          = boolean;
                miningAttribute.isPredictable    = boolean2;
                miningAttribute.featureSelection = (MiningFeatureSelection)int2;
                miningAttribute.keyColumn        = this.ModelColumnFromName(string3, parentModel);
                miningAttribute.valueColumn      = this.ModelColumnFromName(string4, parentModel);
                this.hashAttrIDs.Add(miningAttribute.name, miningAttribute.attributeID);
                this.arAttributesInternal.Add(miningAttribute);
            }
            adomdDataReader.Close();
            adomdCommand.Dispose();
        }
        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);
                }
            }
        }