コード例 #1
0
ファイル: FhirService.cs プロジェクト: HowardEdidin/spark
        public Bundle Transaction(Bundle bundle)
        {
            IEnumerable <BundleEntry> entries = _importer.Import(bundle.Entries);

            Guid transaction = Guid.NewGuid();

            try
            {
                entries = _store.AddEntries(entries, transaction);
                _index.Process(entries);

                _exporter.RemoveBodyFromEntries(entries);
                bundle.Entries = entries.ToList();

                _exporter.EnsureAbsoluteUris(bundle);
                return(bundle);
            }
            catch
            {
                // todo: Purge batch from index
                _store.PurgeBatch(transaction);
                throw;
            }
        }