Пример #1
0
        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;
                }
            }
        }
Пример #2
0
        public async void ListInit()
        {
            Crews.Clear();
            var collection = await service.GetCrewsAsync();

            foreach (var item in collection)
            {
                Crews.Add(item);
            }
        }
Пример #3
0
        public async Task Search()
        {
            Crews.Clear();

            List <Crew> tempCrews = await CrewService.GetAll();

            foreach (var item in tempCrews)
            {
                Crews.Add(item);
            }
        }