Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

add new property Location.AltitudeReferenceSystem #1197

Merged
merged 7 commits into from
Apr 6, 2020

Conversation

janusw
Copy link
Contributor

@janusw janusw commented Mar 29, 2020

Description of Change

In order to deal with platform differences of Location.Altitude, this PR adds a new property Location.AltitudeReferenceSystem and a corresponding enum, which is a copy of Windows.Devices.Geolocation.AltitudeReferenceSystem.

Bugs Fixed

API Changes

Added:

  • enum AltitudeReferenceSystem
  • AltitudeReferenceSystem Location.AltitudeReferenceSystem { get; set; }

Changed:

  • None.

Behavioral Changes

Describe any non-bug related behavioral changes that may change how users app behaves when upgrading to this version of the codebase.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

janusw added 3 commits March 28, 2020 21:41
* and a new enum that represents its type
* in order to deal with platform-specific reference systems
* see issue xamarin#1177
* and the new enum AltitudeReferenceSystem
janusw and others added 2 commits March 30, 2020 15:49
* casting from Windows.Devices.Geolocation.AltitudeReferenceSystem to Xamarin.Essentials.AltitudeReferenceSystem
@janusw janusw requested a review from jamesmontemagno March 30, 2020 16:14
@jamesmontemagno
Copy link
Collaborator

Instead of a hard case I would maybe to a little method that does a switch expression over it. Besides that it looks good.

@jamesmontemagno jamesmontemagno added this to the 1.6.0 milestone Mar 30, 2020
@jamesmontemagno jamesmontemagno added the awaiting-review This PR needs to have a set of eyes on it label Mar 30, 2020
* in order to make sure that the cast from Windows.Devices.Geolocation.AltitudeReferenceSystem is valid
@janusw
Copy link
Contributor Author

janusw commented Mar 30, 2020

Instead of a hard case I would maybe to a little method that does a switch expression over it.

Well, in the current state that is certainly not necessary. What you worry about is probably that Windows.Devices.Geolocation.AltitudeReferenceSystem might get extended with additional values in the future? For that case it might be simpler to check with Enum.IsDefined?

@janusw
Copy link
Contributor Author

janusw commented Mar 31, 2020

Instead of a hard case I would maybe to a little method that does a switch expression over it.

Well, in the current state that is certainly not necessary. What you worry about is probably that Windows.Devices.Geolocation.AltitudeReferenceSystem might get extended with additional values in the future? For that case it might be simpler to check with Enum.IsDefined?

I implemented that in c4c4e90. What do you think about it, @jamesmontemagno?

@jamesmontemagno jamesmontemagno changed the base branch from develop to 1.6.0 March 31, 2020 21:10
@jamesmontemagno
Copy link
Collaborator

Did a little modification on what I was talking about. Should be good now.

@janusw
Copy link
Contributor Author

janusw commented Apr 1, 2020

Did a little modification on what I was talking about. Should be good now.

Agree, looks good. Thank you!

@janusw
Copy link
Contributor Author

janusw commented Apr 6, 2020

Ping! @jamesmontemagno, can this be merged?

@jamesmontemagno jamesmontemagno merged commit a195af9 into xamarin:1.6.0 Apr 6, 2020
@janusw janusw deleted the altitude_ref_sys branch April 6, 2020 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting-review This PR needs to have a set of eyes on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants