TNet 3  3.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
TNet.FieldOrProperty Class Reference

Convenient wrapper for a getter and setter of a field or property on the chosen object. More...

Public Member Functions

object GetValue (object target)
 Get the field or property's value. More...
 
GetValue< T > (object target)
 Get the field or property's value. More...
 
void SetValue (object target, object value, GameObject go=null)
 Set the field or property's value. More...
 
bool HasAttribute< T > ()
 Whether the specified attribute is present. More...
 
GetAttribute< T > ()
 Retrieve the attribute of specified type on the field or property. More...
 
T[] GetAttributes< T > ()
 Retrieve the attributes of specified type on the field or property. More...
 

Static Public Member Functions

static FieldOrProperty Create (Type type, string name)
 Create a new field or property reference of specified name. More...
 
static FieldOrProperty Create (Type type, FieldInfo field)
 Create a new field or property reference of specified name. More...
 
static FieldOrProperty Create (Type type, PropertyInfo property)
 Create a new field or property reference of specified name. More...
 

Public Attributes

FieldInfo field
 
PropertyInfo property
 

Properties

string name [get]
 Field or property's name. More...
 
bool canWrite [get]
 Whether this option is writable or read-only. More...
 
Type type [get]
 Field or property time. More...
 

Detailed Description

Convenient wrapper for a getter and setter of a field or property on the chosen object.

Member Function Documentation

static FieldOrProperty TNet.FieldOrProperty.Create ( Type  type,
string  name 
)
static

Create a new field or property reference of specified name.

static FieldOrProperty TNet.FieldOrProperty.Create ( Type  type,
FieldInfo  field 
)
static

Create a new field or property reference of specified name.

static FieldOrProperty TNet.FieldOrProperty.Create ( Type  type,
PropertyInfo  property 
)
static

Create a new field or property reference of specified name.

T TNet.FieldOrProperty.GetAttribute< T > ( )

Retrieve the attribute of specified type on the field or property.

Type Constraints
T :Attribute 
T [] TNet.FieldOrProperty.GetAttributes< T > ( )

Retrieve the attributes of specified type on the field or property.

Type Constraints
T :Attribute 
object TNet.FieldOrProperty.GetValue ( object  target)

Get the field or property's value.

T TNet.FieldOrProperty.GetValue< T > ( object  target)

Get the field or property's value.

bool TNet.FieldOrProperty.HasAttribute< T > ( )

Whether the specified attribute is present.

Type Constraints
T :Attribute 
void TNet.FieldOrProperty.SetValue ( object  target,
object  value,
GameObject  go = null 
)

Set the field or property's value.

Member Data Documentation

FieldInfo TNet.FieldOrProperty.field
PropertyInfo TNet.FieldOrProperty.property

Property Documentation

bool TNet.FieldOrProperty.canWrite
get

Whether this option is writable or read-only.

string TNet.FieldOrProperty.name
get

Field or property's name.

Type TNet.FieldOrProperty.type
get

Field or property time.


The documentation for this class was generated from the following file: