-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIMethodBodyGenerator.cs
More file actions
34 lines (27 loc) · 1.07 KB
/
IMethodBodyGenerator.cs
File metadata and controls
34 lines (27 loc) · 1.07 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
namespace EasySourceGenerators.Abstractions;
public interface IMethodBodyGenerator;
public interface IMethodBodyGeneratorWithNoParameter : IMethodBodyGenerator;
public interface IMethodBodyGenerator<TReturnType> : IMethodBodyGenerator
{
IMethodBodyGeneratorWithNoParameter BodyReturningConstantValue(Func<object> body);
}
public interface IMethodBodyGenerator<TArg1, TReturnType> : IMethodBodyGenerator
{
IMethodBodyGeneratorSwitchBody<TArg1, TReturnType> GenerateSwitchBody();
}
public interface IMethodBodyGeneratorStage0
{
IMethodBodyGeneratorWithNoParameter CreateImplementation();
IMethodBodyGenerator<TReturnType> CreateImplementation<TReturnType>();
IMethodBodyGenerator<TArg1, TReturnType> CreateImplementation<TArg1, TReturnType>();
IMethodBodyBuilder ForMethod();
}
public interface IMethodBodyBuilder
{
IMethodBodyBuilder<TArg1> WithParameter<TArg1>();
IMethodBodyGenerator<TReturnType> WithReturnType<TReturnType>();
}
public interface IMethodBodyBuilder<TArg1>
{
IMethodBodyGenerator<TArg1, TReturnType> WithReturnType<TReturnType>();
}