SolidAlloy/GenericUnityObjects

Add support for more type parameter constraints

Closed this issue · 0 comments

The plugin currently takes into account only the base classes and interfaces listed as type constraints. Not all constraints can be implemented, but the goal is to add support for as many constraints as possible.

The list of possible constraints in the official documentation: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/constraints-on-type-parameters

Constraints that should be possible and reasonable to implement:

  • where T : struct
  • where T : class
  • where T : new()
  • where T : U