ProcessMonitor.App.Presenters.MainPresenter.AddToWatch C# (CSharp) Méthode

AddToWatch() public méthode

public AddToWatch ( string process ) : void
process string
Résultat void
        public void AddToWatch(string process)
        {
            try
            {
                if (isConnected)
                {
                    //monitorClient.AddToWatchAsync(process).ContinueWith(t => Update());
                    monitorClient.AddToWatch(process);
                    Update();
                }
                else
                {
                    monitor.AddToWatch(process);
                    Update();
                }
            }
            catch (TimeoutException te)
            {
            #if DEBUG
                view.ShowError(te.ToString());
            #else
                view.ShowError(te.Message);
            #endif
            }
            catch (EndpointNotFoundException enfe)
            {
            #if DEBUG
                view.ShowError(enfe.ToString());
            #else
                view.ShowError(enfe.Message);
            #endif
            }
        }