kOS.ContextRunProgram.Run C# (CSharp) Method

Run() public method

public Run ( File file ) : void
file File
return void
        public void Run(File file)
        {
            this.file = file;

            State = ExecutionState.WAIT;

            RunBlock(file);
        }

Usage Example

Example #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 + "'.");
            }
        }
All Usage Examples Of kOS.ContextRunProgram::Run