@@ -33,36 +33,37 @@ internal class RemoteValueConverter : JsonConverter<RemoteValue>
3333
3434 if ( jsonDocument . RootElement . ValueKind == JsonValueKind . String )
3535 {
36- return new RemoteValue . String ( jsonDocument . RootElement . GetString ( ) ! ) ;
36+ return RemoteValue . String ( jsonDocument . RootElement . GetString ( ) ) ;
3737 }
3838
3939 return jsonDocument . RootElement . GetProperty ( "type" ) . ToString ( ) switch
4040 {
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 < RemoteNumberValue > ( options ) ,
42+ "boolean" => jsonDocument . Deserialize < RemoteBooleanValue > ( options ) ,
43+ "bigint" => jsonDocument . Deserialize < RemoteBigIntValue > ( options ) ,
44+ "string" => jsonDocument . Deserialize < RemoteStringValue > ( options ) ,
45+ "null" => jsonDocument . Deserialize < RemoteNullValue > ( options ) ,
46+ "undefined" => jsonDocument . Deserialize < RemoteUndefinedValue > ( options ) ,
47+ "symbol" => jsonDocument . Deserialize < RemoteSymbolValue > ( options ) ,
48+ "array" => jsonDocument . Deserialize < RemoteArrayValue > ( options ) ,
49+ "object" => jsonDocument . Deserialize < RemoteObjectValue > ( options ) ,
50+ "function" => jsonDocument . Deserialize < RemoteFunctionValue > ( options ) ,
51+ "regexp" => jsonDocument . Deserialize < RemoteRegExpValue > ( options ) ,
52+ "date" => jsonDocument . Deserialize < RemoteDateValue > ( options ) ,
53+ "map" => jsonDocument . Deserialize < RemoteMapValue > ( options ) ,
54+ "set" => jsonDocument . Deserialize < RemoteSetValue > ( options ) ,
55+ "weakmap" => jsonDocument . Deserialize < RemoteWeakMapValue > ( options ) ,
56+ "weakset" => jsonDocument . Deserialize < RemoteWeakSetValue > ( options ) ,
57+ "generator" => jsonDocument . Deserialize < RemoteGeneratorValue > ( options ) ,
58+ "error" => jsonDocument . Deserialize < RemoteErrorValue > ( options ) ,
59+ "proxy" => jsonDocument . Deserialize < RemoteProxyValue > ( options ) ,
60+ "promise" => jsonDocument . Deserialize < RemotePromiseValue > ( options ) ,
61+ "typedarray" => jsonDocument . Deserialize < RemoteTypedArrayValue > ( options ) ,
62+ "arraybuffer" => jsonDocument . Deserialize < RemoteArrayBufferValue > ( options ) ,
63+ "nodelist" => jsonDocument . Deserialize < RemoteNodeListValue > ( options ) ,
64+ "htmlcollection" => jsonDocument . Deserialize < RemoteHtmlCollectionValue > ( options ) ,
65+ "node" => jsonDocument . Deserialize < RemoteNodeValue > ( options ) ,
66+ "window" => jsonDocument . Deserialize < RemoteWindowProxyValue > ( options ) ,
6667 _ => null ,
6768 } ;
6869 }
0 commit comments