Class CodeMethod
Class method definition.
public sealed class CodeMethod : MethodBase, IGroupElement, ICodeElement
- Inheritance
-
CodeMethod
- Implements
- Inherited Members
- Extension Methods
Constructors
CodeMethod(CodeIdentifier)
public CodeMethod(CodeIdentifier name)
Parameters
name
CodeIdentifier
CodeMethod(IEnumerable<CodeAttribute>?, Modifiers, CodeBlock?, CodeXmlComment?, IEnumerable<CodeParameter>?, CodeIdentifier, CodeTypeToken?, IEnumerable<CodeTypeToken>?)
public CodeMethod(IEnumerable<CodeAttribute>? customAttributes, Modifiers attributes, CodeBlock? body, CodeXmlComment? xmlDoc, IEnumerable<CodeParameter>? parameters, CodeIdentifier name, CodeTypeToken? returnType, IEnumerable<CodeTypeToken>? typeParameters)
Parameters
customAttributes
IEnumerable<CodeAttribute>attributes
Modifiersbody
CodeBlockxmlDoc
CodeXmlCommentparameters
IEnumerable<CodeParameter>name
CodeIdentifierreturnType
CodeTypeTokentypeParameters
IEnumerable<CodeTypeToken>
Properties
ElementType
Type of node.
public override CodeElementType ElementType { get; }
Property Value
Name
Method name.
public CodeIdentifier Name { get; }
Property Value
ReturnType
Method return type.
null
for void methods.
public CodeTypeToken? ReturnType { get; }
Property Value
TypeParameters
Generic method type parameters.
public IReadOnlyList<CodeTypeToken> TypeParameters { get; }