static void AddEntries(object state) { SomeCollection sc = (SomeCollection)state; for (int x = 0; x < 20; x++) { Trace.WriteLine("adding"); sc.Add(x); Trace.WriteLine("added"); Thread.Sleep(x * 3); } }
public void Should_serialize_a_single_element_collection() { var someArray = new SomeCollection(); someArray.Elements = new ArrayElement[1] { new ArrayElement { Value = 27 } }; var result = SerializeAndReturn(someArray); result.Elements.ShouldNotBe(null); result.Elements.Count.ShouldBe(1); }
static void EnumEntries(object state) { SomeCollection sc = (SomeCollection)state; for (int x = 0; x < 10; x++) { Trace.WriteLine("Loop" + x); foreach (int item in sc.AllValues) { Trace.Write(item + " "); } Thread.Sleep(30); Trace.WriteLine(""); } }
public async void OnNavigatedTo(INavigationParameters parameters) { await Task.Run(() => { Task.Delay(100); SomeCollection.Add(new ComplexType { Title = "title1", Note = "note1" }); SomeCollection.Add(new ComplexType { Title = "title2", Note = "note2" }); SomeCollection.Add(new ComplexType { Title = "title3", Note = "note3" }); }); }
static void Main(string[] args) { int[] numbers; SomeCollection collection = new SomeCollection(); ////numbers = collection.FindNumbers(x => x > 10); //numbers = collection.FindNumbers(x => x == 13); //numbers = collection.FindNumbers(x => x % 2 == 0); numbers = collection.FindNumbers(x => x % 2 != 0); foreach (var n in numbers) { if (n != 0) { Console.Write(n + " "); } } Console.ReadKey(); }
public News(SomeCollection <Image> images) { _images = images; Images = new ListView(this); }
public void Enumerator_IsLazy() { Type type = new SomeCollection().GetEnumerator().GetType(); Assert.That(LazyTypeDetector.IsLazyType(type), Is.True); }
public void Should_serialize_a_single_element_collection() { var someArray = new SomeCollection(); someArray.Elements = new ArrayElement[1] { new ArrayElement {Value = 27} }; SomeCollection result = SerializeAndReturn(someArray); result.Elements.ShouldNotBe(null); result.Elements.Count.ShouldBe(1); }
private void CommandMethod(object parameter) { SomeCollection.Add("Some dummy string"); }