コード例 #1
0
ファイル: Commands.cs プロジェクト: frg/csharp_telesign
        public static void MapContactLocation(string[] args)
        {
            CheckArgument.ArrayLengthIs(args, 1, "args");
            string phoneNumber = args[0];

            PhoneIdService service = new PhoneIdService(GetConfiguration());
            PhoneIdContactResponse response = service.ContactLookup(phoneNumber);

            string address = response.Contact.GetFullAddressOnSingleLine();
            Console.WriteLine("Google Mapping: {0}", address);

            string url = string.Format(
                        "http://maps.google.com/maps?q={0}",
                        address);

            Process.Start(url);
        }
コード例 #2
0
ファイル: Commands.cs プロジェクト: frg/csharp_telesign
        public static void PhoneIdContact(string[] args)
        {
            CheckArgument.ArrayLengthIs(args, 1, "args");
            string phoneNumber = args[0];

            PhoneIdService service = new PhoneIdService(GetConfiguration());
            PhoneIdContactResponse response = service.ContactLookup(phoneNumber);

            Console.WriteLine("Phone Number: {0}", phoneNumber);
            Console.WriteLine("Name        : {0}", response.Contact.FullName);
            Console.WriteLine("Address     :\r\n{0}", response.Contact.GetFullAddress());
        }