internal static ExperimentDataReferenceSet FromXElement(XElement sampleReferenceSetElement) { ExperimentDataReferenceSet experimentDataReferenceSet = new ExperimentDataReferenceSet(); //// Import attributes for the implemented interfaces experimentDataReferenceSet.ImportISignableItem(sampleReferenceSetElement); //// Import the child elements of the current object experimentDataReferenceSet.ExperimentDataReferences.AddRange(sampleReferenceSetElement.Elements(NamespaceHelper.GetXName("ExperimentDataReference")).Select(ExperimentDataReference.FromXElement)); experimentDataReferenceSet.ExperimentDataBulkReferences.AddRange(sampleReferenceSetElement.Elements(NamespaceHelper.GetXName("ExperimentDataBulkReference")).Select(ExperimentDataBulkReference.FromXElement)); return(experimentDataReferenceSet); }
internal static Infrastructure FromXElement(XElement infrastructureElement) { Infrastructure infrastructure = new Infrastructure(); //// Import attributes for the implemented interfaces infrastructure.ImportISignableItem(infrastructureElement); //// Import the child elements of the current object XElement sampleReferenceSetElement = infrastructureElement.Element(NamespaceHelper.GetXName("SampleReferenceSet")); if (sampleReferenceSetElement != null) { infrastructure.SampleReferencetSet = SampleReferenceSet.FromXElement(sampleReferenceSetElement); } XElement parentDataPointReferenceSetElement = infrastructureElement.Element(NamespaceHelper.GetXName("ParentDataPointReferenceSet")); if (parentDataPointReferenceSetElement != null) { infrastructure.ParentDataPointReferenceSet = ParentDataPointReferenceSet.FromXElement(parentDataPointReferenceSetElement); } XElement experimentDataReferenceSetElement = infrastructureElement.Element(NamespaceHelper.GetXName("ExperimentDataReferenceSet")); if (experimentDataReferenceSetElement != null) { infrastructure.ExperimentDataReferenceSet = ExperimentDataReferenceSet.FromXElement(experimentDataReferenceSetElement); } XElement timestampElement = infrastructureElement.Element(NamespaceHelper.GetXName("Timestamp")); if (timestampElement != null) { infrastructure.Timestamp = XmlConvert.ToDateTime(timestampElement.Value, XmlDateTimeSerializationMode.Utc); } return(infrastructure); }