-
Notifications
You must be signed in to change notification settings - Fork 514
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
[Intents] Add bindings for Xcode 9 Beta 1, 2, 3, 4 & 5 #2493
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// INBillTypeResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 && !MONOMAC | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INBillTypeResolutionResult { | ||
|
||
public static INBillTypeResolutionResult GetSuccess (INBillType resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return SuccessWithResolvedBillType (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INBillTypeResolutionResult GetConfirmationRequired (INBillType valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// INCallRecord.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INCallRecord { | ||
|
||
public double? CallDuration { | ||
get { return WeakCallDuration?.DoubleValue; } | ||
} | ||
|
||
public bool? Unseen { | ||
get { return WeakUnseen?.BoolValue; } | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// INCallRecordTypeResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INCallRecordTypeResolutionResult { | ||
|
||
public static INCallRecordTypeResolutionResult GetSuccess (INCallRecordType resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#elif MONOMAC | ||
if (PlatformHelper.CheckSystemVersion (10, 13)) | ||
#endif | ||
return SuccessWithResolvedCallRecordType (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRecordType valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#elif MONOMAC | ||
if (PlatformHelper.CheckSystemVersion (10, 13)) | ||
#endif | ||
return ConfirmationRequiredWithCallRecordTypeToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// INCarAirCirculationModeResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 && !MONOMAC | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INCarAirCirculationModeResolutionResult { | ||
|
||
public static INCarAirCirculationModeResolutionResult GetSuccess (INCarAirCirculationMode resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return SuccessWithResolvedCarAirCirculationMode (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INCarAirCirculationModeResolutionResult GetConfirmationRequired (INCarAirCirculationMode valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return ConfirmationRequiredWithCarAirCirculationModeToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// INCarAudioSourceResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 && !MONOMAC | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INCarAudioSourceResolutionResult { | ||
|
||
public static INCarAudioSourceResolutionResult GetSuccess (INCarAudioSource resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return SuccessWithResolvedCarAudioSource (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INCarAudioSourceResolutionResult GetConfirmationRequired (INCarAudioSource valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return ConfirmationRequiredWithCarAudioSourceToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// INCarDefrosterResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 && !MONOMAC | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INCarDefrosterResolutionResult { | ||
|
||
public static INCarDefrosterResolutionResult GetSuccess (INCarDefroster resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return SuccessWithResolvedCarDefroster (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INCarDefrosterResolutionResult GetConfirmationRequired (INCarDefroster valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return ConfirmationRequiredWithCarDefrosterToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// INCarAirCirculationModeResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 && !MONOMAC | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INCarSignalOptionsResolutionResult { | ||
|
||
public static INCarSignalOptionsResolutionResult GetSuccess (INCarSignalOptions resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return SuccessWithResolvedCarSignalOptions (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INCarSignalOptionsResolutionResult GetConfirmationRequired (INCarSignalOptions valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#endif | ||
return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// INInteraction.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 && !MONOMAC | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INInteraction { | ||
|
||
public T GetParameterValue<T> (INParameter parameter) where T : NSObject | ||
{ | ||
return Runtime.GetNSObject<T> (_GetParameterValue (parameter)); | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// INMessageAttributeOptionsResolutionResult.cs | ||
// | ||
// Authors: | ||
// Alex Soto <alexsoto@microsoft.com> | ||
// | ||
// Copyright 2017 Xamarin Inc. All rights reserved. | ||
// | ||
|
||
#if XAMCORE_2_0 | ||
using System; | ||
using XamCore.Foundation; | ||
using XamCore.ObjCRuntime; | ||
|
||
namespace XamCore.Intents { | ||
public partial class INMessageAttributeOptionsResolutionResult { | ||
|
||
public static INMessageAttributeOptionsResolutionResult GetSuccess (INMessageAttributeOptions resolvedValue) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#elif MONOMAC | ||
if (PlatformHelper.CheckSystemVersion (10, 13)) | ||
#endif | ||
return SuccessWithResolvedMessageAttributeOptions (resolvedValue); | ||
else | ||
return SuccessWithResolvedValue (resolvedValue); | ||
} | ||
|
||
public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired (INMessageAttributeOptions valueToConfirm) | ||
{ | ||
#if IOS | ||
if (XamCore.UIKit.UIDevice.CurrentDevice.CheckSystemVersion (11, 0)) | ||
#elif WATCH | ||
if (XamCore.WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (4, 0)) | ||
#elif MONOMAC | ||
if (PlatformHelper.CheckSystemVersion (10, 13)) | ||
#endif | ||
return ConfirmationRequiredWithMessageAttributeOptionsToConfirm (valueToConfirm); | ||
else | ||
return ConfirmationRequiredWithValueToConfirm (valueToConfirm); | ||
} | ||
} | ||
} | ||
#endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a recurring pattern in the PR. Maybe move this to a Xcode check ? (like the tests) that can be re-used. It would reduce the number of
#if\elif|endif
across the sources.