public IAlgorithm Select(string[] array)
        {
            if (!_validator.ValidateInputArray(array))
            {
                return(null);
            }

            if (array.Length == _minLenth)
            {
                uint numS;
                if (_validator.ConvertArrayToParams(array, out numS))
                {
                    return(new Sequence(numS));
                }
            }
            uint num1;
            uint num2;

            if (_validator.ConvertArrayToParams(array, out num1, out num2))
            {
                return(new Fibonacci(Math.Min(num1, num2), Math.Max(num1, num2)));
            }

            return(null);
        }
 public void Start()
 {
     if (_innerDataValidator.ValidateInputArray(_arr))
     {
         foreach (string item in _arr)
         {
             TryConvert(item);
         }
     }
     else
     {
         _visualizator.SendInfo(Message.Ininstruction);
     }
     do
     {
         string strNum = _visualizator.AskNumber();
         TryConvert(strNum);
     } while (_visualizator.AskContinue());
 }
 private void ProcesingStartData()
 {
     if (_innerDataValidator.ValidateInputArray(_arr))
     {
         double envelope1Side1;
         double envelope1Side2;
         double envelope2Side1;
         double envelope2Side2;
         if (_innerDataValidator.ConvertArrayToParams(_arr, out envelope1Side1, out envelope1Side2, out envelope2Side1, out envelope2Side2))
         {
             _envelopesStorage.AddEnvelope(envelope1Side1, envelope1Side2);
             _envelopesStorage.AddEnvelope(envelope2Side1, envelope2Side2);
             _visualizer.ShowAnswer(_envelopesStorage.Result());
         }
         else
         {
             _visualizer.ShowMassage(Result.IncorectData);
         }
     }
     else
     {
         _visualizer.ShowMassage(Result.Instruction);
     }
 }