-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Foundation] Implement Xcode 16.2 beta 1-3 changes. (#21711)
- Loading branch information
1 parent
6640405
commit 509a063
Showing
7 changed files
with
27 additions
and
46 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 |
---|---|---|
@@ -1,43 +1,32 @@ | ||
using System; | ||
using System.ComponentModel; | ||
using System.Reflection; | ||
using System.Collections; | ||
using System.Runtime.InteropServices; | ||
|
||
using ObjCRuntime; | ||
|
||
// Disable until we get around to enable + fix any issues. | ||
#nullable disable | ||
#nullable enable | ||
|
||
namespace Foundation { | ||
public partial class NSBundle : NSObject { | ||
|
||
#if !NET | ||
[Obsolete ("Use 'GetLocalizedString' instead.")] | ||
public virtual string LocalizedString (string key, string value, string table) | ||
public NSString GetLocalizedString (string key, string? value = null, string? table = null) | ||
{ | ||
return (string) GetLocalizedString ((NSString) key, (NSString) value, (NSString) table); | ||
return GetLocalizedString ((NSString) key, (NSString?) value, (NSString?) table); | ||
} | ||
|
||
[Obsolete ("Use 'GetLocalizedString' instead.")] | ||
public string LocalizedString (string key, string comment) | ||
{ | ||
return LocalizedString (key, "", ""); | ||
} | ||
|
||
[Obsolete ("Use 'GetLocalizedString' instead.")] | ||
public string LocalizedString (string key, string val, string table, string comment) | ||
{ | ||
return LocalizedString (key, val, table); | ||
} | ||
#endif | ||
public NSString GetLocalizedString (string key, string value = null, string table = null) | ||
public string [] PathsForResources (string fileExtension) | ||
{ | ||
return GetLocalizedString ((NSString) key, (NSString) value, (NSString) table); | ||
return PathsForResources (fileExtension, null); | ||
} | ||
|
||
public string [] PathsForResources (string fileExtension) | ||
#if !MONOMAC && !XAMCORE_5_0 | ||
[Obsolete ("Do not use this constructor, it does not work as expected.")] | ||
[EditorBrowsable (EditorBrowsableState.Never)] | ||
public NSBundle () | ||
: base (NSObjectFlag.Empty) | ||
{ | ||
return PathsForResources (fileExtension, null); | ||
} | ||
#endif // !MONOMAC && !XAMCORE_5_0 | ||
} | ||
} |
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
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
4 changes: 0 additions & 4 deletions
4
tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Foundation.todo
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
tests/xtro-sharpie/api-annotations-dotnet/iOS-Foundation.todo
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
tests/xtro-sharpie/api-annotations-dotnet/macOS-Foundation.todo
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
tests/xtro-sharpie/api-annotations-dotnet/tvOS-Foundation.todo
This file was deleted.
Oops, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
Sorry, something went wrong.