~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedPythonConsoleHost.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.IO;
 
6
using ICSharpCode.PythonBinding;
 
7
using ICSharpCode.Scripting;
 
8
using ICSharpCode.Scripting.Tests.Utils;
 
9
using Microsoft.Scripting;
 
10
using Microsoft.Scripting.Hosting;
 
11
using Microsoft.Scripting.Hosting.Shell;
 
12
 
 
13
namespace PythonBinding.Tests.Console
 
14
{
 
15
        public class DerivedPythonConsoleHost : PythonConsoleHost
 
16
        {
 
17
                ScriptingConsoleOutputStream outputStream;
 
18
                
 
19
                public DerivedPythonConsoleHost(IScriptingConsoleTextEditor textEditor)
 
20
                        : base(textEditor, new FakeControlDispatcher())
 
21
                {
 
22
                }
 
23
                
 
24
                public Type GetProvider()
 
25
                {
 
26
                        return base.Provider;
 
27
                }
 
28
                
 
29
                public CommandLine CallCreateCommandLine()
 
30
                {
 
31
                        return base.CreateCommandLine();
 
32
                }
 
33
                
 
34
                public IConsole CallCreateConsole(ScriptEngine engine, CommandLine commandLine, ConsoleOptions options)
 
35
                {
 
36
                        return base.CreateConsole(engine, commandLine, options);
 
37
                }
 
38
                
 
39
                public OptionsParser CallCreateOptionsParser()
 
40
                {
 
41
                        return base.CreateOptionsParser();
 
42
                }
 
43
                                
 
44
                /// <summary>
 
45
                /// Gets the output stream class passed to SetOutput method.
 
46
                /// </summary>
 
47
                public ScriptingConsoleOutputStream OutputStream {
 
48
                        get { return outputStream; }
 
49
                }
 
50
                        
 
51
                protected override void SetOutput(ScriptingConsoleOutputStream stream)
 
52
                {
 
53
                        outputStream = stream;
 
54
                }
 
55
        }
 
56
}