public string Stop() { string result = "List is empty"; List <ThreadWithLogger> ListThreadsWithLoggers; if ((ListThreadsWithLoggers = (List <ThreadWithLogger>)Application[ListThreadsSignature]) != null) { result = string.Empty; ListThreadsWithLoggers.ForEach((item) => { if (!item.Thread.IsAlive) { return; } item.Logger.SetShouldStop(); if (result != string.Empty) { result += " "; } result += item.Thread.Name + "(Stopped)"; }); } return(result); }
public string Show() { string result = "List is empty"; List <ThreadWithLogger> ListThreadsWithLoggers; if ((ListThreadsWithLoggers = (List <ThreadWithLogger>)Application[ListThreadsSignature]) != null) { result = string.Empty; ListThreadsWithLoggers.ForEach((item) => { if (result != string.Empty) { result += " "; } result += item.Thread.Name + "(IsAlive=" + item.Thread.IsAlive.ToString().ToLower() + ")"; }); } return(result); }