예제 #1
0
 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;
 }
예제 #2
0
        /// <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);
            }
        }
예제 #3
0
        /// <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);
        }
예제 #4
0
 public DeserializingSetArgs(SyncContext context, ContainerSet set, DbConnection connection, DbTransaction transaction) : base(context, set, connection, transaction)
 {
 }
예제 #5
0
 public SerializingSetArgs(SyncContext context, ContainerSet set, DbConnection connection, DbTransaction transaction)
     : base(context, connection, transaction)
 {
     this.Set = set;
 }