Skip to content

Commit

Permalink
Update based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelkang committed Sep 20, 2021
1 parent d1ce9ff commit b14b8cb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
46 changes: 23 additions & 23 deletions src/Intents/INPerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public partial class INPerson
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
public enum INPersonType {
Me = 0,
ContactSuggestion = 1,
}
#endif //!NET
public enum INPersonType {
Me = 0,
ContactSuggestion = 1,
}

#if !NET
[Introduced (PlatformName.iOS, 15,0)]
Expand All @@ -34,10 +34,10 @@ public enum INPersonType {
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType) :
this (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType, INPersonType.Me)
{
}
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType) :
this (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType, INPersonType.Me)
{
}

#if !NET
[Introduced (PlatformName.iOS, 15,0)]
Expand All @@ -48,20 +48,20 @@ public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameCompon
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType, INPersonType personType) : base (NSObjectFlag.Empty)
{
switch (personType) {
case INPersonType.Me:
InitializeHandle (InitWithMe (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType),
"initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:suggestionType:");
break;
case INPersonType.ContactSuggestion:
InitializeHandle (InitWithContactSuggestion (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType),
"initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isContactSuggestion:suggestionType:");
break;
default:
throw new ArgumentException (nameof (personType));
}
}
{
switch (personType) {
case INPersonType.Me:
InitializeHandle (InitWithMe (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType),
"initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isMe:suggestionType:");
break;
case INPersonType.ContactSuggestion:
InitializeHandle (InitWithContactSuggestion (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType),
"initWithPersonHandle:nameComponents:displayName:image:contactIdentifier:customIdentifier:isContactSuggestion:suggestionType:");
break;
default:
throw new ArgumentException (nameof (personType));
}
}
}
#endif // !TVOS
}
4 changes: 2 additions & 2 deletions src/intents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7516,9 +7516,9 @@ interface INStringResolutionResult {

[Deprecated (PlatformName.iOS, 15, 0)]
[Deprecated (PlatformName.MacCatalyst, 15, 0)]
[Deprecated (PlatformName.MacOSX, 12, 0)]
[Deprecated (PlatformName.WatchOS, 8, 0)]
[iOS (10, 0)]
[NoWatch] // it says it's now NoWatch, but not deprecated? (there was previous watch availability)
[NoMac] // it says it's now NoMac, but not deprecated? (there was previous mac availability)
[NoTV]
[DisableDefaultCtor]
[BaseType (typeof (INIntentResolutionResult))]
Expand Down

0 comments on commit b14b8cb

Please sign in to comment.