Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

Improve id generation and de-couple from testing

Open dodexahedron opened this issue 1 year ago • 0 comments

As discussed in #3242, we can improve id generation for views and make them independent of build configuration.

This could simplify some logic in View.

Current thought is to use a static counter field that is simply incremented in a thread-safe manner (such as Interlocked.Increment) with every new View created, and append that to the type name.

Might also be a good idea to prefix with an underscore or other common convention, to help avoid potential collisions with user-specified ids by using an unlikely character sequence.

dodexahedron avatar Feb 16 '24 02:02 dodexahedron