Class CommandResponseMessage<T>
- Namespace
- WebDriverBiDi.Protocol
- Assembly
- WebDriverBiDi.dll
Base class for the result of a command where the concrete type of the response data is known.
public class CommandResponseMessage<T> : CommandResponseMessage where T : CommandResult
Type Parameters
TThe data type of the command response.
- Inheritance
-
CommandResponseMessage<T>
- Inherited Members
Remarks
This class is public to support AOT (ahead-of-time) compilation scenarios in extension libraries. End users do not construct or reference this type directly; it is used internally by CommandParameters<T> to express the expected response type for a command.
Authors of third-party extension libraries that add new protocol commands must not register
this envelope type in their own
JsonSerializerContext: its serializable members
are internal to this library, so a context in another assembly cannot generate working
metadata for it. The transport builds the envelope's type info itself (see
CommandParameters<T>) and asks the serializer options only for the
T result type. Annotate your context with
[JsonSerializable(typeof(TResult))] for each custom result type, then register the
context via RegisterTypeInfoResolverAsync(IJsonTypeInfoResolver, CancellationToken).
See the AOT compatibility article in the library documentation for the full pattern.
Constructors
CommandResponseMessage()
public CommandResponseMessage()
Properties
Result
Gets the result of the command.
[JsonIgnore]
public override CommandResult Result { get; }