@@ -33,36 +33,37 @@ internal class RemoteValueConverter : JsonConverter<RemoteValue>
33
33
34
34
if ( jsonDocument . RootElement . ValueKind == JsonValueKind . String )
35
35
{
36
- return new RemoteValue . String ( jsonDocument . RootElement . GetString ( ) ! ) ;
36
+ return new StringRemoteValue ( jsonDocument . RootElement . GetString ( ) ! ) ;
37
37
}
38
38
39
39
return jsonDocument . RootElement . GetProperty ( "type" ) . ToString ( ) switch
40
40
{
41
- "number" => jsonDocument . Deserialize < RemoteValue . Number > ( options ) ,
42
- "boolean" => jsonDocument . Deserialize < RemoteValue . Boolean > ( options ) ,
43
- "string" => jsonDocument . Deserialize < RemoteValue . String > ( options ) ,
44
- "null" => jsonDocument . Deserialize < RemoteValue . Null > ( options ) ,
45
- "undefined" => jsonDocument . Deserialize < RemoteValue . Undefined > ( options ) ,
46
- "symbol" => jsonDocument . Deserialize < RemoteValue . Symbol > ( options ) ,
47
- "array" => jsonDocument . Deserialize < RemoteValue . Array > ( options ) ,
48
- "object" => jsonDocument . Deserialize < RemoteValue . Object > ( options ) ,
49
- "function" => jsonDocument . Deserialize < RemoteValue . Function > ( options ) ,
50
- "regexp" => jsonDocument . Deserialize < RemoteValue . RegExp > ( options ) ,
51
- "date" => jsonDocument . Deserialize < RemoteValue . Date > ( options ) ,
52
- "map" => jsonDocument . Deserialize < RemoteValue . Map > ( options ) ,
53
- "set" => jsonDocument . Deserialize < RemoteValue . Set > ( options ) ,
54
- "weakmap" => jsonDocument . Deserialize < RemoteValue . WeakMap > ( options ) ,
55
- "weakset" => jsonDocument . Deserialize < RemoteValue . WeakSet > ( options ) ,
56
- "generator" => jsonDocument . Deserialize < RemoteValue . Generator > ( options ) ,
57
- "error" => jsonDocument . Deserialize < RemoteValue . Error > ( options ) ,
58
- "proxy" => jsonDocument . Deserialize < RemoteValue . Proxy > ( options ) ,
59
- "promise" => jsonDocument . Deserialize < RemoteValue . Promise > ( options ) ,
60
- "typedarray" => jsonDocument . Deserialize < RemoteValue . TypedArray > ( options ) ,
61
- "arraybuffer" => jsonDocument . Deserialize < RemoteValue . ArrayBuffer > ( options ) ,
62
- "nodelist" => jsonDocument . Deserialize < RemoteValue . NodeList > ( options ) ,
63
- "htmlcollection" => jsonDocument . Deserialize < RemoteValue . HtmlCollection > ( options ) ,
64
- "node" => jsonDocument . Deserialize < RemoteValue . Node > ( options ) ,
65
- "window" => jsonDocument . Deserialize < RemoteValue . WindowProxy > ( options ) ,
41
+ "number" => jsonDocument . Deserialize < NumberRemoteValue > ( options ) ,
42
+ "boolean" => jsonDocument . Deserialize < BooleanRemoteValue > ( options ) ,
43
+ "bigint" => jsonDocument . Deserialize < BigIntRemoteValue > ( options ) ,
44
+ "string" => jsonDocument . Deserialize < StringRemoteValue > ( options ) ,
45
+ "null" => jsonDocument . Deserialize < NullRemoteValue > ( options ) ,
46
+ "undefined" => jsonDocument . Deserialize < UndefinedRemoteValue > ( options ) ,
47
+ "symbol" => jsonDocument . Deserialize < SymbolRemoteValue > ( options ) ,
48
+ "array" => jsonDocument . Deserialize < ArrayRemoteValue > ( options ) ,
49
+ "object" => jsonDocument . Deserialize < ObjectRemoteValue > ( options ) ,
50
+ "function" => jsonDocument . Deserialize < FunctionRemoteValue > ( options ) ,
51
+ "regexp" => jsonDocument . Deserialize < RegExpRemoteValue > ( options ) ,
52
+ "date" => jsonDocument . Deserialize < DateRemoteValue > ( options ) ,
53
+ "map" => jsonDocument . Deserialize < MapRemoteValue > ( options ) ,
54
+ "set" => jsonDocument . Deserialize < SetRemoteValue > ( options ) ,
55
+ "weakmap" => jsonDocument . Deserialize < WeakMapRemoteValue > ( options ) ,
56
+ "weakset" => jsonDocument . Deserialize < WeakSetRemoteValue > ( options ) ,
57
+ "generator" => jsonDocument . Deserialize < GeneratorRemoteValue > ( options ) ,
58
+ "error" => jsonDocument . Deserialize < ErrorRemoteValue > ( options ) ,
59
+ "proxy" => jsonDocument . Deserialize < ProxyRemoteValue > ( options ) ,
60
+ "promise" => jsonDocument . Deserialize < PromiseRemoteValue > ( options ) ,
61
+ "typedarray" => jsonDocument . Deserialize < TypedArrayRemoteValue > ( options ) ,
62
+ "arraybuffer" => jsonDocument . Deserialize < ArrayBufferRemoteValue > ( options ) ,
63
+ "nodelist" => jsonDocument . Deserialize < NodeListRemoteValue > ( options ) ,
64
+ "htmlcollection" => jsonDocument . Deserialize < HtmlCollectionRemoteValue > ( options ) ,
65
+ "node" => jsonDocument . Deserialize < NodeRemoteValue > ( options ) ,
66
+ "window" => jsonDocument . Deserialize < WindowProxyRemoteValue > ( options ) ,
66
67
_ => null ,
67
68
} ;
68
69
}
0 commit comments