Closed ABatenev closed 1 year ago
Hello! I have decided to update the dryioc version in my project from 4.8.8 to 5.4.1, and as a result, the Type[] GetGenericParamsAndArgs(this Type type) method has become unavailable. Here is an example of my code where it is used:
Type[] GetGenericParamsAndArgs(this Type type)
container.Register( typeof(IAsyncRepository<>), typeof(AsyncRepository<>), reuse: Reuse.Scoped, made: Parameters.Of.Details((request, p) => p.ParameterType .GetGenericDefinitionOrNull() == typeof(IDeletingStrategy<>) && (!p.ParameterType .GetGenericParamsAndArgs() .FirstOrDefault() ?.IsAssignableTo<IUndeletable>() ?? false) // ToDo check logic here ? ServiceDetails.Of(value: null) : null)); // the default injection behavior
How can I replace this method?
You may use GetGenericArguments() instead.
GetGenericArguments()
Hello! I have decided to update the dryioc version in my project from 4.8.8 to 5.4.1, and as a result, the
Type[] GetGenericParamsAndArgs(this Type type)
method has become unavailable. Here is an example of my code where it is used:How can I replace this method?