/// <summary> /// Create an object using the contents of the corresponding MzIdentML object /// </summary> /// <param name="pd"></param> /// <param name="idata"></param> public ProteinDetectionObj(ProteinDetectionType pd, IdentDataObj idata) : base(pd, idata) { ProteinDetectionListRef = pd.proteinDetectionList_ref; ProteinDetectionProtocolRef = pd.proteinDetectionProtocol_ref; InputSpectrumIdentifications = new IdentDataList <InputSpectrumIdentificationsObj>(1); if (pd.InputSpectrumIdentifications?.Count > 0) { InputSpectrumIdentifications.AddRange(pd.InputSpectrumIdentifications, isi => new InputSpectrumIdentificationsObj(isi, IdentData)); } }
/// <summary> /// Create an object using the contents of the corresponding MzIdentML object /// </summary> /// <param name="pd"></param> /// <param name="idata"></param> public ProteinDetectionObj(ProteinDetectionType pd, IdentDataObj idata) : base(pd, idata) { ProteinDetectionListRef = pd.proteinDetectionList_ref; ProteinDetectionProtocolRef = pd.proteinDetectionProtocol_ref; _inputSpectrumIdentifications = null; if ((pd.InputSpectrumIdentifications != null) && (pd.InputSpectrumIdentifications.Count > 0)) { InputSpectrumIdentifications = new IdentDataList <InputSpectrumIdentificationsObj>(); foreach (var isi in pd.InputSpectrumIdentifications) { InputSpectrumIdentifications.Add(new InputSpectrumIdentificationsObj(isi, IdentData)); } } }