BlueSky.SyntaxEditorWindow.AddToSession C# (CSharp) Метод

AddToSession() публичный Метод

public AddToSession ( CommandOutput co ) : void
co CommandOutput
Результат void
        public void AddToSession(CommandOutput co)
        {
            if (co != null && co.Count > 0)
            {
                sessionlst.Add(co);
                co = new CommandOutput();//after adding to session new object is allocated for futher output creation
            }
        }

Usage Example

        protected void ExecuteInSyntaxEditor(bool ExecuteCommand, string sessionTitle = "", CommandOutput sliceco = null, bool islastslice = true)
        {
            //Launch Syntax Editor window with command pasted /// 29Jan2013
            MainWindow mwindow = LifetimeService.Instance.Container.Resolve <MainWindow>();
            ////// Start Syntax Editor  //////
            SyntaxEditorWindow sewindow = LifetimeService.Instance.Container.Resolve <SyntaxEditorWindow>();

            sewindow.Owner = mwindow;
            //21Nov2013. if there is slicename add it first to the syntax editor output session list
            if (sliceco != null)
            {
                sewindow.AddToSession(sliceco);
            }
            if (cmd.CommandSyntax != null && cmd.CommandSyntax.Length > 0)
            {
                sewindow.RunCommands(cmd.CommandSyntax);//, sessionheader);
            }
            //22Nov2013
            //if sessionTitle is empty that means there are more (split)slices to execute
            //when the last slice is ready for execution that time sessionTitle
            //will have the main title for whole session
            if (islastslice)//sessionTitle != null && sessionTitle.Length > 0)
            {
                sewindow.DisplayAllSessionOutput(sessionTitle);
            }
            else
            {
                return;//go get another slice. Do not process rest of the code till last slice comes in.
            }
        }
All Usage Examples Of BlueSky.SyntaxEditorWindow::AddToSession
SyntaxEditorWindow