-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCreateStudent.g.cs
More file actions
166 lines (131 loc) · 4.49 KB
/
CreateStudent.g.cs
File metadata and controls
166 lines (131 loc) · 4.49 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// <auto-generated/>
// This code was generated by the library M31.FluentAPI.
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
#nullable enable
using System.Collections.Generic;
namespace M31.FluentApi.Tests.CodeGeneration.TestClasses.Abstract.CollectionInterfaceMemberClass;
public class CreateStudent :
CreateStudent.ICreateStudent,
CreateStudent.IWhoseFriendsAre,
CreateStudent.IWithPets,
CreateStudent.IWithBackpackContent
{
private readonly Student student;
private CreateStudent()
{
student = new Student();
}
public static ICreateStudent InitialStep()
{
return new CreateStudent();
}
public static IWithPets WhoseFriendsAre(System.Collections.Generic.IList<string> friends)
{
CreateStudent createStudent = new CreateStudent();
createStudent.student.Friends = friends;
return createStudent;
}
public static IWithPets WhoseFriendsAre(params string[] friends)
{
CreateStudent createStudent = new CreateStudent();
createStudent.student.Friends = new List<string>(friends);
return createStudent;
}
public static IWithPets WhoseFriendIs(string friend)
{
CreateStudent createStudent = new CreateStudent();
createStudent.student.Friends = new List<string>(1){ friend };
return createStudent;
}
public static IWithPets WhoHasNoFriends()
{
CreateStudent createStudent = new CreateStudent();
createStudent.student.Friends = new List<string>(0);
return createStudent;
}
IWithPets IWhoseFriendsAre.WhoseFriendsAre(System.Collections.Generic.IList<string> friends)
{
student.Friends = friends;
return this;
}
IWithPets IWhoseFriendsAre.WhoseFriendsAre(params string[] friends)
{
student.Friends = new List<string>(friends);
return this;
}
IWithPets IWhoseFriendsAre.WhoseFriendIs(string friend)
{
student.Friends = new List<string>(1){ friend };
return this;
}
IWithPets IWhoseFriendsAre.WhoHasNoFriends()
{
student.Friends = new List<string>(0);
return this;
}
IWithBackpackContent IWithPets.WithPets(System.Collections.Generic.IReadOnlyCollection<string> pets)
{
student.Pets = pets;
return this;
}
IWithBackpackContent IWithPets.WithPets(params string[] pets)
{
student.Pets = pets;
return this;
}
IWithBackpackContent IWithPets.WithPet(string pet)
{
student.Pets = new string[1]{ pet };
return this;
}
IWithBackpackContent IWithPets.WithZeroPets()
{
student.Pets = new string[0];
return this;
}
Student IWithBackpackContent.WithBackpackContent(System.Collections.Generic.ISet<string> backpackContent)
{
student.BackpackContent = backpackContent;
return student;
}
Student IWithBackpackContent.WithBackpackContent(params string[] backpackContent)
{
student.BackpackContent = new HashSet<string>(backpackContent);
return student;
}
Student IWithBackpackContent.WithBackpackContent(string backpackContent)
{
student.BackpackContent = new HashSet<string>(1){ backpackContent };
return student;
}
Student IWithBackpackContent.WithNoBackpackContent()
{
student.BackpackContent = new HashSet<string>(0);
return student;
}
public interface ICreateStudent : IWhoseFriendsAre
{
}
public interface IWhoseFriendsAre
{
IWithPets WhoseFriendsAre(System.Collections.Generic.IList<string> friends);
IWithPets WhoseFriendsAre(params string[] friends);
IWithPets WhoseFriendIs(string friend);
IWithPets WhoHasNoFriends();
}
public interface IWithPets
{
IWithBackpackContent WithPets(System.Collections.Generic.IReadOnlyCollection<string> pets);
IWithBackpackContent WithPets(params string[] pets);
IWithBackpackContent WithPet(string pet);
IWithBackpackContent WithZeroPets();
}
public interface IWithBackpackContent
{
Student WithBackpackContent(System.Collections.Generic.ISet<string> backpackContent);
Student WithBackpackContent(params string[] backpackContent);
Student WithBackpackContent(string backpackContent);
Student WithNoBackpackContent();
}
}