-
Notifications
You must be signed in to change notification settings - Fork 559
Expand file tree
/
Copy pathExtensions.cs
More file actions
63 lines (54 loc) · 1.75 KB
/
Extensions.cs
File metadata and controls
63 lines (54 loc) · 1.75 KB
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
//
// Extensions.cs: C#isms for JavaScriptCore
//
// Authors:
// Aaron Bockover (abock@xamarin.com)
//
// Copyright 2013 Xamarin, Inc.
#nullable enable
namespace JavaScriptCore {
public partial class JSContext {
public JSValue this [NSObject key] {
get { return _GetObject (key); }
set { _SetObject (value, key); }
}
}
public partial class JSValue {
/// <summary>Returns a string representation of the value of the current instance.</summary>
/// <returns>
/// </returns>
/// <remarks>
/// </remarks>
public override string ToString ()
{
return _ToString ();
}
/// <param name="value">To be added.</param>
/// <param name="context">To be added.</param>
/// <summary>Creates a JavaScript string from the provided string.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
static public JSValue From (string value, JSContext context)
{
using (var str = new NSString (value)) {
return From ((NSObject) str, context);
}
}
/// <param name="index">To be added.</param>
/// <summary>Gets or sets the item that is indexed by the provided <paramref name="index" />.</summary>
/// <value>To be added.</value>
/// <remarks>To be added.</remarks>
public JSValue this [nuint index] {
get { return _ObjectAtIndexedSubscript (index); }
set { _SetObject (value, index); }
}
/// <param name="key">To be added.</param>
/// <summary>Gets or sets the item that is indexed by the provided <paramref name="key" />.</summary>
/// <value>To be added.</value>
/// <remarks>To be added.</remarks>
public JSValue this [NSObject key] {
get { return _ObjectForKeyedSubscript (key); }
set { _SetObject (value, key); }
}
}
}