MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeIField­Or­Property­Or­Indexer
Open sandboxFocus

IFieldOrPropertyOrIndexer Interface

A base interface for IProperty, IField and IIndexer.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface IFieldOrPropertyOrIndexer : IHasAccessors, IMember, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>, IHasType

Properties

Name Description
GetMethod

Gets the property getter, or null if the property is write-only. In case of automatic properties, this property returns an object that does not map to source code but allows to add aspects and advice as with a normal method. In case of fields, this property returns a pseudo-method that can be the target of aspects and advice, as if the field were a property.

SetMethod

Gets the property getter, or null if the property is read-only. In case of automatic properties, this property returns an object that does not map to source code but allows to add aspects and advice as with a normal method. In case of fields, this property returns a pseudo-method that can be the target of aspects and advice, as if the field were a property.

Writeability

Gets writeability of the field, property or indexer, i.e. the situations in which it can be written.

Methods

Name Description
ToRef()

Extension Methods

DeclarationExtensions.ContainedChildren(IDeclaration)
DeclarationExtensions.ContainedDescendants(IDeclaration)
DeclarationExtensions.ContainedDescendantsAndSelf(IDeclaration)
DeclarationExtensions.ContainingAncestors(IDeclaration)
DeclarationExtensions.ContainingAncestorsAndSelf(IDeclaration)
DeclarationExtensions.GetClosestMemberOrNamedType(IDeclaration)
DeclarationExtensions.GetClosestNamedType(IDeclaration)
DeclarationExtensions.GetNamespace(IDeclaration)
DeclarationExtensions.GetTopmostNamedType(IDeclaration)
DeclarationExtensions.IsContainedIn(IDeclaration, IDeclaration)
GenericExtensions.GetOriginalDefinition(IDeclaration)
EligibilityExtensions.IsAdviceEligible(IDeclaration, AdviceKind)
EligibilityExtensions.IsAspectEligible(IDeclaration, Type, EligibleScenarios)
EligibilityExtensions.IsAspectEligible<T>(IDeclaration, EligibleScenarios)
EligibilityExtensions.IsContractAdviceEligible(IDeclaration, ContractDirection)
DeclarationExtensions.Enhancements<T>(T)
DeclarationExtensions.ForCompilation<T>(T?, ICompilation, ReferenceResolutionOptions)
DeclarationExtensions.TryForCompilation<T>(T?, ICompilation, out T?, ReferenceResolutionOptions)
MetricsExtensions.Metrics<TExtensible>(TExtensible)
GenericExtensions.GetOriginalDefinition(IMember)
MemberExtensions.IsOverridable(IMember)
GenericExtensions.GetBase(IMemberOrNamedType)
GenericExtensions.GetOriginalDefinition(IMemberOrNamedType)
GenericExtensions.IsSelfOrDeclaringTypeGeneric(IMemberOrNamedType)