-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIDotNetMethod.cs
More file actions
98 lines (80 loc) · 3.56 KB
/
IDotNetMethod.cs
File metadata and controls
98 lines (80 loc) · 3.56 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
//*****************************************************************************
//* Code Factory SDK
//* Copyright (c) 2020 CodeFactory, LLC
//*****************************************************************************
using System.Collections.Generic;
using System.Threading.Tasks;
namespace CodeFactory.DotNet
{
/// <summary>
/// Model definition of a method in .net.
/// </summary>
public interface IDotNetMethod:IDotNetMember,IDotNetGeneric
{
/// <summary>
/// Determines the type of method that was loaded into this model.
/// </summary>
DotNetMethodType MethodType { get; }
/// <summary>
/// The type information about the return type assigned to the method. if flag <see cref="IsVoid"/> is true then the return type will be set to null.
/// </summary>
IDotNetType ReturnType { get; }
/// <summary>
/// Flag that determines if the method has parameters assigned to it.
/// </summary>
bool HasParameters { get; }
/// <summary>
/// Enumeration of the parameters that have been assigned to the method. If HasParameters property is set to false this will be null.
/// </summary>
IReadOnlyList<IDotNetParameter> Parameters { get; }
/// <summary>
/// Flag that determines if the method has been implemented as abstract.
/// </summary>
bool IsAbstract { get; }
/// <summary>
/// Flag that determines if the method has been implemented as virtual.
/// </summary>
bool IsVirtual { get; }
/// <summary>
/// Flag that determines if the method has been sealed.
/// </summary>
bool IsSealed { get; }
/// <summary>
/// Flag that determines if the method has been overridden.
/// </summary>
bool IsOverride { get; }
/// <summary>
/// Flag that determines if this is a static method.
/// </summary>
bool IsStatic { get; }
/// <summary>
/// Flag that determines if the methods return type is void.
/// </summary>
bool IsVoid { get; }
/// <summary>
/// Flag that determines if the method implements the Async keyword.
/// </summary>
bool IsAsync { get; }
/// <summary>
/// Flag that determines if the method is an extension method.
/// </summary>
bool IsExtension { get; }
/// <summary>
/// Determines how the internal syntax for the method is stored.
/// </summary>
SyntaxType SyntaxContent { get; }
/// <summary>
/// The source code syntax that is stored in the body of the method. This will be null if the method was not loaded from source code or the SyntaxContent is not set to Body.
/// </summary>
Task<string> GetBodySyntaxAsync();
/// <summary>
/// The source code syntax that is stored in the body of the method. This will be null if the method was not loaded from source code or the SyntaxContent is not set to Body. This will return each line of code that has a line feed or return as a separate string.
/// </summary>
Task<List<string>> GetBodySyntaxListAsync();
/// <summary>
/// Gets the expression that has been assigned to the method. This will be null if the method was not loaded from source code or the SyntaxContent is not set to Expression.
/// </summary>
/// <returns></returns>
Task<string> GetExpressionSyntaxAsync();
}
}