@@ -33,37 +33,37 @@ internal class RemoteValueConverter : JsonConverter<RemoteValue>
3333
3434 if ( jsonDocument . RootElement . ValueKind == JsonValueKind . String )
3535 {
36- return RemoteValue . String ( jsonDocument . RootElement . GetString ( ) ) ;
36+ return new StringRemoteValue ( jsonDocument . RootElement . GetString ( ) ! ) ;
3737 }
3838
3939 return jsonDocument . RootElement . GetProperty ( "type" ) . ToString ( ) switch
4040 {
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 ) ,
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 ) ,
6767 _ => null ,
6868 } ;
6969 }
0 commit comments