Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         fileId = Hdf5.CloseFile(fileId);
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         SaveHeader();
         dset?.Dispose();
         var info = Hdf5.GroupInfo(_groupId);
         _groupId = Hdf5.CloseGroup(_groupId);
         fileId   = Hdf5.CloseFile(fileId);
     }
 }
Example #3
0
 public void Dispose()
 {
     _header.Recording.EndTime    = _header.Recording.StartTime + TimeSpan.FromSeconds(_sampleCount / _header.Recording.SampleRate);
     Header.Recording.NrOfSamples = _sampleCount;
     Header.EventListToEvents();
     for (int i = 0; i < Header.Channels.Count(); i++)
     {
         Header.Channels[i].NrOfSamples = _sampleCount;
     }
     Hdf5.WriteObject(_groupId, _header);
     fileId = Hdf5.CloseFile(fileId);
 }
 protected virtual void Dispose(bool disposing)
 {
     Trace.WriteLine($"saving file {Header.Patient.Name} samples: {_sampleCount}; fileId: {fileId}");
     Header.Recording.EndTime     = Header.Recording.StartTime + TimeSpan.FromSeconds(_sampleCount / Header.Recording.SampleRate);
     Header.Recording.NrOfSamples = _sampleCount;
     Header.EventListToEvents();
     for (int i = 0; i < Header.Channels.Count(); i++)
     {
         Header.Channels[i].NrOfSamples = _sampleCount;
     }
     Trace.WriteLine($"writing file {Header.Patient.Name} groupId: {_groupId}; fileId: {fileId}");
     Hdf5.WriteObject(_groupId, Header);
     if (disposing)
     {
         if (dset != null)
         {
             dset.Dispose();
         }
         var info = Hdf5.GroupInfo(_groupId);
         _groupId = Hdf5.CloseGroup(_groupId);
         fileId   = Hdf5.CloseFile(fileId);
     }
 }
Example #5
0
 public void Dispose()
 {
     _header.Recording.EndTime = _header.Recording.StartTime + TimeSpan.FromSeconds(_sampleCount / _header.Recording.SampleRate);
     Hdf5.WriteObject(fileId, _header, _groupName);
     fileId = Hdf5.CloseFile(fileId);
 }
 public void Dispose()
 {
     fileId = Hdf5.CloseFile(fileId);
 }