Class Property<T, V>
Provides typed access to instance property declared in type T
.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public sealed class Property<T, V> : PropertyBase<V>, IEquatable<PropertyInfo>, IProperty<T, V>, IProperty, IMember<PropertyInfo>, ICustomAttributeProvider
Type Parameters
Name | Description |
---|---|
T | Declaring type. |
V | Type of property. |
Properties
| Improve this Doc View SourceGetMethod
Gets property getter.
Declaration
public Method<MemberGetter<T, V>> GetMethod { get; }
Property Value
Type | Description |
---|---|
Method<MemberGetter<T, V>> |
Item[T]
Gets or sets property value.
Declaration
public V this[in T this] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
T | this |
|
Property Value
Type | Description |
---|---|
V | Property value. |
SetMethod
Gets property setter.
Declaration
public Method<MemberSetter<T, V>> SetMethod { get; }
Property Value
Type | Description |
---|---|
Method<MemberSetter<T, V>> |
Methods
| Improve this Doc View SourceGetValue(Object, out V)
Returns the value of the property supported by a given object.
Declaration
public override bool GetValue(object obj, out V value)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object whose property value will be returned. |
V | value | An object containing the value of the property reflected by this instance. |
Returns
Type | Description |
---|---|
Boolean | true, if property value is obtained successfully; otherwise, false. |
Overrides
SetValue(Object, V)
Sets the value of the property supported by the given object.
Declaration
public override bool SetValue(object obj, V value)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object whose property value will be set. |
V | value | The value to assign to the property. |
Returns
Type | Description |
---|---|
Boolean | true, if property value is modified successfully; otherwise, false. |
Overrides
Operators
| Improve this Doc View SourceImplicit(Property<T, V> to MemberGetter<T, V>)
Obtains property getter in the form of the delegate instance.
Declaration
public static implicit operator MemberGetter<T, V>(Property<T, V> property)
Parameters
Type | Name | Description |
---|---|---|
Property<T, V> | property | The reflected property. |
Returns
Type | Description |
---|---|
MemberGetter<T, V> |
Implicit(Property<T, V> to MemberSetter<T, V>)
Obtains property setter in the form of the delegate instance.
Declaration
public static implicit operator MemberSetter<T, V>(Property<T, V> property)
Parameters
Type | Name | Description |
---|---|---|
Property<T, V> | property | The reflected property. |
Returns
Type | Description |
---|---|
MemberSetter<T, V> |