We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product and Version Used: Roslynator.Analyzers 4.12.3
Steps to Reproduce: Have a class such as below:
public class Create<TEntity, TOut> where TEntity : Common
And a usage of the class as seen here:
_ = services.AddValidatorsFromAssemblyContaining<Create<Foo, Bar>>();
Actual Behavior: RCS1102 is raised. If the fixer is used, a C# error is raised at the usage:
'Create<Foo, Bar>': static types cannot be used as type arguments[CS0718]
Expected Behavior: RCS1102 is not raised.
The text was updated successfully, but these errors were encountered:
Could you provide full declaration of the "Create" class or at least the list of members? Does it contain only static members?
Sorry, something went wrong.
public class Create<TEntity, TDtoIn, TDtoOut> where TEntity : Common { public class Command : IRequest<Result<Unit>> { public required List<TDtoIn> DtoInList { get; set; } public Func<TEntity, string>? TagStrategy { get; set; } } public class Handler : IRequestHandler<Command, Result<Unit>> { private readonly DataContext _context; private readonly IMapper _mapper; private readonly IUserAccessor _userAccessor; public Handler(DataContext context, IMapper mapper, IUserAccessor userAccessor) { _userAccessor = userAccessor; _mapper = mapper; _context = context; } public async Task<Result<Unit>> Handle(Command request, CancellationToken cancellationToken) { // endpoint logic } } } public class Common { public Guid Id { get; set; } = Guid.NewGuid(); public string? Tag { get; set; } public long UnixCreated { get; set; } = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); public long? UnixUpdated { get; set; } public AppUser? UserCreated { get; set; } public AppUser? UserUpdated { get; set; } public Metadata? Metadata { get; set; } }
No branches or pull requests
Product and Version Used:
Roslynator.Analyzers 4.12.3
Steps to Reproduce:
Have a class such as below:
And a usage of the class as seen here:
Actual Behavior:
RCS1102 is raised. If the fixer is used, a C# error is raised at the usage:
Expected Behavior:
RCS1102 is not raised.
The text was updated successfully, but these errors were encountered: