/// <summary>
        /// Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="idata"></param>
        public DatabaseTranslationObj(DatabaseTranslationType dt, IdentDataObj idata)
            : base(idata)
        {
            TranslationTables = new IdentDataList <TranslationTableObj>(1);
            Frames            = new List <int>(1);

            if (dt.TranslationTable?.Count > 0)
            {
                TranslationTables.AddRange(dt.TranslationTable, t => new TranslationTableObj(t, IdentData));
            }
            if (dt.frames != null)
            {
                Frames = new List <int>(dt.frames);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Create an object using the contents of the corresponding MzIdentML object
        /// </summary>
        /// <param name="dt"></param>
        /// <param name="idata"></param>
        public DatabaseTranslationObj(DatabaseTranslationType dt, IdentDataObj idata)
            : base(idata)
        {
            _translationTables = null;
            Frames             = null;

            if ((dt.TranslationTable != null) && (dt.TranslationTable.Count > 0))
            {
                TranslationTables = new IdentDataList <TranslationTableObj>();
                foreach (var t in dt.TranslationTable)
                {
                    TranslationTables.Add(new TranslationTableObj(t, IdentData));
                }
            }
            if (dt.frames != null)
            {
                Frames = new List <int>(dt.frames);
            }
        }