public SerializingSetArgs(SyncContext context, ContainerSet set, ISerializerFactory serializerFactory, string fileName, string directoryPath) : base(context, null, null) { this.Set = set; this.SerializerFactory = serializerFactory; this.FileName = fileName; this.DirectoryPath = directoryPath; }
/// <summary> /// Import a container set in a SyncSet instance /// </summary> public void ImportContainerSet(ContainerSet containerSet, bool checkType) { foreach (var table in containerSet.Tables) { var syncTable = this.Tables[table.TableName, table.SchemaName]; if (syncTable == null) { throw new ArgumentNullException($"Table {table.TableName} does not exist in the SyncSet"); } syncTable.Rows.ImportContainerTable(table, checkType); } }
/// <summary> /// Get the rows inside a container. /// ContainerSet is a serialization container for rows /// </summary> public ContainerSet GetContainerSet() { var containerSet = new ContainerSet(); foreach (var table in this.Tables) { var containerTable = new ContainerTable(table) { Rows = table.Rows.ExportToContainerTable().ToList() }; if (containerTable.Rows.Count > 0) { containerSet.Tables.Add(containerTable); } } return(containerSet); }
public DeserializingSetArgs(SyncContext context, ContainerSet set, DbConnection connection, DbTransaction transaction) : base(context, set, connection, transaction) { }
public SerializingSetArgs(SyncContext context, ContainerSet set, DbConnection connection, DbTransaction transaction) : base(context, connection, transaction) { this.Set = set; }