Class PropertyProxyExtensions
Provides functionality to access 
Inherited Members
Namespace: Swan
Syntax
public static class PropertyProxyExtensionsMethods
PropertyProxies(Type)
Gets the property proxies associated with a given type.
Declaration
public static Dictionary<string, IPropertyProxy> PropertyProxies(this Type t)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | t | The type to retrieve property proxies from. | 
Returns
| Type | Description | 
|---|---|
| Dictionary<String, IPropertyProxy> | A dictionary with property names as keys and  | 
PropertyProxies<T>(T)
Gets the property proxies associated with the provided instance type.
Declaration
public static Dictionary<string, IPropertyProxy> PropertyProxies<T>(this T obj)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The instance. | 
Returns
| Type | Description | 
|---|---|
| Dictionary<String, IPropertyProxy> | A dictionary with property names as keys and  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The instance type. | 
PropertyProxy(Type, String)
Gets the property proxy given the property name.
Declaration
public static IPropertyProxy PropertyProxy(this Type t, string propertyName)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | t | The associated type. | 
| String | propertyName | Name of the property. | 
Returns
| Type | Description | 
|---|---|
| IPropertyProxy | The associated  | 
PropertyProxy<T>(T, String)
Gets the property proxy given the property name.
Declaration
public static IPropertyProxy PropertyProxy<T>(this T obj, string propertyName)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The instance to extract proxies from. | 
| String | propertyName | Name of the property. | 
Returns
| Type | Description | 
|---|---|
| IPropertyProxy | The associated  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type of instance to extract proxies from. | 
PropertyProxy<T, V>(T, Expression<Func<T, V>>)
Gets the property proxy given the property name as an expression.
Declaration
public static IPropertyProxy PropertyProxy<T, V>(this T obj, Expression<Func<T, V>> propertyExpression)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The object. | 
| Expression<Func<T, V>> | propertyExpression | The property expression. | 
Returns
| Type | Description | 
|---|---|
| IPropertyProxy | The associated  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The instance type. | 
| V | The property value type. | 
ReadProperty<T>(T, String)
Reads the property value.
Declaration
public static object ReadProperty<T>(this T obj, string propertyName)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The instance. | 
| String | propertyName | Name of the property. | 
Returns
| Type | Description | 
|---|---|
| Object | The value obtained from the associated  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type to get property proxies from. | 
ReadProperty<T, V>(T, Expression<Func<T, V>>)
Reads the property value.
Declaration
public static V ReadProperty<T, V>(this T obj, Expression<Func<T, V>> propertyExpression)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The instance. | 
| Expression<Func<T, V>> | propertyExpression | The property expression. | 
Returns
| Type | Description | 
|---|---|
| V | The value obtained from the associated  | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type to get property proxies from. | 
| V | The type of the property. | 
WriteProperty<T>(T, String, Object)
Writes the property value using the property proxy.
Declaration
public static void WriteProperty<T>(this T obj, string propertyName, object value)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The instance. | 
| String | propertyName | Name of the property. | 
| Object | value | The value. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type to get property proxies from. | 
WriteProperty<T, TV>(T, Expression<Func<T, TV>>, TV)
Writes the property value.
Declaration
public static void WriteProperty<T, TV>(this T obj, Expression<Func<T, TV>> propertyExpression, TV value)Parameters
| Type | Name | Description | 
|---|---|---|
| T | obj | The instance. | 
| Expression<Func<T, TV>> | propertyExpression | The property expression. | 
| TV | value | The value. | 
Type Parameters
| Name | Description | 
|---|---|
| T | The type to get property proxies from. | 
| TV | The type of the property. | 
