public XDocument Serialize() { return(new XDocument(new XElement(EspdNames.Qarp + nameof(QualificationApplicationResponse), new XAttribute(XNamespace.Xmlns + "cbc", UblNames.Cbc), new XAttribute(XNamespace.Xmlns + "cac", UblNames.Cac), UBLVersionID.Serialize(nameof(UBLVersionID)), CustomizationID.Serialize(nameof(CustomizationID)), ProfileID.Serialize(nameof(ProfileID)), ID?.Serialize(nameof(ID)), CopyIndicator.Serialize(nameof(CopyIndicator)), UUID.Serialize(nameof(UUID)), ContractFolderID.Serialize(nameof(ContractFolderID)), IssueDate.Serialize(nameof(IssueDate)), IssueTime.Serialize(nameof(IssueTime)), EconomicOperatorGroupName.Serialize(nameof(EconomicOperatorGroupName)), VersionID.Serialize(nameof(VersionID)), PreviousVersionID.Serialize(nameof(PreviousVersionID)), ProcedureCode.Serialize(nameof(ProcedureCode)), QualificationApplicationTypeCode.Serialize(nameof(QualificationApplicationTypeCode)), WeightScoringMethodologyNote.Serialize(nameof(WeightScoringMethodologyNote)), WeightingTypeCode.Serialize(nameof(WeightingTypeCode)), ContractingParty?.Serialize(), EconomicOperatorParty?.Serialize(nameof(EconomicOperatorParty)), ProcurementProject?.Serialize(), ProcurementProjectLots?.Select(lot => lot.Serialize()), TenderingCriteria?.Select(c => c.Serialize()), TenderingCriterionResponses?.Select(r => r.Serialize()), AdditionalDocumentReferences?.Select(d => d.Serialize()), Evidences?.Select(e => e.Serialize()) ))); }
/// <summary> /// Calculate average mass and net and stdev mass and net for each Target. /// </summary> public void CalculateStatistics() { var massesList = Evidences.Select(c => c.MonoisotopicMass).ToList(); var netList = Evidences.Select(c => c.ObservedNet).ToList(); TheoreticalMonoIsotopicMass = massesList.Average(); AverageNet = netList.Average(); StdevNet = (netList.Count == 1) ? 0 : netList.StandardDeviation(); }