diff --git a/src/CoreML/MLDictionaryFeatureProvider.cs b/src/CoreML/MLDictionaryFeatureProvider.cs index 4665135b235f..b426a8d4395a 100644 --- a/src/CoreML/MLDictionaryFeatureProvider.cs +++ b/src/CoreML/MLDictionaryFeatureProvider.cs @@ -18,7 +18,7 @@ public partial class MLDictionaryFeatureProvider { [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] public MLFeatureValue this [string featureName] { - get { return ObjectForKeyedSubscript (featureName); } + get { return GetFeatureValue (featureName); } } } } diff --git a/src/CoreML/MLMultiArray.cs b/src/CoreML/MLMultiArray.cs index f578365f9ed0..a5c25be373f4 100644 --- a/src/CoreML/MLMultiArray.cs +++ b/src/CoreML/MLMultiArray.cs @@ -18,13 +18,13 @@ public partial class MLMultiArray { [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] public NSNumber this [nint idx] { - get { return ObjectAtIndexedSubscript (idx); } + get { return GetObjectAtIndexedSubscript (idx); } set { SetObject (value, idx); } } [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] public NSNumber this [NSNumber [] key] { - get { return ObjectForKeyedSubscript (key); } + get { return GetObjectForKeyedSubscript (key); } set { SetObject (value, key); } } } diff --git a/src/coreml.cs b/src/coreml.cs index a761adf808d7..ff5ed40a6d2c 100644 --- a/src/coreml.cs +++ b/src/coreml.cs @@ -59,10 +59,6 @@ interface MLDictionaryFeatureProvider : MLFeatureProvider { [Export ("initWithDictionary:error:")] IntPtr Constructor (NSDictionary dictionary, out NSError error); - - [Export ("objectForKeyedSubscript:")] - [return: NullAllowed] - MLFeatureValue ObjectForKeyedSubscript (string featureName); } [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] @@ -157,7 +153,7 @@ interface MLFeatureValue : NSCopying { MLFeatureValue FromDictionary (NSDictionary value, out NSError error); [Export ("isEqualToFeatureValue:")] - bool IsEqualTo (MLFeatureValue value); + bool IsEqual (MLFeatureValue value); } [Watch (4,0), TV (11,0), Mac (10,13, onlyOn64: true), iOS (11,0)] @@ -258,10 +254,10 @@ interface MLMultiArray { // From MLMultiArray (NSNumberDataAccess) Category [Export ("objectAtIndexedSubscript:")] - NSNumber ObjectAtIndexedSubscript (nint idx); + NSNumber GetObjectAtIndexedSubscript (nint idx); [Export ("objectForKeyedSubscript:")] - NSNumber ObjectForKeyedSubscript (NSNumber [] key); + NSNumber GetObjectForKeyedSubscript (NSNumber [] key); [Export ("setObject:atIndexedSubscript:")] void SetObject (NSNumber obj, nint idx); diff --git a/tests/xtro-sharpie/common.pending b/tests/xtro-sharpie/common.pending index ca4145edfd70..a429e4757e49 100644 --- a/tests/xtro-sharpie/common.pending +++ b/tests/xtro-sharpie/common.pending @@ -648,4 +648,9 @@ !incorrect-protocol-member! MDLObjectContainerComponent::objectAtIndexedSubscript: is REQUIRED and should be abstract !incorrect-protocol-member! MDLTransformComponent::keyTimes is REQUIRED and should be abstract !incorrect-protocol-member! MDLTransformComponent::resetsTransform is REQUIRED and should be abstract -!incorrect-protocol-member! MDLTransformComponent::setResetsTransform: is REQUIRED and should be abstract \ No newline at end of file +!incorrect-protocol-member! MDLTransformComponent::setResetsTransform: is REQUIRED and should be abstract + +# CoreML +## we do not have NSFastEnumeration and decided to not bind objectForKeyedSubscript using a local method instead +!missing-protocol-conformance! MLDictionaryFeatureProvider should conform to NSFastEnumeration +!missing-selector! MLDictionaryFeatureProvider::objectForKeyedSubscript: not bound \ No newline at end of file