/// <summary> /// Returns the currently active project. /// </summary> /// <returns> /// The currently active project. /// </returns> public IProjectScriptFacade ActiveProject() { if (m_Current == null) { m_Current = new ScriptFrontEndProjectFacade(m_Projects.ActiveProject()); } return(m_Current); }
/// <summary> /// Initializes a new instance of the <see cref="ScriptFrontEndProjectHub"/> class. /// </summary> /// <param name="projects">The object that handles all the project activities.</param> /// <exception cref="ArgumentNullException"> /// Thrown if <paramref name="projects"/> is <see langword="null" />. /// </exception> public ScriptFrontEndProjectHub(ScriptBackEndProjectHub projects) { { Enforce.Argument(() => projects); } m_Projects = projects; { m_Projects.OnNewProjectLoaded += (s, e) => { m_Current = null; RaiseOnNewProjectLoaded(); }; m_Projects.OnProjectUnloaded += (s, e) => { m_Current = null; RaiseOnProjectUnloaded(); }; } }
/// <summary> /// Returns the currently active project. /// </summary> /// <returns> /// The currently active project. /// </returns> public IProjectScriptFacade ActiveProject() { if (m_Current == null) { m_Current = new ScriptFrontEndProjectFacade(m_Projects.ActiveProject()); } return m_Current; }