-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMethod.cs
More file actions
41 lines (35 loc) · 1.12 KB
/
Method.cs
File metadata and controls
41 lines (35 loc) · 1.12 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
namespace M31.FluentApi.Generator.CodeBuilding;
internal class Method : ICode
{
internal Method(MethodSignature methodSignature)
{
MethodComments = new MethodComments();
MethodSignature = methodSignature;
MethodBody = new MethodBody();
}
internal Method(MethodComments methodComments, MethodSignature methodSignature, MethodBody methodBody)
{
MethodComments = methodComments;
MethodSignature = methodSignature;
MethodBody = methodBody;
}
internal MethodComments MethodComments { get; }
internal MethodSignature MethodSignature { get; }
internal MethodBody MethodBody { get; }
internal bool IsConstructor => MethodSignature.IsConstructor;
internal void AddCommentLine(string commentLine)
{
MethodComments.AddLine(commentLine);
}
internal void AppendBodyLine(string line)
{
MethodBody.AppendLine(line);
}
public CodeBuilder AppendCode(CodeBuilder codeBuilder)
{
return codeBuilder
.Append(MethodComments)
.Append(MethodSignature)
.Append(MethodBody);
}
}