/// <summary> /// ########## ########## #### ## ########### ###### ######## # Exchange /// <see cref="Exchange.PhysicalAddressEntry"/>. /// </summary> /// <param name="physicalAddressEntry">##### ######## # Exchange.</param> public static string GetUniqueKey(Exchange.PhysicalAddressEntry physicalAddressEntry) { var addressDetail = new ExchangeAddressDetail(physicalAddressEntry.CountryOrRegion, physicalAddressEntry.State, physicalAddressEntry.City); return(GetUniqueKey(addressDetail)); }
private void AddAddressDetails(ICollection <ExchangeAddressDetail> exchangeAddrDetails, Exchange.Contact contact) { foreach (KeyValuePair <Exchange.PhysicalAddressKey, Guid> addresstypeMap in ExchangeAddressDetailsSynchronizer.AddressTypesMap) { Exchange.PhysicalAddressEntry address = ExchangeUtility.SafeGetValue <Exchange.PhysicalAddressKey, Exchange.PhysicalAddressEntry, Exchange.PhysicalAddressEntry>(contact.PhysicalAddresses, addresstypeMap.Key); if (address.IsEmpty()) { exchangeAddrDetails.Add(new ExchangeAddressDetail(address.CountryOrRegion ?? "", address.State ?? "", address.City ?? "")); } } }
/// <summary> /// Checks if <paramref name="item"/> is empty. /// </summary> /// <param name="item"><see cref="Exchange.PhysicalAddressEntry"/> instance.</param> /// <returns><c>True</c> if <paramref name="item"/> is empty, <c>False</c> otherwise.</returns> public static bool IsEmpty(this Exchange.PhysicalAddressEntry item) { return(item != null && !string.IsNullOrEmpty(item.City + item.CountryOrRegion + item.PostalCode + item.State + item.State + item.Street)); }