ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Utilities.PropertyMetadata Class Reference

A PropertyMetadata describes a discovered property or field in a TypeMetadata. More...

Public Member Functions

void Write (object context, object value)
 Writes a value to the property that this property metadata represents, using given object instance as the context. More...
 
object Read (object context)
 Reads a value from the property that this property metadata represents, using the given object instance as the context. More...
 
 PropertyMetadata (PropertyInfo property)
 Initializes a new instance of the PropertyMetadata class from a property member. More...
 
 PropertyMetadata (FieldInfo field)
 Initializes a new instance of the PropertyMetadata class from a field member. More...
 
override bool Equals (System.Object obj)
 Determines whether the specified object is equal to this one. More...
 
bool Equals (PropertyMetadata p)
 Determines whether the specified object is equal to this one. More...
 
override int GetHashCode ()
 Returns a hash code for this instance. More...
 

Public Attributes

string Name
 The cached name of the property/field. More...
 
Type StorageType
 The type of value that is stored inside of the property. For example, for an int field, StorageType will be typeof(int). More...
 

Properties

MemberInfo MemberInfo [get, set]
 The member info that we read to and write from. More...
 

Detailed Description

A PropertyMetadata describes a discovered property or field in a TypeMetadata.

Constructor & Destructor Documentation

Forge.Utilities.PropertyMetadata.PropertyMetadata ( PropertyInfo  property)

Initializes a new instance of the PropertyMetadata class from a property member.

Forge.Utilities.PropertyMetadata.PropertyMetadata ( FieldInfo  field)

Initializes a new instance of the PropertyMetadata class from a field member.

Member Function Documentation

override bool Forge.Utilities.PropertyMetadata.Equals ( System.Object  obj)

Determines whether the specified object is equal to this one.

bool Forge.Utilities.PropertyMetadata.Equals ( PropertyMetadata  p)

Determines whether the specified object is equal to this one.

override int Forge.Utilities.PropertyMetadata.GetHashCode ( )

Returns a hash code for this instance.

Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
object Forge.Utilities.PropertyMetadata.Read ( object  context)

Reads a value from the property that this property metadata represents, using the given object instance as the context.

void Forge.Utilities.PropertyMetadata.Write ( object  context,
object  value 
)

Writes a value to the property that this property metadata represents, using given object instance as the context.

Member Data Documentation

string Forge.Utilities.PropertyMetadata.Name

The cached name of the property/field.

Type Forge.Utilities.PropertyMetadata.StorageType

The type of value that is stored inside of the property. For example, for an int field, StorageType will be typeof(int).

Property Documentation

MemberInfo Forge.Utilities.PropertyMetadata.MemberInfo
getset

The member info that we read to and write from.


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