forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CarPlay] [Xcode 12] Update through beta 6 (xamarin#9479)
* carplay initial updates through beta 6
- Loading branch information
1 parent
e5e9ff9
commit efe8abd
Showing
9 changed files
with
989 additions
and
275 deletions.
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,50 @@ | ||
// | ||
// CPMessageListItem.cs | ||
// | ||
// Authors: | ||
// Whitney Schmidt <whschm@microsoft.com> | ||
// | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under MIT License. | ||
// | ||
|
||
using System; | ||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
#nullable enable | ||
|
||
namespace CarPlay { | ||
|
||
[NoWatch, NoTV, NoMac, iOS (14,0)] | ||
public enum CPMessageListItemType { | ||
Identifier, | ||
FullName, | ||
} | ||
|
||
public partial class CPMessageListItem { | ||
|
||
public CPMessageListItem (string identifier, string text, CPMessageListItemLeadingConfiguration leadingConfiguration, | ||
CPMessageListItemTrailingConfiguration? trailingConfiguration, string? detailText, string? trailingText) : | ||
this (identifier, text, leadingConfiguration, trailingConfiguration, detailText, trailingText, CPMessageListItemType.Identifier) | ||
{ | ||
} | ||
|
||
public CPMessageListItem (string identifier, string text, CPMessageListItemLeadingConfiguration leadingConfiguration, CPMessageListItemTrailingConfiguration? trailingConfiguration, | ||
string? detailText, string? trailingText, CPMessageListItemType type) : base (NSObjectFlag.Empty) | ||
{ | ||
switch (type) { | ||
case CPMessageListItemType.Identifier: | ||
InitializeHandle (InitWithConversationIdentifier (identifier, text, leadingConfiguration, trailingConfiguration, detailText, trailingText), | ||
"initWithConversationIdentifier:text:leadingConfiguration:trailingConfiguration:detailText:trailingText:"); | ||
break; | ||
case CPMessageListItemType.FullName: | ||
InitializeHandle (InitWithFullName (identifier, text, leadingConfiguration, trailingConfiguration, detailText, trailingText), | ||
"initWithFullName:phoneOrEmailAddress:leadingConfiguration:trailingConfiguration:detailText:trailingText:"); | ||
break; | ||
default: | ||
throw new ArgumentException (nameof (type)); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.