Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var    placeAddress = new PlaceAddress("Poland", "Warsaw", "Obywatelska", "5", "02-409");
            IPlace place        = new Place();

            place.PlaceId;
            DateTime     dateTime     = DateTime.Now;
            PlacePicture placePicture = new PlacePicture(place, dateTime);
        }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (PlaceName != null ? PlaceName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PlaceAddress != null ? PlaceAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PlaceUrl != null ? PlaceUrl.GetHashCode() : 0);
         return(hashCode);
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (PlaceName != null)
            {
                PlaceName.Dispose();
                PlaceName = null;
            }

            if (PlaceAddress != null)
            {
                PlaceAddress.Dispose();
                PlaceAddress = null;
            }

            if (PlaceDistance != null)
            {
                PlaceDistance.Dispose();
                PlaceDistance = null;
            }

            if (PlaceOpenHours != null)
            {
                PlaceOpenHours.Dispose();
                PlaceOpenHours = null;
            }

            if (PlacePhone != null)
            {
                PlacePhone.Dispose();
                PlacePhone = null;
            }

            if (MapView != null)
            {
                MapView.Dispose();
                MapView = null;
            }
        }
 /// <summary>
 /// Converts place address to a short string which can be displayed in results list.
 /// </summary>
 /// <param name="placeAddress">Place address.</param>
 /// <returns>String with short address.</returns>
 private string AddressToString(PlaceAddress placeAddress)
 {
     return($"{placeAddress.Street} {placeAddress.Building}\n{placeAddress.PostalCode} {placeAddress.City}");
 }