-
Notifications
You must be signed in to change notification settings - Fork 6
/
Person.cs
72 lines (56 loc) · 1.42 KB
/
Person.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Non-nullable member is uninitialized
#pragma warning disable CS8618
// ReSharper disable All
using M31.FluentApi.Attributes;
namespace ExampleProject;
[FluentApi]
public class Person
{
[FluentMember(0)]
public string FirstName { get; private set; }
[FluentMember(1)]
[FluentSkippable]
public string? MiddleName { get; private set; }
[FluentMember(2)]
public string LastName { get; private set; }
public string? HouseNumber { get; private set; }
public string? Street { get; private set; }
public string? City { get; private set; }
public bool IsDigitalNomad { get; private set; }
[FluentMethod(3)]
[FluentBreak]
private void WhoseAddressIsUnknown()
{
}
[FluentMethod(3)]
private void WhoLivesAtAddress()
{
}
[FluentMethod(4)]
private void WithHouseNumber(string houseNumber)
{
HouseNumber = houseNumber;
}
[FluentMethod(5)]
private void WithStreet(string street)
{
Street = street;
}
[FluentMethod(6)]
[FluentBreak]
private void InCity(string city)
{
City = city;
}
[FluentMethod(3)]
[FluentContinueWith(7)]
private void WhoIsADigitalNomad()
{
IsDigitalNomad = true;
}
[FluentMethod(7)]
private void LivingInCity(string city)
{
City = city;
}
}