Exemplo n.º 1
0
 public InMemoryTable ToInMemoryTable()
 {
     return(InMemoryTable.FromEnumerable(m_structure,
                                         from row in Rows
                                         where row.RowState != CdlRowState.Detached && row.RowState != CdlRowState.Deleted
                                         select row
                                         ));
 }
Exemplo n.º 2
0
 public CdlTable(InMemoryTable table)
 {
     m_structure = table.Structure.CloneTable();
     Rows        = new CdlRowCollection(this);
     foreach (var row in table.Rows)
     {
         Rows.AddInternal(new CdlRow(this, row, CdlRowState.Unchanged, m_structure));
     }
     m_defConvertor = new CdlValueConvertor(new DataFormatSettings());
 }
Exemplo n.º 3
0
        public static InMemoryTable FromEnumerable <T>(TableInfo table, IEnumerable <T> rows)
            where T : ICdlRecord
        {
            var res = new InMemoryTable();

            res.m_structure = table.CloneTable();
            foreach (ICdlRecord rec in rows)
            {
                res.m_rows.Add(new ArrayDataRecord(rec));
            }
            return(res);
        }
Exemplo n.º 4
0
        public InMemoryTable(InMemoryTable oldTable, SingleTableDataScript script)
        {
            Initialize();
            m_structure = oldTable.Structure.CloneTable();
            CdlTable bt = new CdlTable(oldTable);

            bt.RunScript(script);
            foreach (ICdlRecord rec in bt.Rows)
            {
                m_rows.Add(new ArrayDataRecord(rec));
            }
        }