Skip to content

Stashbox v5.10.2

Compare
Choose a tag to compare
@z4kn4fein z4kn4fein released this 13 Jun 18:59

Added

  • Access to the actual TypeInformation as a factory delegate input parameter. The TypeInformation holds every reflected context information about the currently resolving type. This can be useful when the resolution is, e.g., in an open generic context, and we want to know which closed generic variant is requested.
    container.Register(typeof(IService<>), options => options.WithFactory<TypeInformation>(typeInfo => 
       {
          /* typeInfo.Type holds the currently resolving closed generic type */
       }));