コード例 #1
0
        public string Get(double radiusD,
                          double widthF,
                          double heightF,
                          double lengthF)
        {
            string result = $"calculate me {radiusD} {widthF} {heightF} {lengthF}";

            if (DoubleValueVerifier.IsDoubleArrayValid(
                    new double[] { radiusD, widthF, heightF, lengthF }))
            {
                CircleModel door   = new CircleModel(radiusD);
                CubeModel   fridge = new CubeModel(widthF, heightF, lengthF);

                result =
                    CalculatorMain.CubeToCircle(door, fridge)
                        ?
                    $"true, door: {door.ToString()}; fridge: {fridge.ToString()}"
                        :
                    $"false, door: {door.ToString()};fridge: {fridge.ToString()}";
            }
            else
            {
                result += "; Some bad value(s)!";
            }

            return(result);
        }