- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.6k
 
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-dotnet.NET Bindings.NET BindingsI-enhancementSomething could be betterSomething could be better
Description
Feature and motivation
There are a few types whose ToString() methods will serialize the contents into a JSON representation. This has some drawbacks
- Performance: This operation is heaver than a 
ToString()method should be. This is especially noticeable when using the debugger display. - AOT: These methods are on types which contain open-typed 
objectvalues, which is inherently not AOT-safe. This can throw exceptions in AOT scenarios, whichToString()methods should never do. Of less concern is the fact that, since theToString()method is basically always rooted, these operations will never be trimmed away, and AOT programs may be larger than they need to be. 
Each of the relevant types are strongly-typed dictionaries. For reference, the standard convention for dictionary types is to avoid overriding the ToString() method.
The following types are affected:
DriverOptions(the base class for all browser options types)ReturnedCapabilities(internal class)RemoteSessionSettings
Usage example
N/A
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-dotnet.NET Bindings.NET BindingsI-enhancementSomething could be betterSomething could be better