Пример #1
0
        public Shape CreateShape(string description)
        {
            var shapeArgumentsHandler = new ShapeArgumentsHandler(description);
            var shapeType             = shapeArgumentsHandler.GetShapeType();

            if (_actionMap.ContainsKey(shapeType))
            {
                return(_actionMap[shapeType](shapeArgumentsHandler));
            }

            throw new Exception($"can't found command {shapeType}");
        }