|
| 1 | +using System.Text.Json.Serialization; |
| 2 | + |
| 3 | +namespace OpenQA.Selenium.BiDi.Communication.Json; |
| 4 | + |
| 5 | +// https://github.com/dotnet/runtime/issues/72604 |
| 6 | +[JsonSerializable(typeof(MessageSuccess))] |
| 7 | +[JsonSerializable(typeof(MessageError))] |
| 8 | +[JsonSerializable(typeof(MessageEvent))] |
| 9 | + |
| 10 | +[JsonSerializable(typeof(Modules.Script.EvaluateResult.Success))] |
| 11 | +[JsonSerializable(typeof(Modules.Script.EvaluateResult.Exception))] |
| 12 | + |
| 13 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Number), TypeInfoPropertyName = "Script_RemoteValue_Number")] |
| 14 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.String), TypeInfoPropertyName = "Script_RemoteValue_String")] |
| 15 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Null), TypeInfoPropertyName = "Script_RemoteValue_Null")] |
| 16 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Undefined), TypeInfoPropertyName = "Script_RemoteValue_Undefined")] |
| 17 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Symbol))] |
| 18 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Object), TypeInfoPropertyName = "Script_RemoteValue_Object")] |
| 19 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Function))] |
| 20 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.RegExp), TypeInfoPropertyName = "Script_RemoteValue_RegExp")] |
| 21 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.RegExp.RegExpValue), TypeInfoPropertyName = "Script_RemoteValue_RegExp_RegExpValue")] |
| 22 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Date), TypeInfoPropertyName = "Script_RemoteValue_Date")] |
| 23 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Map), TypeInfoPropertyName = "Script_RemoteValue_Map")] |
| 24 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Set), TypeInfoPropertyName = "Script_RemoteValue_Set")] |
| 25 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.WeakMap))] |
| 26 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.WeakSet))] |
| 27 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Generator))] |
| 28 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Error))] |
| 29 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Proxy))] |
| 30 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Promise))] |
| 31 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.TypedArray))] |
| 32 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.ArrayBuffer))] |
| 33 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.NodeList))] |
| 34 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.HtmlCollection))] |
| 35 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.Node))] |
| 36 | +[JsonSerializable(typeof(Modules.Script.RemoteValue.WindowProxy))] |
| 37 | + |
| 38 | +[JsonSerializable(typeof(Modules.Script.LocalValue.String), TypeInfoPropertyName = "Script_LocalValue_String")] |
| 39 | + |
| 40 | +[JsonSerializable(typeof(Modules.Script.Target.Realm), TypeInfoPropertyName = "Script_Target_Realm")] |
| 41 | +[JsonSerializable(typeof(Modules.Script.Target.Context), TypeInfoPropertyName = "Script_Target_Context")] |
| 42 | + |
| 43 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.Window))] |
| 44 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.DedicatedWorker))] |
| 45 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.SharedWorker))] |
| 46 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.ServiceWorker))] |
| 47 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.Worker))] |
| 48 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.PaintWorklet))] |
| 49 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.AudioWorklet))] |
| 50 | +[JsonSerializable(typeof(Modules.Script.RealmInfo.Worklet))] |
| 51 | + |
| 52 | +[JsonSerializable(typeof(Modules.Log.Entry.Console))] |
| 53 | +[JsonSerializable(typeof(Modules.Log.Entry.Javascript))] |
| 54 | +// |
| 55 | + |
| 56 | +[JsonSerializable(typeof(Command))] |
| 57 | +[JsonSerializable(typeof(Message))] |
| 58 | + |
| 59 | +[JsonSerializable(typeof(Modules.Session.StatusResult))] |
| 60 | +[JsonSerializable(typeof(Modules.Session.NewResult))] |
| 61 | + |
| 62 | +[JsonSerializable(typeof(Modules.Browser.CloseCommand), TypeInfoPropertyName = "Browser_CloseCommand")] |
| 63 | +[JsonSerializable(typeof(Modules.Browser.UserContextInfo))] |
| 64 | +[JsonSerializable(typeof(Modules.Browser.GetUserContextsResult))] |
| 65 | + |
| 66 | +[JsonSerializable(typeof(Modules.BrowsingContext.CloseCommand), TypeInfoPropertyName = "BrowsingContext_CloseCommand")] |
| 67 | +[JsonSerializable(typeof(Modules.BrowsingContext.CreateResult))] |
| 68 | +[JsonSerializable(typeof(Modules.BrowsingContext.BrowsingContextInfo))] |
| 69 | +[JsonSerializable(typeof(Modules.BrowsingContext.NavigateResult))] |
| 70 | +[JsonSerializable(typeof(Modules.BrowsingContext.NavigationInfo))] |
| 71 | +[JsonSerializable(typeof(Modules.BrowsingContext.TraverseHistoryResult))] |
| 72 | +[JsonSerializable(typeof(Modules.BrowsingContext.LocateNodesResult))] |
| 73 | +[JsonSerializable(typeof(Modules.BrowsingContext.CaptureScreenshotResult))] |
| 74 | +[JsonSerializable(typeof(Modules.BrowsingContext.GetTreeResult))] |
| 75 | +[JsonSerializable(typeof(Modules.BrowsingContext.PrintResult))] |
| 76 | +[JsonSerializable(typeof(Modules.BrowsingContext.UserPromptOpenedEventArgs))] |
| 77 | +[JsonSerializable(typeof(Modules.BrowsingContext.UserPromptClosedEventArgs))] |
| 78 | + |
| 79 | +[JsonSerializable(typeof(Modules.Network.BytesValue.String), TypeInfoPropertyName = "Network_BytesValue_String")] |
| 80 | +[JsonSerializable(typeof(Modules.Network.UrlPattern.String), TypeInfoPropertyName = "Network_UrlPattern_String")] |
| 81 | +[JsonSerializable(typeof(Modules.Network.ContinueWithAuthParameters.Default), TypeInfoPropertyName = "Network_ContinueWithAuthParameters_Default")] |
| 82 | +[JsonSerializable(typeof(Modules.Network.AddInterceptResult))] |
| 83 | +[JsonSerializable(typeof(Modules.Network.BeforeRequestSentEventArgs))] |
| 84 | +[JsonSerializable(typeof(Modules.Network.ResponseStartedEventArgs))] |
| 85 | +[JsonSerializable(typeof(Modules.Network.ResponseCompletedEventArgs))] |
| 86 | +[JsonSerializable(typeof(Modules.Network.FetchErrorEventArgs))] |
| 87 | + |
| 88 | +[JsonSerializable(typeof(Modules.Script.Channel), TypeInfoPropertyName = "Script_Channel")] |
| 89 | +[JsonSerializable(typeof(Modules.Script.AddPreloadScriptResult))] |
| 90 | +[JsonSerializable(typeof(Modules.Script.EvaluateResult))] |
| 91 | +[JsonSerializable(typeof(Modules.Script.GetRealmsResult))] |
| 92 | + |
| 93 | +[JsonSerializable(typeof(Modules.Log.Entry))] |
| 94 | + |
| 95 | +[JsonSerializable(typeof(Modules.Storage.GetCookiesResult))] |
| 96 | +[JsonSerializable(typeof(Modules.Storage.DeleteCookiesResult))] |
| 97 | +[JsonSerializable(typeof(Modules.Storage.SetCookieResult))] |
| 98 | +internal partial class BiDiSerializerContext: JsonSerializerContext; |
0 commit comments