Class FastAccess
A helper class for fast access to getters and setters
Inheritance
Namespace: Harmony
Assembly: 0Harmony.dll
Syntax
public class FastAccess : object
Methods
| Improve this Doc View SourceCreateFieldGetter<T, S>(String[])
Creates an getter delegate for a field (with a list of possible field names)
Declaration
public static GetterHandler<T, S> CreateFieldGetter<T, S>(params string[] names)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | names | A list of possible field names |
Returns
| Type | Description |
|---|---|
| GetterHandler<T, S> | The new getter delegate |
Type Parameters
| Name | Description |
|---|---|
| T | Type that getter reads field/property from |
| S | Type of the field/property that gets accessed |
CreateGetterHandler<T, S>(FieldInfo)
Creates an getter delegate for a field
Declaration
public static GetterHandler<T, S> CreateGetterHandler<T, S>(FieldInfo fieldInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | fieldInfo | The field |
Returns
| Type | Description |
|---|---|
| GetterHandler<T, S> | The new getter delegate |
Type Parameters
| Name | Description |
|---|---|
| T | Type that getter reads field from |
| S | Type of the field that gets accessed |
CreateGetterHandler<T, S>(PropertyInfo)
Creates an getter delegate for a property
Declaration
public static GetterHandler<T, S> CreateGetterHandler<T, S>(PropertyInfo propertyInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyInfo | propertyInfo | The property |
Returns
| Type | Description |
|---|---|
| GetterHandler<T, S> | The new getter delegate |
Type Parameters
| Name | Description |
|---|---|
| T | Type that getter reads property from |
| S | Type of the property that gets accessed |
CreateInstantiationHandler<T>()
Creates an instantiation delegate
Declaration
public static InstantiationHandler<T> CreateInstantiationHandler<T>()
Returns
| Type | Description |
|---|---|
| InstantiationHandler<T> | The new instantiation delegate |
Type Parameters
| Name | Description |
|---|---|
| T | Type that constructor creates |
CreateSetterHandler<T, S>(FieldInfo)
Creates an setter delegate for a field
Declaration
public static SetterHandler<T, S> CreateSetterHandler<T, S>(FieldInfo fieldInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| FieldInfo | fieldInfo | The field |
Returns
| Type | Description |
|---|---|
| SetterHandler<T, S> | The new getter delegate |
Type Parameters
| Name | Description |
|---|---|
| T | Type that setter assigns field value to |
| S | Type of the field that gets assigned |
CreateSetterHandler<T, S>(PropertyInfo)
Creates an setter delegate
Declaration
public static SetterHandler<T, S> CreateSetterHandler<T, S>(PropertyInfo propertyInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyInfo | propertyInfo | The property |
Returns
| Type | Description |
|---|---|
| SetterHandler<T, S> | The new setter delegate |
Type Parameters
| Name | Description |
|---|---|
| T | Type that setter assigns property value to |
| S | Type of the property that gets assigned |