Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface IResponseDTO {
- string Naam { get; }
- }
- public class NestedResponseDTO {
- private Random rnd = new();
- private string _naam;
- private string _naamvoorspelbaar;
- private TestResponseDTO _testresponsedto;
- public NestedResponseDTO(TestResponseDTO testresponsedto=null) {
- _naam = "NestedNaam" + rnd.Next(int.MinValue, int.MaxValue).ToString();
- _naamvoorspelbaar = rnd.Next(0, 100) <= 50 ? "Vincent" : "John";
- _testresponsedto = testresponsedto;
- }
- public string Naam => _naam;
- public string NaamVoorspelbaar => _naamvoorspelbaar;
- public TestResponseDTO CirculaireRelatieDTO => _testresponsedto;
- }
- public class TestResponseDTO {
- private Random rnd = new();
- private string _naam;
- private string _naamvoorspelbaar;
- private NestedResponseDTO _nestedrespdto;
- public TestResponseDTO() {
- _naam = "Naam" + rnd.Next(int.MinValue, int.MaxValue).ToString();
- _naamvoorspelbaar = rnd.Next(0, 100) <= 50 ? "Henk" : "Jos";
- _nestedrespdto = new NestedResponseDTO(this);
- }
- public string Naam => _naam;
- public string NaamVoorspelbaar => _naamvoorspelbaar;
- public NestedResponseDTO GenesteDTO => _nestedrespdto;
- }
Add Comment
Please, Sign In to add comment