Why do you want to restrict that a generic type must be a class?
- Dominant language
- C#
- Stars
- 9.7k
- Forks
- 538
- PR merge metrics
- No merged PRs in 30d
Description
### Version Information
| Software | Version(s) |
| ------------------------| ---------- |
| Bogus NuGet Package |34.0.2|
| .NET Core? |.NET 6.0.400|
| .NET Full Framework? ||
| Windows OS? |Windows 10 Pro|
| Linux OS? ||
| Visual Studio? |Visual Studio 2022 Community|
### What locale are you using with Bogus?
en-US
### What's the problem?
```csharp
Faker : IFakerTInternal, ILocaleAware, IRuleSet where T : class
```
Why do you want to restrict that a generic type must be a `class`?
In some cases, I use `struct`...
### What possible solutions have you considered?
I have considered using non generic `Faker`.
Examples:
[Using the Faker facade](https://github.com/bchavez/Bogus#using-the-faker-facade)
[Using DataSets directly](https://github.com/bchavez/Bogus#using-datasets-directly)
### Do you have sample code to show what you're trying to do?
_(Please be complete. Provide all code necessary to run your example in LINQPad.)_
_(The more complete code examples are, the more accurate answers will be.)_
_(https://www.linqpad.net)_
Contributor guide
Research direction
Start with the shown Faker declaration and trace its related interfaces and generic constraints; the payload names no file or test. Done should be a maintainer-confirmed decision on whether value types are supported, with the affected behavior and documentation or tests updated accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100