Exemplo n.º 1
0
        public bool Calc(DisplayRecord dr)
        {
            double objMag;

            ValidData.Magnitude      = double.TryParse(dr.Magnitude, out objMag);
            ValidData.MagnitudeRange = objMag < 20;

            var majorAxisSize = GetSizeValue(dr.MajorAxisSize);

            ValidData.MajorSize = !double.IsNaN(majorAxisSize);

            var minorAxisSize = GetSizeValue(dr.MinorAxisSize);

            ValidData.MinorSize = !double.IsNaN(minorAxisSize);

            return(ValidData.IsValid().Then(() =>
            {
                ObjectName = dr.Name;
                ObjectMagnitude = objMag;
                ObjectSize1 = majorAxisSize;
                ObjectSize2 = ValidData.MinorSize.Return(() => minorAxisSize,
                                                         () => majorAxisSize);
            }));
        }
Exemplo n.º 2
0
 public IsVisibleHelper(ValidData validData)
 {
     ValidData = validData;
 }