コード例 #1
0
 public void AddAccount(MobileAccount account)
 {
     if (!IsExistAccount(account))
     {
         _storage.Add(account.ToString().GetHashCode(), account);
     }
 }
コード例 #2
0
        private void IncomingCall(MobileAccount from)
        {
            var existNumber = Contacts.Where(i => i.Account == from).ToArray();

            Console.WriteLine("Incoming Call to {0}!", this);
            Console.WriteLine("From: {0}", existNumber.Length != 0 ? existNumber[0].Name : from.ToString());
        }
コード例 #3
0
        private void IncomingSMS(MobileAccount from, string message)
        {
            var existNumber = Contacts.Where(i => i.Account == from).ToArray();

            Console.WriteLine("{0} received SMS!", this);
            Console.WriteLine("From: {0}", existNumber.Length != 0 ? existNumber[0].Name : from.ToString());
            Console.WriteLine("Text: {0}", message);
        }
コード例 #4
0
 public bool IsExistAccount(MobileAccount account)
 {
     return(_storage.ContainsKey(account.ToString().GetHashCode()));
 }
コード例 #5
0
 public void RemoveAccount(MobileAccount account)
 {
     _storage.Remove(account.ToString().GetHashCode());
 }