Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / IField­Or­Property

Interface IFieldOrProperty

A base interface for IField and IProperty.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface IFieldOrProperty : IFieldOrPropertyOrIndexer, IMemberWithAccessors, IMember, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IHasType

Properties

Name Description
InitializerExpression

Gets the initializer expression (i.e. the expression at the right hand of the equal sign), if any. When the field or property is defined in source code, this property returns an ISourceExpression, which exposes a TypedConstant when possible.

Invokers

Gets an object that allows to get or set the value of the current field or property.

IsAutoPropertyOrField

Gets a value indicating whether the declaration is an auto-property or a field, or null if the implementation of the property cannot be determined, for instance for properties in a referenced assembly.

IsRequired

Gets a value indicating whether the field or property is required, i.e. it must be initialized when an instance of the declaring type is initialized.

Methods

Name Description
ToFieldOrPropertyInfo()

Gets a FieldOrPropertyInfo that represents the current field or property at run time.

Extension Methods

ExpressionFactory.ToExpression(IFieldOrProperty, IExpression)