示例#1
0
        public static INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired(INWorkoutGoalUnitType valueToConfirm)
        {
#if IOS
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
#elif WATCH
            if (WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion(4, 0))
#endif
            { return(ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm(valueToConfirm)); }
            else
            {
                return(ConfirmationRequiredWithValueToConfirm(valueToConfirm));
            }
        }
示例#2
0
        public static INWorkoutGoalUnitTypeResolutionResult GetSuccess(INWorkoutGoalUnitType resolvedValue)
        {
#if IOS
            if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0))
#elif WATCH
            if (WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion(4, 0))
#endif
            { return(SuccessWithResolvedWorkoutGoalUnitType(resolvedValue)); }
            else
            {
                return(SuccessWithResolvedValue(resolvedValue));
            }
        }
        public static INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired(INWorkoutGoalUnitType valueToConfirm)
        {
#if IOS
            if (SystemVersion.CheckiOS(11, 0))
#elif WATCH
            if (SystemVersion.CheckwatchOS(4, 0))
#endif
            { return(ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm(valueToConfirm)); }
            else
            {
                return(ConfirmationRequiredWithValueToConfirm(valueToConfirm));
            }
        }
        public static INWorkoutGoalUnitTypeResolutionResult GetSuccess(INWorkoutGoalUnitType resolvedValue)
        {
#if IOS
            if (SystemVersion.CheckiOS(11, 0))
#elif WATCH
            if (SystemVersion.CheckwatchOS(4, 0))
#endif
            { return(SuccessWithResolvedWorkoutGoalUnitType(resolvedValue)); }
            else
            {
                return(SuccessWithResolvedValue(resolvedValue));
            }
        }
 public INStartWorkoutIntent(INSpeakableString workoutName, NSNumber goalValue, INWorkoutGoalUnitType workoutGoalUnitType, INWorkoutLocationType workoutLocationType, bool?isOpenEnded) :
     this(workoutName, goalValue, workoutGoalUnitType, workoutLocationType, isOpenEnded.HasValue ? new NSNumber(isOpenEnded.Value) : null)
 {
 }