|
20 | 20 | using OpenQA.Selenium.Internal.Logging; |
21 | 21 | using System; |
22 | 22 | using System.Collections.Concurrent; |
| 23 | +using System.Diagnostics.CodeAnalysis; |
23 | 24 | using System.Globalization; |
24 | 25 | using System.Net.Http; |
25 | 26 | using System.Text.Json; |
@@ -148,6 +149,8 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains |
148 | 149 | /// <param name="millisecondsTimeout">The execution timeout of the command in milliseconds.</param> |
149 | 150 | /// <param name="throwExceptionIfResponseNotReceived"><see langword="true"/> to throw an exception if a response is not received; otherwise, <see langword="false"/>.</param> |
150 | 151 | /// <returns>The command response object implementing the <see cref="ICommandResponse{T}"/> interface.</returns> |
| 152 | + [RequiresUnreferencedCode("SendCommand is not compatible with trimming or AOT. Use the overload that takes JsonNode parameters instead")] |
| 153 | + [RequiresDynamicCode("SendCommand is not compatible with trimming or AOT. Use the overload that takes JsonNode parameters instead")] |
151 | 154 | public async Task<ICommandResponse<TCommand>> SendCommand<TCommand>(TCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) |
152 | 155 | where TCommand : ICommand |
153 | 156 | { |
@@ -181,6 +184,8 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains |
181 | 184 | /// <param name="millisecondsTimeout">The execution timeout of the command in milliseconds.</param> |
182 | 185 | /// <param name="throwExceptionIfResponseNotReceived"><see langword="true"/> to throw an exception if a response is not received; otherwise, <see langword="false"/>.</param> |
183 | 186 | /// <returns>The command response object implementing the <see cref="ICommandResponse{T}"/> interface.</returns> |
| 187 | + [RequiresUnreferencedCode("SendCommand is not compatible with trimming or AOT. Use the overload that takes JsonNode parameters instead")] |
| 188 | + [RequiresDynamicCode("SendCommand is not compatible with trimming or AOT. Use the overload that takes JsonNode parameters instead")] |
184 | 189 | public async Task<ICommandResponse<TCommand>> SendCommand<TCommand>(TCommand command, string sessionId, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) |
185 | 190 | where TCommand : ICommand |
186 | 191 | { |
@@ -214,6 +219,8 @@ public T GetVersionSpecificDomains<T>() where T : DevToolsSessionDomains |
214 | 219 | /// <param name="millisecondsTimeout">The execution timeout of the command in milliseconds.</param> |
215 | 220 | /// <param name="throwExceptionIfResponseNotReceived"><see langword="true"/> to throw an exception if a response is not received; otherwise, <see langword="false"/>.</param> |
216 | 221 | /// <returns>The command response object implementing the <see cref="ICommandResponse{T}"/> interface.</returns> |
| 222 | + [RequiresUnreferencedCode("SendCommand is not compatible with trimming or AOT. Use the overload that takes JsonNode parameters instead")] |
| 223 | + [RequiresDynamicCode("SendCommand is not compatible with trimming or AOT. Use the overload that takes JsonNode parameters instead")] |
217 | 224 | public async Task<TCommandResponse> SendCommand<TCommand, TCommandResponse>(TCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true) |
218 | 225 | where TCommand : ICommand |
219 | 226 | where TCommandResponse : ICommandResponse<TCommand> |
|
0 commit comments