Run() публичный Метод

public Run ( File file ) : void
file File
Результат void
Пример #1
0
        public override void Evaluate()
        {
            String fileName = RegexMatch.Groups[1].Value;
            File   file     = SelectedVolume.GetByName(fileName);

            if (file != null)
            {
                ContextRunProgram runContext = new ContextRunProgram(this);
                Push(runContext);

                if (file.Count > 0)
                {
                    runContext.Run(file);
                    State = ExecutionState.WAIT;
                }
                else
                {
                    State = ExecutionState.DONE;
                }
            }
            else
            {
                throw new kOSException("File not found '" + fileName + "'.");
            }
        }
Пример #2
0
        public override void Evaluate()
        {
            String fileName   = RegexMatch.Groups[1].Value;
            File   file       = SelectedVolume.GetByName(fileName);
            var    parameters = new List <Expression>();

            if (RegexMatch.Groups.Count > 1)
            {
                String paramString = RegexMatch.Groups[3].Value;
                foreach (String param in Utils.ProcessParams(paramString))
                {
                    Expression subEx = new Expression(param, this);
                    parameters.Add(subEx);
                }
            }

            if (file != null)
            {
                ContextRunProgram runContext = new ContextRunProgram(this, parameters, fileName);
                Push(runContext);

                if (file.Count > 0)
                {
                    runContext.Run(file);
                    State = ExecutionState.WAIT;
                }
                else
                {
                    State = ExecutionState.DONE;
                }
            }
            else
            {
                throw new kOSException("File not found '" + fileName + "'.", this);
            }
        }
Пример #3
0
        public override void Evaluate()
        {
            String fileName = RegexMatch.Groups[1].Value;
            File file = SelectedVolume.GetByName(fileName);

            if (file != null)
            {
                ContextRunProgram runContext = new ContextRunProgram(this);
                Push(runContext);

                if (file.Count > 0)
                {
                    runContext.Run(file);
                    State = ExecutionState.WAIT;
                }
                else
                {
                    State = ExecutionState.DONE;
                }
            }
            else
            {
                throw new kOSException("File not found '" + fileName + "'.");
            }
        }
Пример #4
0
        public override void Evaluate()
        {
            String fileName = RegexMatch.Groups[1].Value;
            File file = SelectedVolume.GetByName(fileName);
            var parameters = new List<Expression>();

            if (RegexMatch.Groups.Count > 1)
            {
                String paramString = RegexMatch.Groups[3].Value;
                foreach (String param in Utils.ProcessParams(paramString))
                {
                    Expression subEx = new Expression(param, this);
                    parameters.Add(subEx);
                }
            }

            if (file != null)
            {
                ContextRunProgram runContext = new ContextRunProgram(this, parameters);
                Push(runContext);

                if (file.Count > 0)
                {
                    runContext.Run(file);
                    State = ExecutionState.WAIT;
                }
                else
                {
                    State = ExecutionState.DONE;
                }
            }
            else
            {
                throw new kOSException("File not found '" + fileName + "'.");
            }
        }