/// <summary>
 /// Adds a collection of output rows to this collection.
 /// </summary>
 /// <param name="rows">Collection of rows to add to this collection.</param>
 /// <remarks>This method does a shallow copy.</remarks>
 public void Add(OutputRowCollection rows)
 {
     foreach (OutputRow row in rows)
     {
         this.collection.Add(row);
     }
 }
 /// <summary>
 /// Adds a collection of output rows to this collection.
 /// </summary>
 /// <param name="rows">Collection of rows to add to this collection.</param>
 /// <remarks>This method does a shallow copy.</remarks>
 public void Add(OutputRowCollection rows)
 {
     foreach (OutputRow row in rows)
     {
         this.collection.Add(row);
     }
 }
Example #3
0
        /// <summary>
        /// Gets the validation rows for the table.
        /// </summary>
        /// <param name="validationTable">Defintion for the validation table.</param>
        /// <returns>Collection of output rows for the validation table.</returns>
        internal OutputRowCollection GetValidationRows(TableDefinition validationTable)
        {
            OutputRowCollection outputRows = new OutputRowCollection();

            foreach (ColumnDefinition columnDef in this.columns)
            {
                if (columnDef.IsUnreal)
                {
                    continue;
                }

                Row row = new Row(validationTable);

                row[0] = this.name;

                row[1] = columnDef.Name;

                if (columnDef.IsNullable)
                {
                    row[2] = "Y";
                }
                else
                {
                    row[2] = "N";
                }

                if (columnDef.IsMinValueSet)
                {
                    row[3] = columnDef.MinValue;
                }

                if (columnDef.IsMaxValueSet)
                {
                    row[4] = columnDef.MaxValue;
                }

                row[5] = columnDef.KeyTable;

                if (columnDef.IsKeyColumnSet)
                {
                    row[6] = columnDef.KeyColumn;
                }

                if (ColumnCategory.Unknown != columnDef.Category)
                {
                    row[7] = columnDef.Category.ToString();
                }

                row[8] = columnDef.Possibilities;

                row[9] = columnDef.Description;

                outputRows.Add(new OutputRow(row));
            }

            return(outputRows);
        }
Example #4
0
 /// <summary>
 /// Creates an output table with the specified definition.
 /// </summary>
 /// <param name="tableDef">Definition for all tables in this output table.</param>
 public OutputTable(TableDefinition tableDef)
 {
     this.tableDef   = tableDef;
     this.outputRows = new OutputRowCollection();
 }
Example #5
0
 /// <summary>
 /// Creates an output table with the specified definition.
 /// </summary>
 /// <param name="tableDef">Definition for all tables in this output table.</param>
 public OutputTable(TableDefinition tableDef)
 {
     this.tableDef = tableDef;
     this.outputRows = new OutputRowCollection();
 }
        /// <summary>
        /// Gets the validation rows for the table.
        /// </summary>
        /// <param name="validationTable">Defintion for the validation table.</param>
        /// <returns>Collection of output rows for the validation table.</returns>
        internal OutputRowCollection GetValidationRows(TableDefinition validationTable)
        {
            OutputRowCollection outputRows = new OutputRowCollection();

            foreach (ColumnDefinition columnDef in this.columns)
            {
                if (columnDef.IsUnreal)
                {
                    continue;
                }

                Row row = new Row(validationTable);

                row[0] = this.name;

                row[1] = columnDef.Name;

                if (columnDef.IsNullable)
                {
                    row[2] = "Y";
                }
                else
                {
                    row[2] = "N";
                }

                if (columnDef.IsMinValueSet)
                {
                    row[3] = columnDef.MinValue;
                }

                if (columnDef.IsMaxValueSet)
                {
                    row[4] = columnDef.MaxValue;
                }

                row[5] = columnDef.KeyTable;

                if (columnDef.IsKeyColumnSet)
                {
                    row[6] = columnDef.KeyColumn;
                }

                if (ColumnCategory.Unknown != columnDef.Category)
                {
                    row[7] = columnDef.Category.ToString();
                }

                row[8] = columnDef.Possibilities;

                row[9] = columnDef.Description;

                outputRows.Add(new OutputRow(row));
            }

            return outputRows;
        }