예제 #1
0
파일: Mzml.cs 프로젝트: yhayirsevertr/CSMSL
        public override void Open()
        {
            if (!IsOpen || _mzMLConnection == null)
            {
                Stream stream = new FileStream(FilePath, FileMode.Open);
                try
                {
                    _indexedmzMLConnection = _indexedSerializer.Deserialize(stream) as indexedmzML;
                    _mzMLConnection        = _indexedmzMLConnection.mzML;
                }
                catch (Exception e1)
                {
                    try
                    {
                        _mzMLConnection = _mzMLSerializer.Deserialize(stream) as mzMLType;
                    }
                    catch (Exception e2)
                    {
                        throw new InvalidDataException("Unable to parse " + FilePath + " as a mzML file!");
                    }
                }


                base.Open();
            }
        }
예제 #2
0
파일: Mzml.cs 프로젝트: yhayirsevertr/CSMSL
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _mzMLConnection        = null;
         _indexedmzMLConnection = null;
     }
     base.Dispose(disposing);
 }