Open sandboxFocus

Interface IMethodBuilder

Allows to complete the construction of a method that has been created by an advice.

Namespace: Metalama.Framework.Code.DeclarationBuilders
Assembly: Metalama.Framework.dll
Syntax
public interface IMethodBuilder : IMethod, IGeneric, IMethodInvoker, IMethodBaseBuilder, IMethodBase, IHasParametersBuilder, IHasParameters, IMemberBuilder, IMember, IMemberOrNamedTypeBuilder, IMemberOrNamedType, INamedDeclaration, IDeclarationBuilder, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>

Properties

Name Description
IsReadOnly

Gets or sets a value indicating whether the method is read-only (applicable to struct methods).

OperatorKind

Gets or sets the operator kind. When set to a value other than None, the method becomes an operator. The name and IsStatic properties are automatically set based on the operator kind. This property can only be set once.

ReturnParameter

Gets an object allowing to read and modify the method return type and custom attributes, or null for methods that don't have return types: constructors and finalizers.

ReturnType

Gets or sets the method return type.

Methods

Name Description
AddTypeParameter(string)

Adds a generic parameter to the method.

Extension Methods

See Also