internal static DataColumn CreateDataColumnBySchemaAction(string sourceColumn, string dataSetColumn, DataTable dataTable, Type dataType, MissingSchemaAction schemaAction)
        {
            if (ADP.IsEmpty(dataSetColumn))
            {
                return((DataColumn)null);
            }
            switch (schemaAction)
            {
            case MissingSchemaAction.Add:
            case MissingSchemaAction.AddWithKey:
                return(new DataColumn(dataSetColumn, dataType));

            case MissingSchemaAction.Ignore:
                return((DataColumn)null);

            case MissingSchemaAction.Error:
                throw ADP.ColumnSchemaMissing(dataSetColumn, dataTable.TableName, sourceColumn);

            default:
                throw ADP.InvalidMissingSchemaAction(schemaAction);
            }
        }