Beispiel #1
0
 /// <summary>
 /// Updates result log with supplied string.
 /// </summary>
 /// <param name="param"></param>
 void AddUpdate(object param)
 {
     // Dispatch update for result log.
     System.Windows.Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
     {
         // Add string to result log.
         ResultLog.Add(param as string);
     }));
 }
        public void IListTests()
        {
            ResultLog l0 = new ResultLog();
            Result    r0 = new Result(ResultType.Bad, "Error message");

            l0.Insert(0, r0);
            Assert.Contains <Result>(r0, l0);
            Assert.Equal(0, l0.IndexOf(r0));
            l0.Remove(r0);
            Assert.Empty(l0);
            l0.Add(r0);
            Assert.Single(l0);
            l0.RemoveAt(0);
            Assert.Empty(l0);
        }