New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tizen to TargetPlatform #590

Merged
merged 2 commits into from Dec 14, 2016

Conversation

Projects
None yet
6 participants
@rookiejava
Contributor

rookiejava commented Dec 1, 2016

Description of Change

This PR is introduce to Tizen as a TargetPlatform. TargetgetPlatform.Tizen indicates that forms is running on the Tizen Platform.

Bugs Fixed

  • None

API Changes

Added:

  • TargetPlatform.Tizen // enum
  • T OnPlatform.Tizen { get; set; }
  • static void Device.OnPlatform (Action iOS, Action Android, Action WinPhone, Action Default, Action Tizen)
  • static T Device.OnPlatform (T iOS, T Android, T WinPhone, T Tizen)
  • sealed class Xamarin.Forms.PlatformConfiguration.Tizen : IConfigPlatform

Behavioral Changes

  • None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@StephaneDelcroix

there are 2 OnPlatform methods in the Device class as well. those needs to be updated

@rookiejava

This comment has been minimized.

Show comment
Hide comment
@rookiejava

rookiejava Dec 2, 2016

Contributor

I omitted 2 OnPlatform methods on purpose. Could I do a PR seperately? If not, is it OK to create a new API having Tizen parameter as below?

  • public static void OnPlatform (Action iOS, Action Android, Action WinPhone, Action Default, Action Tizen)
  • public static T OnPlatform<T> (T iOS, T Android, T WinPhone, T Tizen)
Contributor

rookiejava commented Dec 2, 2016

I omitted 2 OnPlatform methods on purpose. Could I do a PR seperately? If not, is it OK to create a new API having Tizen parameter as below?

  • public static void OnPlatform (Action iOS, Action Android, Action WinPhone, Action Default, Action Tizen)
  • public static T OnPlatform<T> (T iOS, T Android, T WinPhone, T Tizen)
@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Dec 2, 2016

Member

@rookiejava you can add commits to this PR. Just push them to the same branch.

yes, in the context of this PR, it is ok to add (not change the current method signatures) new OnPlatform methods, and [Obsolete] the old one.

For the compiler to let you do that, you might need to remove the default parameters (the =null parts) on the old signatures. Don't worry, that's not breaking.

Member

StephaneDelcroix commented Dec 2, 2016

@rookiejava you can add commits to this PR. Just push them to the same branch.

yes, in the context of this PR, it is ok to add (not change the current method signatures) new OnPlatform methods, and [Obsolete] the old one.

For the compiler to let you do that, you might need to remove the default parameters (the =null parts) on the old signatures. Don't worry, that's not breaking.

@rookiejava

This comment has been minimized.

Show comment
Hide comment
@rookiejava

rookiejava Dec 2, 2016

Contributor

@StephaneDelcroix OK. Thanks :)

Contributor

rookiejava commented Dec 2, 2016

@StephaneDelcroix OK. Thanks :)

@rookiejava

2 OnPlatform methods in the Device class have been added as well.

@rookiejava

This comment has been minimized.

Show comment
Hide comment
@rookiejava

rookiejava Dec 2, 2016

Contributor

@StephaneDelcroix Done. Anything else?

Contributor

rookiejava commented Dec 2, 2016

@StephaneDelcroix Done. Anything else?

Show outdated Hide outdated Xamarin.Forms.Core/Device.cs
Show outdated Hide outdated Xamarin.Forms.Core/Device.cs
Show outdated Hide outdated Xamarin.Forms.Core/Device.cs
Show outdated Hide outdated Xamarin.Forms.Core/Device.cs
Show outdated Hide outdated Xamarin.Forms.Core/Device.cs
@rookiejava

According to @StephaneDelcroix feedback, I've updated patch.

@StephaneDelcroix StephaneDelcroix referenced this pull request Dec 8, 2016

Merged

Avoid duplicating code in OnPlatform #591

3 of 4 tasks complete

@jassmith jassmith merged commit 1c5de53 into xamarin:master Dec 14, 2016

@rookiejava rookiejava deleted the rookiejava:add-tizen-to-target-platform branch Dec 15, 2016

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment