Пример #1
0
    public string RegisterHarvester(List <string> arguments)
    {
        string result = string.Empty;
        string type   = arguments[0];
        string id     = arguments[1];

        try
        {
            Harvester harvester = HarvesterFactory.MakeHarvester(arguments);
            this.harvesters.Add(harvester);
            this.draftObjects.Add(harvester);

            result = $"Successfully registered {type} Harvester - {id}";
        }
        catch (Exception e)
        {
            result = $"Harvester is not registered, because of it's {e.Message}";
        }

        return(result);
    }