Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/CoreML/MLModelCollection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.ComponentModel;

#nullable enable

namespace CoreML;

#if !XAMCORE_5_0 && !__TVOS__
partial class MLModelCollection : NSObject {
Comment thread
rolfbjarne marked this conversation as resolved.
Resolved
/// <summary>This property always returns <see langword="null" />.</summary>
[EditorBrowsable (EditorBrowsableState.Never)]
[Obsolete ("This property always returns null.")]
public static NSString? DidChangeNotification {
get {
return null;
}
}

Comment thread
rolfbjarne marked this conversation as resolved.
Resolved
public static partial class Notifications {
/// <summary>This method does nothing, and only returns a placeholder instance.</summary>
[EditorBrowsable (EditorBrowsableState.Never)]
[Obsolete ("This method does nothing.")]
public static NSObject ObserveDidChange (EventHandler<NSNotificationEventArgs> handler)
{
return new NSObject ();
}

/// <summary>This method does nothing, and only returns a placerholder instance.</summary>
[EditorBrowsable (EditorBrowsableState.Never)]
[Obsolete ("This method does nothing.")]
public static NSObject ObserveDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
return new NSObject ();
Comment thread
rolfbjarne marked this conversation as resolved.
Resolved
}
}
}
#endif // !XAMCORE_5_0 && !__TVOS__

4 changes: 0 additions & 4 deletions src/coreml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1609,10 +1609,6 @@ interface MLModelCollection {
[Async]
[Export ("endAccessingModelCollectionWithIdentifier:completionHandler:")]
void EndAccessingModelCollection (string identifier, Action<bool, NSError> completionHandler);

[Notification]
[Field ("MLModelCollectionDidChangeNotification")]
NSString DidChangeNotification { get; }
}
#endif // !XAMCORE_5_0

Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ COREMIDI_SOURCES = \
COREML_SOURCES = \
CoreML/MLDictionaryFeatureProvider.cs \
CoreML/MLModel.cs \
CoreML/MLModelCollection.cs \
CoreML/MLMultiArray.cs \
CoreML/MLMultiArrayConstraint.cs \

Expand Down
1 change: 1 addition & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29013,6 +29013,7 @@ T:CoreML.MLModelAsset
T:CoreML.MLModelAssetGetFunctionNamesCompletionHandler
T:CoreML.MLModelAssetGetModelDescriptionCompletionHandler
T:CoreML.MLModelCollection
T:CoreML.MLModelCollection.Notifications
Comment thread
rolfbjarne marked this conversation as resolved.
Resolved
T:CoreML.MLModelCollectionEntry
T:CoreML.MLModelConfiguration
T:CoreML.MLModelStructure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# These types are marked as unavailable in the headers if the min OS version is >= Xcode 16's OS versions, so xtro doesn't detect them as available.
# We're removing them in XAMCORE_5_0.
!unknown-field! MLModelCollectionDidChangeNotification bound
!unknown-type! MLModelCollection bound
!unknown-type! MLModelCollectionEntry bound
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# These types are marked as unavailable in the headers if the min OS version is >= Xcode 16's OS versions, so xtro doesn't detect them as available.
# We're removing them in XAMCORE_5_0.
!unknown-field! MLModelCollectionDidChangeNotification bound
!unknown-type! MLModelCollection bound
!unknown-type! MLModelCollectionEntry bound
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# These types are marked as unavailable in the headers if the min OS version is >= Xcode 16's OS versions, so xtro doesn't detect them as available.
# We're removing them in XAMCORE_5_0.
!unknown-field! MLModelCollectionDidChangeNotification bound
!unknown-type! MLModelCollection bound
!unknown-type! MLModelCollectionEntry bound
Loading