public void Publish(Message e, string topicName) { if (e != null) { if (topicName.CompareTo(EntityType.CrewMember.ToString()) == 0) { CrewMembers.Clear(); foreach (IdentifiedObject item in e.IdObjCollection) { CrewMembers.Add(item as CrewMember); } return; } if (topicName.CompareTo(EntityType.Crew.ToString()) == 0) { Crews.Clear(); foreach (IdentifiedObject item in e.IdObjCollection) { Crews.Add(item as Crew); } return; } } }
public async void ListInit() { Crews.Clear(); var collection = await service.GetCrewsAsync(); foreach (var item in collection) { Crews.Add(item); } }
public async Task Search() { Crews.Clear(); List <Crew> tempCrews = await CrewService.GetAll(); foreach (var item in tempCrews) { Crews.Add(item); } }