예제 #1
0
        public static RealmPlace ToRealmPlace(this BasePlace basePlace)
        {
            RealmPlace realmPlace = new RealmPlace
            {
                Address   = basePlace.Address,
                Icon      = basePlace.Icon,
                PlaceId   = basePlace.PlaceId,
                PlaceName = basePlace.PlaceName,
                Position  = new Position
                            (
                    basePlace.Position.Latitude,
                    basePlace.Position.Longitude
                            ),
            };

            return(realmPlace);
        }
예제 #2
0
        public static BasePlace ToBasePlace(this RealmPlace realmPlace)
        {
            BasePlace basePlace = new BasePlace
            {
                Address  = realmPlace.Address,
                Icon     = realmPlace.Icon,
                PlaceId  = realmPlace.PlaceId,
                Position = new Xamarin.Forms.Maps.Position
                           (
                    realmPlace.Position.Latitude,
                    realmPlace.Position.Longitude
                           ),
                PlaceName = realmPlace.PlaceName
            };

            return(basePlace);
        }