コード例 #1
0
        private static IColumn CloneColumnCore <T>(IColumn column)
        {
            Contracts.Assert(column is IColumn <T>);
            IRow meta = column.Metadata;

            if (meta != null)
            {
                meta = RowCursorUtils.CloneRow(meta);
            }

            var tcolumn = (IColumn <T>)column;

            if (!tcolumn.IsActive)
            {
                return(new InactiveImpl <T>(tcolumn.Name, meta, tcolumn.Type));
            }
            T val = default(T);

            tcolumn.GetGetter()(ref val);
            return(GetColumn(tcolumn.Name, tcolumn.Type, ref val, meta));
        }