/// <summary> /// Copy ctor /// </summary> public SynchronizationQueueEntry(SynchronizationQueueEntry entry) { this.CreationTime = entry.CreationTime; this.DataFileKey = ApplicationContext.Current.GetService <IQueueFileProvider>().CopyQueueData(entry.DataFileKey); this.Data = entry.Data; this.IsRetry = entry.IsRetry; this.Operation = entry.Operation; this.Type = entry.Type; }
/// <summary> /// Initializes a new instance of the <see cref="SanteDB.DisconnectedClient.SQLite.Synchronization.Model.DeadLetterQueueEntry"/> class. /// </summary> /// <param name="fromEntry">From entry.</param> public DeadLetterQueueEntry(SynchronizationQueueEntry fromEntry, byte[] tagData) { if (fromEntry == null) { throw new ArgumentNullException(nameof(fromEntry)); } this.OriginalQueue = fromEntry.GetType().GetTypeInfo().GetCustomAttribute <TableAttribute>().Name; this.DataFileKey = ApplicationContext.Current.GetService <IQueueFileProvider>().CopyQueueData(fromEntry.DataFileKey); this.CreationTime = DateTime.Now; this.Type = fromEntry.Type; this.TagData = tagData; this.Operation = fromEntry.Operation; }