예제 #1
0
        public static ArtifactType CreateBaselineData(XElement artData)
        {
            var toRet = new PatternsAddOnManager.Baseline()
            {
                Category = "Baseline"
            };
            double nVal;

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

            toRet.BaselineVariability = nVal;

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

            toRet.Y1 = nVal;

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

            toRet.Y2 = nVal;
            return(toRet);
        }
예제 #2
0
        private ArtifactType FillBaselineData(PeriGen.Patterns.Engine.Data.Baseline item)
        {
            var toRet = new Baseline()
            {
                Category            = Resource.IDS_BASELINE,
                Id                  = item.Id,
                Y1                  = item.Y1,
                Y2                  = item.Y2,
                BaselineVariability = item.BaselineVariability
            };

            return(toRet);
        }