public static void SelectAddress(Pager owner, Address model)
        {
            using (owner.Modifier(x => x.History).Modifier(x=>x.To))
            {

                owner.To = model;

                 if (model == null)
                {
                    owner.History = new ObservableCollection<Message>(m_history.OrderByDescending(x => x.CreatedTime));
                    return;
                }

                owner.History = new ObservableCollection<Message>(m_history.Where(x => x.To.Name == model.Name || x.From.Name == model.Name).OrderByDescending(x=>x.CreatedTime));
            }
        }
        public static void StartUp(string configXmlFile)
        {
            m_addressBook = configXmlFile
                          .ToXml()
                          .Run(x=>From = x.Elements("From").First().Deserialize<Address>())
                          .DeserializeMany<Group>((x, y) => y.Addresses = x.DeserializeMany<Address>().ToArray())
                          .ToArray();

            m_history = new List<Message>();
        }
Beispiel #3
0
 internal void Add(Address address)
 {
     (Addresses ?? (Addresses = new List<Address>())).Add(address);
 }