-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCollections.cs
117 lines (109 loc) · 3.87 KB
/
Collections.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using System;
using System.Collections;
using System.Collections.Generic;
using JSIL.Meta;
using JSIL.Proxy;
namespace JSIL.Proxies {
[JSProxy(
new[] {
"System.Collections.ArrayList",
"System.Collections.Hashtable",
"System.Collections.Generic.List`1",
"System.Collections.Generic.Dictionary`2",
"System.Collections.Generic.Stack`1",
"System.Collections.Generic.Queue`1",
"System.Collections.Generic.HashSet`1",
"System.Collections.Hashtable/KeyCollection",
"System.Collections.Hashtable/ValueCollection",
"System.Collections.Generic.Dictionary`2/KeyCollection",
"System.Collections.Generic.Dictionary`2/ValueCollection"
},
memberPolicy: JSProxyMemberPolicy.ReplaceNone,
inheritable: false
)]
public abstract class CollectionProxy<T> : IEnumerable {
[JSIsPure]
[JSResultIsNew]
System.Collections.IEnumerator IEnumerable.GetEnumerator () {
throw new InvalidOperationException();
}
[JSIsPure]
[JSResultIsNew]
public AnyType GetEnumerator () {
throw new InvalidOperationException();
}
[JSMutatedArguments()]
public AnyType this[AnyType index] {
[JSEscapingArguments()]
get {
throw new InvalidOperationException();
}
[JSEscapingArguments("value")]
set {
throw new InvalidOperationException();
}
}
}
[JSProxy(
new[] {
"System.Collections.ArrayList",
"System.Collections.Generic.List`1",
"System.Collections.Generic.Stack`1",
"System.Collections.Generic.Queue`1"
},
memberPolicy: JSProxyMemberPolicy.ReplaceNone,
inheritable: true
)]
public abstract class CollectionProxy2<T> : IEnumerable {
[JSUnderlyingArray("_items", "_size")]
System.Collections.IEnumerator IEnumerable.GetEnumerator () {
throw new InvalidOperationException();
}
[JSUnderlyingArray("_items", "_size")]
public AnyType GetEnumerator () {
throw new InvalidOperationException();
}
[JSMutatedArguments()]
public AnyType this[AnyType index] {
[JSEscapingArguments()]
get {
throw new InvalidOperationException();
}
[JSEscapingArguments("value")]
set {
throw new InvalidOperationException();
}
}
}
[JSProxy(
new[] {
"System.Collections.ArrayList/ArrayListEnumerator",
"System.Collections.Hashtable/HashtableEnumerator",
"System.Collections.Generic.List`1/Enumerator",
"System.Collections.Generic.Stack`1/Enumerator",
"System.Collections.Generic.Queue`1/Enumerator",
"System.Collections.Generic.HashSet`1/Enumerator",
"System.Collections.Generic.Dictionary`2/Enumerator",
"System.Collections.Generic.Dictionary`2/KeyCollection/Enumerator",
"System.Collections.Generic.Dictionary`2/ValueCollection/Enumerator"
},
memberPolicy: JSProxyMemberPolicy.ReplaceNone,
inheritable: false
)]
[JSPureDispose]
public abstract class CollectionEnumeratorProxy {
}
[JSProxy(
new[] {
"System.Collections.ArrayList/ArrayListEnumerator",
"System.Collections.Generic.List`1/Enumerator",
"System.Collections.Generic.Stack`1/Enumerator",
"System.Collections.Generic.Queue`1/Enumerator",
},
memberPolicy: JSProxyMemberPolicy.ReplaceNone,
inheritable: false
)]
[JSIsArrayEnumerator("_array", "_index", "_length")]
public abstract class ArrayEnumeratorProxy {
}
}