Type type = ...
object generateObject = new AutoFaker(type).Generate();
Current work around:
Type type = ...
Type autoFakerType = typeof(AutoFaker<>).MakeGenericType(type);
dynamic autoFaker = Activator.CreateInstance(autoFakerType) ?? throw new Exception($"Failed creating type {autoFakerType.FullName} gefaald");
object generateObject = autoFaker.Generate();
Is a PR accepted for this? (needs some refactoring to replace internal calls from generic to non-generic)
I would like to generate from a
Type
parameter,e.g.
Current work around:
Is a PR accepted for this? (needs some refactoring to replace internal calls from generic to non-generic)
This is maybe the same question: https://github.com/nickdodd79/AutoBogus/issues/98