Exemplo n.º 1
0
        public static void CreateAccelerationDataInternal(XElement artData, PatternsAddOnManager.Acceleration toRet)
        {
            double nVal;

            if (!Double.TryParse(artData.Element("Confidence").Value, out nVal) || nVal < 0)
            {
                nVal = 0;
            }

            toRet.Confidence = nVal;

            if (!Double.TryParse(artData.Element("Height").Value, out nVal) || nVal < 0)
            {
                nVal = 0;
            }

            toRet.Height             = nVal;
            toRet.IsNonInterpretable = artData.Element("IsNonInterpretable").Value.ToUpper().Equals("TRUE") ? true : false;
            toRet.PeakTime           = GetDateTime(artData.Element("PeakTime").Value);
            if (!Double.TryParse(artData.Element("PeakValue").Value, out nVal) || nVal < 0)
            {
                nVal = 0;
            }

            toRet.PeakValue = nVal;

            if (!Double.TryParse(artData.Element("Repair").Value, out nVal) || nVal < 0)
            {
                nVal = 0;
            }

            toRet.Repair = nVal;
        }
Exemplo n.º 2
0
        public static ArtifactType CreateAccelerationData(XElement artData)
        {
            var toRet = new PatternsAddOnManager.Acceleration()
            {
                Category = "Acceleration"
            };

            CreateAccelerationDataInternal(artData, toRet);
            return(toRet);
        }