forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtension.cs
67 lines (52 loc) · 1.72 KB
/
Extension.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;
using Foundation;
namespace Firebase.MLKit.ModelInterpreter {
public partial class ModelInputs {
public bool AddInput (NSData input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
return _AddInput (input, out error);
}
public bool AddInput (NSArray input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
return _AddInput (input, out error);
}
public bool AddInput (NSNumber [] input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
return _AddInput (NSArray.FromNSObjects (input), out error);
}
public bool AddInput (float [] input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
var nsInput = NSArray.FromNSObjects ((i) => NSNumber.FromFloat (i), input);
return _AddInput (nsInput, out error);
}
public bool AddInput (int [] input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
var nsInput = NSArray.FromNSObjects ((i) => NSNumber.FromInt32 (i), input);
return _AddInput (nsInput, out error);
}
public bool AddInput (long [] input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
var nsInput = NSArray.FromNSObjects ((i) => NSNumber.FromLong ((nint)i), input);
return _AddInput (nsInput, out error);
}
public bool AddInput (nuint [] input, out NSError error)
{
if (input == null)
throw new ArgumentNullException (nameof (input));
var nsInput = NSArray.FromNSObjects ((i) => NSNumber.FromNUInt (i), input);
return _AddInput (nsInput, out error);
}
}
}