Пример #1
0
        public void Persist(IInboundMetadata inboundMetadata, FileInfo payloadPath)
        {
            var    targetFolder = PersisterUtils.CreateArtifactFolders(this.inboundFolder, inboundMetadata.GetHeader()).FullName;
            var    identifier   = FileUtils.FilterString(inboundMetadata.GetTransmissionIdentifier().Identifier);
            string targetFile   = Path.Combine(targetFolder, $"{identifier}.receipt.dat");

            using (var fs = File.Create(targetFile))
            {
                this.evidenceFactory.Write(fs, inboundMetadata);
            }

            Logger.DebugFormat("Receipt persisted to: {0}", targetFile);
        }
Пример #2
0
        public void Persist(IInboundMetadata inboundMetadata)
        {
            // Persists raw statistics when message was received (ignore if stats couldn't be persisted, just warn)
            try
            {
                DefaultRawStatistics rawStatistics = new RawStatisticsBuilder()
                                                     .AccessPointIdentifier(this.ourAccessPointIdentifier).Direction(Direction.IN)
                                                     .DocumentType(inboundMetadata.GetHeader().DocumentType)
                                                     .Sender(inboundMetadata.GetHeader().Sender).Receiver(inboundMetadata.GetHeader().Receiver)
                                                     .Profile(inboundMetadata.GetHeader().Process).Channel(new ChannelId("AS2")).Build();

                this.rawStatisticsRepository.Persist(rawStatistics);
            }
            catch (Exception e)
            {
                Logger.Error($"Unable to persist statistics for {inboundMetadata}\n {e.Message}", e);
            }
        }
Пример #3
0
 public void Persist(IInboundMetadata inboundMetadata, FileInfo payloadPath)
 {
     this.receiptPersister.Persist(inboundMetadata, payloadPath);
 }
Пример #4
0
 public void Persist(IInboundMetadata inboundMetadata, FileInfo payloadPath)
 {
     // No operation (intended)
 }
Пример #5
0
 public void Persist(IInboundMetadata inboundMetadata)
 {
     // No action.
 }