Esempio n. 1
0
        private SqlTableRef CreateClone(SqlNodeCloneContext context)
        {
            var clone = new SqlTableRef {
                Name = Name, DataTable = DataTable
            };

            context.NodeMapping[this] = clone;
            var columnClones = new List <SqlTableColumn>(columns.Count);

            columnClones.AddRange(columns.Select(column => (SqlTableColumn)column.Clone(context)));

            clone.columns = new SqlTableColumnCollection(columnClones);

            return(clone);
        }
        internal override object Clone(SqlNodeCloneContext context)
        {
            if (context.NodeMapping.ContainsKey(this))
            {
                return(context.NodeMapping[this]);
            }

            var clone = new SqlTableRef {
                Name = Name, dataTable = DataTable
            };

            context.NodeMapping[this] = clone;
            var columnClones = new Collection <SqlTableColumn>();

            foreach (var column in columns)
            {
                columnClones.Add((SqlTableColumn)column.Clone(context));
            }
            clone.columns = new SqlTableColumnCollection(columnClones);

            return(clone);
        }
Esempio n. 3
0
 internal SqlUpdate(SqlTableRef table) : this()
 {
     update = table;
 }
Esempio n. 4
0
 internal SqlDelete(SqlTableRef table) : this()
 {
     delete = table;
 }
Esempio n. 5
0
 internal SqlInsert(SqlTableRef tableRef) : this()
 {
     into = tableRef;
 }