Interface IProperty
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
BackingField
If this property has a generated or manually declared backing field, returns it. Else returns null.
IField BackingField { get; }
Property Value
FieldsAssigned
Gets a sequence of fields assigned by this property's getter or setter.
IEnumerable<IField> FieldsAssigned { get; }
Property Value
FieldsUsed
Gets a sequence of fields used by this property's getter or setter.
IEnumerable<IField> FieldsUsed { get; }
Property Value
GetMethod
If this property has a get method, returns it, else returns null.
IMethod GetMethod { get; }
Property Value
IsAbstract
Gets a value indicating whether this property is abstract.
bool IsAbstract { get; }
Property Value
IsExplicitInterfaceImpl
Gets a value indicating whether this property is an explicit interface method implementation.
bool IsExplicitInterfaceImpl { get; }
Property Value
IsFinal
Gets a value indicating whether this property is final.
bool IsFinal { get; }
Property Value
IsIndexer
Returns true if this property is an indexer declared with the C# syntax this[].
bool IsIndexer { get; }
Property Value
IsNewSlot
Gets a value indicating whether this property is new-slot.
bool IsNewSlot { get; }
Property Value
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
IsReadWrite
Returns true if this property has both a get method and a set method.
bool IsReadWrite { get; }
Property Value
IsRequired
Returns true if this property is defined as required.
bool IsRequired { get; }
Property Value
IsVirtual
Gets a value indicating whether this property is virtual.
bool IsVirtual { get; }
Property Value
IsWriteOnly
Returns true if this property has a set method but not a get method.
bool IsWriteOnly { get; }
Property Value
MembersUsed
Gets a sequence of methods, properties, fields and events called by this property's getter or setter.
IEnumerable<IMember> MembersUsed { get; }
Property Value
MethodsCalled
Gets a sequence of methods called by this property's getter or setter.
IEnumerable<IMethod> MethodsCalled { get; }
Property Value
MethodsReadingMe
Gets a sequence of methods that are calling this property's getter (if defined).
IEnumerable<IMethod> MethodsReadingMe { get; }
Property Value
MethodsUsingMe
Gets a sequence of methods that are calling this property's getter or setter.
IEnumerable<IMethod> MethodsUsingMe { get; }
Property Value
MethodsWritingMe
Gets a sequence of methods that are calling this property's setter (if defined).
IEnumerable<IMethod> MethodsWritingMe { get; }
Property Value
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
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
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
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
SetMethod
If this property has a set method, returns it, else returns null.
IMethod SetMethod { get; }