168 references to JSTypeFlags
Microsoft.Interop.JavaScript.JSImportGenerator (168)
JSGeneratorFactory.cs (158)
45
case { TypeInfo: JSSimpleTypeInfo(KnownManagedType.Void), JSType:
JSTypeFlags
.DiscardNoWait }:
47
case { TypeInfo: JSSimpleTypeInfo(KnownManagedType.Void), JSType:
JSTypeFlags
.Discard }:
48
case { TypeInfo: JSSimpleTypeInfo(KnownManagedType.Void), JSType:
JSTypeFlags
.Void }:
49
case { TypeInfo: JSSimpleTypeInfo(KnownManagedType.Void), JSType:
JSTypeFlags
.None }:
50
case { TypeInfo: JSSimpleTypeInfo(KnownManagedType.Void), JSType:
JSTypeFlags
.Missing }:
51
return ResolvedGenerator.Resolved(new VoidGenerator(info, context, jsMarshalingInfo.JSType ==
JSTypeFlags
.Void ? MarshalerType.Void : MarshalerType.Discard));
54
case { JSType:
JSTypeFlags
.Discard }:
58
case { JSType:
JSTypeFlags
.DiscardNoWait }:
63
return Create(info, context, isToJs, simple.KnownType, [], jsMarshalingInfo.JSType, Array.Empty<
JSTypeFlags
>(), fail);
96
internal static ResolvedGenerator Create(TypePositionInfo info, StubCodeContext context, bool isToJs, KnownManagedType marshaledType, KnownManagedType[] argumentTypes,
JSTypeFlags
jsType,
JSTypeFlags
[] jsTypeArguments, Func<string, ResolvedGenerator> failWithReason)
101
case KnownManagedType.Boolean when jsType ==
JSTypeFlags
.Boolean: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Boolean));
102
case KnownManagedType.Byte when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Byte));
103
case KnownManagedType.Char when jsType ==
JSTypeFlags
.String: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Char));
104
case KnownManagedType.Int16 when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Int16));
105
case KnownManagedType.Int32 when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Int32));
106
case KnownManagedType.Int64 when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Int52));
107
case KnownManagedType.Int64 when jsType ==
JSTypeFlags
.BigInt: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.BigInt64));
108
case KnownManagedType.Single when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Single));
109
case KnownManagedType.Double when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Double));
110
case KnownManagedType.IntPtr when jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.IntPtr));
111
case KnownManagedType.DateTime when jsType ==
JSTypeFlags
.Date: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.DateTime));
112
case KnownManagedType.DateTimeOffset when jsType ==
JSTypeFlags
.Date: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.DateTimeOffset));
113
case KnownManagedType.Exception when jsType ==
JSTypeFlags
.Error: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Exception));
114
case KnownManagedType.JSObject when jsType ==
JSTypeFlags
.Object: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.JSObject));
115
case KnownManagedType.String when jsType ==
JSTypeFlags
.String: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.String));
116
case KnownManagedType.Object when jsType ==
JSTypeFlags
.Any: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Object));
119
case KnownManagedType.Boolean when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Boolean));
120
case KnownManagedType.Byte when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Byte));
121
case KnownManagedType.Char when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Char));
122
case KnownManagedType.Int16 when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Int16));
123
case KnownManagedType.Int32 when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Int32));
124
case KnownManagedType.Single when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Single));
125
case KnownManagedType.Double when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Double));
126
case KnownManagedType.IntPtr when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.IntPtr));
127
case KnownManagedType.Exception when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.Exception));
128
case KnownManagedType.JSObject when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.JSObject));
129
case KnownManagedType.String when jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new PrimitiveJSGenerator(info, context, MarshalerType.String));
132
case KnownManagedType.Int64 when jsType ==
JSTypeFlags
.Missing:
133
case KnownManagedType.DateTime when jsType ==
JSTypeFlags
.Missing:
134
case KnownManagedType.DateTimeOffset when jsType ==
JSTypeFlags
.Missing:
135
case KnownManagedType.Object when jsType ==
JSTypeFlags
.Missing:
139
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Boolean && jsType ==
JSTypeFlags
.Boolean: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Boolean));
140
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Byte && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Byte));
141
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Char && jsType ==
JSTypeFlags
.String: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Byte));
142
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int16 && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Int16));
143
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int32 && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Int32));
144
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int64 && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Int52));
145
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int64 && jsType ==
JSTypeFlags
.BigInt: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.BigInt64));
146
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Double && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Double));
147
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Single && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Single));
148
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.IntPtr && jsType ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.IntPtr));
149
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.DateTime && jsType ==
JSTypeFlags
.Date: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.DateTime));
150
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.DateTimeOffset && jsType ==
JSTypeFlags
.Date: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.DateTimeOffset));
153
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Boolean && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Boolean));
154
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Byte && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Byte));
155
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Char && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Byte));
156
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int16 && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Int16));
157
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int32 && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Int32));
158
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Single && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Single));
159
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Double && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.Double));
160
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.IntPtr && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new NullableJSGenerator(info, context, MarshalerType.IntPtr));
163
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.Int64 && jsType ==
JSTypeFlags
.Missing:
164
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.DateTime && jsType ==
JSTypeFlags
.Missing:
165
case KnownManagedType.Nullable when argumentTypes[0] == KnownManagedType.DateTimeOffset && jsType ==
JSTypeFlags
.Missing:
172
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes.Length == 0 && jsTypeArguments[0] ==
JSTypeFlags
.Void: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Void));
173
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Byte && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Byte));
174
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Boolean && jsTypeArguments[0] ==
JSTypeFlags
.Boolean: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Boolean));
175
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Char && jsTypeArguments[0] ==
JSTypeFlags
.String: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Char));
176
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Int16 && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Int16));
177
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Int32 && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Int32));
178
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Int64 && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Int52));
179
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Int64 && jsTypeArguments[0] ==
JSTypeFlags
.BigInt: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.BigInt64));
180
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.IntPtr && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.IntPtr));
181
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Double && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Double));
182
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Single && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Single));
183
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.JSObject && jsTypeArguments[0] ==
JSTypeFlags
.Object: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.JSObject));
184
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.String && jsTypeArguments[0] ==
JSTypeFlags
.String: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.String));
185
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Exception && jsTypeArguments[0] ==
JSTypeFlags
.Error: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Exception));
186
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.DateTime && jsTypeArguments[0] ==
JSTypeFlags
.Date: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.DateTime));
187
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.DateTimeOffset && jsTypeArguments[0] ==
JSTypeFlags
.Date: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.DateTimeOffset));
188
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Object && jsTypeArguments[0] ==
JSTypeFlags
.Any: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Object));
191
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Missing && argumentTypes.Length == 0: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Void));
192
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Boolean && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Boolean));
193
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Byte && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Byte));
194
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Char && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Char));
195
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Int16 && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Int16));
196
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Int32 && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Int32));
197
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Single && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Single));
198
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Double && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Double));
199
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.IntPtr && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.IntPtr));
200
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.JSObject && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.JSObject));
201
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.String && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.String));
202
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Exception && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new TaskJSGenerator(info, context, MarshalerType.Exception));
205
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Int64 && jsType ==
JSTypeFlags
.Missing:
206
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.DateTime && jsType ==
JSTypeFlags
.Missing:
207
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.DateTimeOffset && jsType ==
JSTypeFlags
.Missing:
208
case KnownManagedType.Task when argumentTypes[0] == KnownManagedType.Object && jsType ==
JSTypeFlags
.Missing:
211
case KnownManagedType.Task when jsType ==
JSTypeFlags
.Promise && jsTypeArguments.Length == 1:
215
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Byte && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Byte));
216
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.String && jsTypeArguments[0] ==
JSTypeFlags
.String: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.String));
217
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Double && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Double));
218
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Int32 && jsTypeArguments[0] ==
JSTypeFlags
.Number: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Int32));
219
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.JSObject && jsTypeArguments[0] ==
JSTypeFlags
.Object: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.JSObject));
220
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1 && argumentTypes[0] == KnownManagedType.Object && jsTypeArguments[0] ==
JSTypeFlags
.Any: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Object));
223
case KnownManagedType.Array when argumentTypes[0] == KnownManagedType.Byte && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Byte));
224
case KnownManagedType.Array when argumentTypes[0] == KnownManagedType.String && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.String));
225
case KnownManagedType.Array when argumentTypes[0] == KnownManagedType.Double && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Double));
226
case KnownManagedType.Array when argumentTypes[0] == KnownManagedType.Int32 && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.Int32));
227
case KnownManagedType.Array when argumentTypes[0] == KnownManagedType.JSObject && jsType ==
JSTypeFlags
.Missing: return ResolvedGenerator.Resolved(new ArrayJSGenerator(info, context, MarshalerType.JSObject));
228
case KnownManagedType.Array when jsType ==
JSTypeFlags
.Array && jsTypeArguments.Length == 1:
232
case KnownManagedType.Array when argumentTypes[0] == KnownManagedType.Object && jsType ==
JSTypeFlags
.Missing:
236
case KnownManagedType.Span when jsType ==
JSTypeFlags
.MemoryView && jsTypeArguments.Length != 0:
238
case KnownManagedType.Span when jsType ==
JSTypeFlags
.MemoryView && argumentTypes[0] == KnownManagedType.Byte: return ResolvedGenerator.Resolved(new SpanJSGenerator(info, context, MarshalerType.Byte));
239
case KnownManagedType.Span when jsType ==
JSTypeFlags
.MemoryView && argumentTypes[0] == KnownManagedType.Int32: return ResolvedGenerator.Resolved(new SpanJSGenerator(info, context, MarshalerType.Int32));
240
case KnownManagedType.Span when jsType ==
JSTypeFlags
.MemoryView && argumentTypes[0] == KnownManagedType.Double: return ResolvedGenerator.Resolved(new SpanJSGenerator(info, context, MarshalerType.Double));
242
case KnownManagedType.Span when jsType ==
JSTypeFlags
.MemoryView:
246
case KnownManagedType.Span when argumentTypes[0] == KnownManagedType.Byte && jsType ==
JSTypeFlags
.Missing:
247
case KnownManagedType.Span when argumentTypes[0] == KnownManagedType.Int32 && jsType ==
JSTypeFlags
.Missing:
248
case KnownManagedType.Span when argumentTypes[0] == KnownManagedType.Double && jsType ==
JSTypeFlags
.Missing:
252
case KnownManagedType.ArraySegment when jsType ==
JSTypeFlags
.MemoryView && jsTypeArguments.Length != 0:
254
case KnownManagedType.ArraySegment when jsType ==
JSTypeFlags
.MemoryView && argumentTypes[0] == KnownManagedType.Byte: return ResolvedGenerator.Resolved(new ArraySegmentJSGenerator(info, context, MarshalerType.Byte));
255
case KnownManagedType.ArraySegment when jsType ==
JSTypeFlags
.MemoryView && argumentTypes[0] == KnownManagedType.Int32: return ResolvedGenerator.Resolved(new ArraySegmentJSGenerator(info, context, MarshalerType.Int32));
256
case KnownManagedType.ArraySegment when jsType ==
JSTypeFlags
.MemoryView && argumentTypes[0] == KnownManagedType.Double: return ResolvedGenerator.Resolved(new ArraySegmentJSGenerator(info, context, MarshalerType.Double));
257
case KnownManagedType.ArraySegment when jsType ==
JSTypeFlags
.MemoryView:
261
case KnownManagedType.ArraySegment when argumentTypes[0] == KnownManagedType.Byte && jsType ==
JSTypeFlags
.Missing:
262
case KnownManagedType.ArraySegment when argumentTypes[0] == KnownManagedType.Int32 && jsType ==
JSTypeFlags
.Missing:
263
case KnownManagedType.ArraySegment when argumentTypes[0] == KnownManagedType.Double && jsType ==
JSTypeFlags
.Missing:
267
case KnownManagedType.Function when jsType ==
JSTypeFlags
.Function && jsTypeArguments.Length == argumentTypes.Length:
268
case KnownManagedType.Action when jsType ==
JSTypeFlags
.Function && jsTypeArguments.Length == argumentTypes.Length:
284
var gen = Create(info, context, isToJs ^ (!isReturn), argumentTypes[i], Array.Empty<KnownManagedType>(), jsTypeArguments[i], Array.Empty<
JSTypeFlags
>(), failWithReason);
294
case KnownManagedType.Action when jsType ==
JSTypeFlags
.Function:
295
case KnownManagedType.Function when jsType ==
JSTypeFlags
.Function:
299
case KnownManagedType.Function when jsType ==
JSTypeFlags
.Missing:
300
case KnownManagedType.Action when jsType ==
JSTypeFlags
.Missing:
JSMarshalAsAttributeInfoParser.cs (7)
24
JSTypeFlags
jsType =
JSTypeFlags
.None;
25
List<
JSTypeFlags
> jsTypeArguments = new List<
JSTypeFlags
>();
38
JSTypeFlags
jsTypeArg =
JSTypeFlags
.None;
50
if (jsType ==
JSTypeFlags
.None)
JSMarshallingInfo.cs (3)
17
public
JSTypeFlags
JSType { get; init; }
18
public
JSTypeFlags
[] JSTypeArguments { get; init; }
25
JSType =
JSTypeFlags
.Missing;