#region Imported Regions using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Scripting.Hosting; using System.IO; using System.Collections; using System.Collections.ObjectModel; using System.Collections.Specialized; #endregion #region Namespace Declaration namespace Org.TechA.Wpf.UserControls { /// /// The Model for the IronRuby console. /// internal sealed class IronRubyConsoleModel { #region Private Members private readonly ObservableCollection _scopes; private readonly TextWriter _writer; private readonly ScriptEngine _engine; #endregion #region Constructors public IronRubyConsoleModel(TextWriter writer, ScriptEngine engine) { _writer = writer; _engine = engine; _scopes = new ObservableCollection(); _scopes.CollectionChanged += new NotifyCollectionChangedEventHandler(_scopes_CollectionChanged); } #endregion #region Event Delegates void _scopes_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Add) { } } #endregion #region Accessor Mutators /// /// User Defined list of scopes /// avaialable to the IronRuby Runtime. /// public IList Scopes { get { return _scopes; } } /// /// The TextWriter used by a stream /// that captures the STDIO from the /// IronRuby Runtime. /// public TextWriter Writer { get { return _writer; } } /// /// The IronRuby ScriptEngine for /// the shell (console). /// public ScriptEngine Engine { get { return _engine; } } #endregion } } #endregion