Automatak.Simulator.DNP3.MasterForm.DoCommandAction C# (CSharp) Method

DoCommandAction() private method

private DoCommandAction ( Func func ) : void
func Func
return void
        private void DoCommandAction(Func<ICommandProcessor, Task<CommandTaskResult>> func)
        {
            this.toolStripStatusLabel.Text = "Result: ... ";
            var task = func(this.master);
            task.ContinueWith(cr =>
                this.BeginInvoke(new Action(() =>
                   this.toolStripStatusLabel.Text += cr.Result.ToString()
                ))
            );
        }