HHelpers Methods |
The HHelpers type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | ActivateInstanceUsingFirstConstructor |
Creates an instance of the specified type using the first found constructor.
This method only operates on types that are defined inside the Terraria, ReLogic, or XNA assemblies. If the type is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | GetAssembliesInCurrentAppDomain |
Returns an array of all Assemblies which are loaded in the current AppDomain.
This is simply a wrapper for AppDomain.CurrentDomain.GetAssemblies().
|
![]() ![]() | GetFieldValueByReflectionAsDynamic |
Gets the value of a field (using Reflection) as a dynamic object. Useful in working around "type MyType is not the same type as MyType" issues that arise from Assembly location mismatches.
|
![]() ![]() | GetFieldValueWithReflection(FieldInfo, Object) |
Retrieves the value of a field using Reflection. This method may incur considerable performance penalties.
This method only operates on fields that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the field is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | GetFieldValueWithReflection(String, Object) |
Retrieves the value of a field using Reflection. This method may incur considerable performance penalties.
This method only operates on fields that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the field is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | GetFieldValueWithReflection(Type, String, Object) |
Retrieves the value of a field using Reflection. This method may incur considerable performance penalties.
This method only operates on fields that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the field is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | GetPropertyValueWithReflection(PropertyInfo, Object) |
Gets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | GetPropertyValueWithReflection(String, Object) |
Gets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | GetPropertyValueWithReflection(Type, String, Object) |
Gets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | IsTypeInAnyXNAAssembly |
Checks if a type is defined in any loaded XNA assembly.
|
![]() ![]() | IsTypeInReLogicAssembly |
Checks if a type is defined in the proprietary ReLogic assembly.
|
![]() ![]() | IsTypeInTerrariaAssembly |
Checks if a type is defined in the Terraria assembly.
|
![]() ![]() | SetFieldValueWithReflection(FieldInfo, Object, Object) |
Writes the value of a field using Reflection. This method may incur considerable performance penalties.
This method only operates on fields that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the field is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | SetFieldValueWithReflection(String, Object, Object) |
Writes the value of a field using Reflection. This method may incur considerable performance penalties.
This method only operates on fields that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the field is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | SetFieldValueWithReflection(Type, String, Object, Object) |
Writes the value of a field using Reflection. This method may incur considerable performance penalties.
This method only operates on fields that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the field is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | SetPropertyValueWithReflection(PropertyInfo, Object, Object) |
Sets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | SetPropertyValueWithReflection(String, Object, Object) |
Sets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | SetPropertyValueWithReflection(Type, String, Object, Object) |
Sets the value of a property using Reflection. This method may incur considerable performance penalties.
This method only operates on properties that are defined by types inside the Terraria, ReLogic, or XNA assemblies. If the type that owns the property is not defined in the Terraria, ReLogic, or XNA assemblies, an exception is thrown.
|
![]() ![]() | TryGetReLogicType |
Gets the Type specified by its full name from the proprietary ReLogic assembly.
|
![]() ![]() | TryGetTerrariaType |
Gets the Type specified by its full name from the Terraria assembly.
|
![]() ![]() | TryGetXNAType |
Gets the Type specified by its full name from any of the loaded XNA assemblies.
|
![]() ![]() | VerifyTypeForSecureReflectionUse |
Checks if a type is defined in an assembly that is whitelisted for Reflection operations. Terraria, ReLogic, and most of XNA are the only whitelisted assemblies.
|