Table of Contents

Interface IProperty

Namespace
NDepend.CodeModel
Assembly
NDepend.API.dll

Represents a property declared in an application assembly, or declared in a third-party assembly and used by the application code.

public interface IProperty : IMember, IAttributeTarget, IUser, ICodeElement, IUsed
Inherited Members
Extension Methods

Properties (25)

AccessorsAndBackingField

Returns a sequence of IMember object that contains the available get method, set method and backing field for this property.

IEnumerable<IMember> AccessorsAndBackingField { get; }

Property Value

IEnumerable<IMember>

BackingField

If this property has a generated or manually declared backing field, returns it. Else returns null.

IField BackingField { get; }

Property Value

IField

FieldsAssigned

Gets a sequence of fields assigned by this property's getter or setter.

IEnumerable<IField> FieldsAssigned { get; }

Property Value

IEnumerable<IField>

FieldsUsed

Gets a sequence of fields used by this property's getter or setter.

IEnumerable<IField> FieldsUsed { get; }

Property Value

IEnumerable<IField>

GetMethod

If this property has a get method, returns it, else returns null.

IMethod GetMethod { get; }

Property Value

IMethod

IsAbstract

Gets a value indicating whether this property is abstract.

bool IsAbstract { get; }

Property Value

bool

IsExplicitInterfaceImpl

Gets a value indicating whether this property is an explicit interface method implementation.

bool IsExplicitInterfaceImpl { get; }

Property Value

bool

IsFinal

Gets a value indicating whether this property is final.

bool IsFinal { get; }

Property Value

bool

IsIndexer

Returns true if this property is an indexer declared with the C# syntax this[].

bool IsIndexer { get; }

Property Value

bool

IsNewSlot

Gets a value indicating whether this property is new-slot.

bool IsNewSlot { get; }

Property Value

bool

Remarks

Certainly the best resource on the web about this new slot advanced topic is this stackoverflow Q&A
Internally, NDepend relies on this new slot value to compute the override/overriden methods sets in IMethod property getter OverriddensBase, OverridesDerived and OverridesDirectDerived.

IsReadOnly

Returns true if this property has a get method but not a set method.

bool IsReadOnly { get; }

Property Value

bool

IsReadWrite

Returns true if this property has both a get method and a set method.

bool IsReadWrite { get; }

Property Value

bool

IsRequired

Returns true if this property is defined as required.

bool IsRequired { get; }

Property Value

bool

IsVirtual

Gets a value indicating whether this property is virtual.

bool IsVirtual { get; }

Property Value

bool

IsWriteOnly

Returns true if this property has a set method but not a get method.

bool IsWriteOnly { get; }

Property Value

bool

MembersUsed

Gets a sequence of methods, properties, fields and events called by this property's getter or setter.

IEnumerable<IMember> MembersUsed { get; }

Property Value

IEnumerable<IMember>

MethodsCalled

Gets a sequence of methods called by this property's getter or setter.

IEnumerable<IMethod> MethodsCalled { get; }

Property Value

IEnumerable<IMethod>

MethodsReadingMe

Gets a sequence of methods that are calling this property's getter (if defined).

IEnumerable<IMethod> MethodsReadingMe { get; }

Property Value

IEnumerable<IMethod>

MethodsUsingMe

Gets a sequence of methods that are calling this property's getter or setter.

IEnumerable<IMethod> MethodsUsingMe { get; }

Property Value

IEnumerable<IMethod>

MethodsWritingMe

Gets a sequence of methods that are calling this property's setter (if defined).

IEnumerable<IMethod> MethodsWritingMe { get; }

Property Value

IEnumerable<IMethod>

Remarks

For an instance property, constructor(s) of its class that write the property are not counted. For a static property, the class constructor that writes the property is not counted.

OverriddensBase

Gets a sequence of properties declared in this property ParentType.BaseClasses and InterfacesImplemented, overridden by this property. If this property doesn't override any property, gets an empty sequence.

IEnumerable<IProperty> OverriddensBase { get; }

Property Value

IEnumerable<IProperty>

Remarks

A sequence of properties overridden by this property is also returned even if this property is declared in a third-party assembly.
This property getter has a O(this.ParentType.DepthOfInheritance.Count) time complexity.

See Also

OverridesDerived

Gets a sequence of properties declared in this property ParentType.DerivedTypes, overriding this property. If this property is not overridden, gets an empty sequence.

IEnumerable<IProperty> OverridesDerived { get; }

Property Value

IEnumerable<IProperty>

Remarks

A sequence of properties overriding this property is also returned even if this property is declared in a third-party assembly.
Properties for which IsNewSlot is true, are not in the returned sequence.
This property getter has a O(this.ParentType.NbChildren.Count) time complexity.

See Also

OverridesDirectDerived

Gets a sequence of properties declared in this property ParentType.DirectDerivedTypes, overriding this property. If this property is not overridden, gets an empty sequence.

IEnumerable<IProperty> OverridesDirectDerived { get; }

Property Value

IEnumerable<IProperty>

Remarks

A sequence of properties overriding this property is also returned even if this property is declared in a third-party assembly.
Methods for which IsNewSlot is true, are not in the returned sequence.
This property getter has a O(this.ParentType.NbChildren.Count) time complexity.

See Also

PropertyType

Gets the return type of this property. Gets null if the return type of this property is not in the scope of assemblies analyzed defined by IProject.CodeToAnalyze.

IType PropertyType { get; }

Property Value

IType

SetMethod

If this property has a set method, returns it, else returns null.

IMethod SetMethod { get; }

Property Value

IMethod