Show / Hide Table of Contents

Class Type<T>.Property<TValue>

Provides access to property declared in type T.

Inheritance
Object
Type<T>.Property<TValue>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Property<TValue>
Type Parameters
Name Description
TValue

Type of property.

Methods

| Improve this Doc View Source

Get(String, Boolean)

Reflects instance property.

Declaration
public static Property<T, TValue> Get(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

Name of property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Property<T, TValue>

Property field; or null, if property doesn't exist.

| Improve this Doc View Source

GetGetter(String, Boolean)

Reflects instance property getter method.

Declaration
public static Method<MemberGetter<T, TValue>> GetGetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberGetter<T, TValue>>

The reflected getter method; or null, if getter method doesn't exist.

| Improve this Doc View Source

GetSetter(String, Boolean)

Reflects instance property setter method.

Declaration
public static Method<MemberSetter<T, TValue>> GetSetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberSetter<T, TValue>>

The reflected setter method; or null, if setter method doesn't exist.

| Improve this Doc View Source

GetStatic(String, Boolean)

Reflects static property.

Declaration
public static Property<TValue> GetStatic(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

Name of property.

Boolean nonPublic

True to reflect non-public property.

Returns
Type Description
Property<TValue>

Instance property; or null, if property doesn't exist.

| Improve this Doc View Source

GetStaticGetter(String, Boolean)

Reflects static property getter method.

Declaration
public static Method<MemberGetter<TValue>> GetStaticGetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberGetter<TValue>>

The reflected getter method; or null, if getter method doesn't exist.

| Improve this Doc View Source

GetStaticSetter(String, Boolean)

Reflects static property setter method.

Declaration
public static Method<MemberSetter<TValue>> GetStaticSetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberSetter<TValue>>

The reflected setter method; or null, if setter method doesn't exist.

| Improve this Doc View Source

Require(String, Boolean)

Reflects instance property.

Declaration
public static Property<T, TValue> Require(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

Name of property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Property<T, TValue>

Instance property.

Exceptions
Type Condition
MissingPropertyException

Property doesn't exist.

| Improve this Doc View Source

RequireGetter(String, Boolean)

Reflects instance property getter method.

Declaration
public static Method<MemberGetter<T, TValue>> RequireGetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberGetter<T, TValue>>

The reflected getter method.

Exceptions
Type Condition
MissingMethodException

The getter doesn't exist.

| Improve this Doc View Source

RequireSetter(String, Boolean)

Reflects instance property setter method.

Declaration
public static Method<MemberSetter<T, TValue>> RequireSetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberSetter<T, TValue>>

The reflected setter method.

Exceptions
Type Condition
MissingMethodException

The setter doesn't exist.

| Improve this Doc View Source

RequireStatic(String, Boolean)

Reflects static property.

Declaration
public static Property<TValue> RequireStatic(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

Name of property.

Boolean nonPublic

True to reflect non-public property.

Returns
Type Description
Property<TValue>

Instance property.

Exceptions
Type Condition
MissingPropertyException

Property doesn't exist.

| Improve this Doc View Source

RequireStaticGetter(String, Boolean)

Reflects static property setter method.

Declaration
public static Method<MemberGetter<TValue>> RequireStaticGetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberGetter<TValue>>

The reflected setter method.

Exceptions
Type Condition
MissingMethodException

The setter doesn't exist.

| Improve this Doc View Source

RequireStaticSetter(String, Boolean)

Reflects static property setter method.

Declaration
public static Method<MemberSetter<TValue>> RequireStaticSetter(string propertyName, bool nonPublic = false)
Parameters
Type Name Description
String propertyName

The name of the property.

Boolean nonPublic

true to reflect non-public property.

Returns
Type Description
Method<MemberSetter<TValue>>

The reflected setter method.

Exceptions
Type Condition
MissingMethodException

The setter doesn't exist.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX