public async void GetPerson() { List <Person> persons = new List <Person>(); for (int i = 0; i < 10; i++) { persons.Add(await ServiceGenerator.GetService().GetPerson()); } Persons = new ObservableCollection <Person>(persons); }
public async void TurnOff() { try { var light = new Light() { Action = 0 }; await ServiceGenerator.GetService().Test(light); } catch (Exception ex) { } }