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