ExamplesFx.ExampleCode.RunExample C# (CSharp) Method

RunExample() public method

Indicates if the Example has Console Output
public RunExample ( ) : void
return void
        public void RunExample()
        {
            try {
                ExamplesEnvironment.InitEnvironment(this);

                this.Example.RunExample();
            }
            catch (Exception ex) {
                this.Example.Exception = ex;
            }
            finally {
                foreach (var file in this.Files) {
                    if (file.Status == ExampleFile.FileType.InputFile)
                        File.Delete(file.Filename);
                    if (file.Status == ExampleFile.FileType.OutputFile) {
                        if (File.Exists(file.Filename))
                            file.Contents = File.ReadAllText(file.Filename);
                    }
                }
            }
        }