internal static ParentDataPointReferenceSet FromXElement(XElement parentDataPointReferenceSetElement)
        {
            ParentDataPointReferenceSet parentDataPointReferenceSet = new ParentDataPointReferenceSet();

            //// Import the child elements of the current object
            parentDataPointReferenceSet.ParentDataPointReferences.AddRange(parentDataPointReferenceSetElement.Elements(NamespaceHelper.GetXName("ParentDataPointReference")).Select(ParentDataPointReference.FromXElement));

            return(parentDataPointReferenceSet);
        }
Esempio n. 2
0
        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);
        }