Click or drag to resize

HHelpers Class

Contains various helper and convenience methods for HPlugins to use.
Inheritance Hierarchy
SystemObject
  com.tiberiumfusion.ttplugins.HarmonyPluginsHHelpers

Namespace:  com.tiberiumfusion.ttplugins.HarmonyPlugins
Assembly:  TTPlugins (in TTPlugins.dll) Version: 1.2.0.1 (1.2.0.1)
Syntax
public static class HHelpers
Request Example View Source

The HHelpers type exposes the following members.

Methods
  NameDescription
Public methodStatic memberActivateInstanceUsingFirstConstructor
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.
Public methodStatic memberGetAssembliesInCurrentAppDomain
Returns an array of all Assemblies which are loaded in the current AppDomain. This is simply a wrapper for AppDomain.CurrentDomain.GetAssemblies().
Public methodStatic memberGetFieldValueByReflectionAsDynamic
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.
Public methodStatic memberGetFieldValueWithReflection(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.
Public methodStatic memberGetFieldValueWithReflection(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.
Public methodStatic memberGetFieldValueWithReflection(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.
Public methodStatic memberGetPropertyValueWithReflection(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.
Public methodStatic memberGetPropertyValueWithReflection(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.
Public methodStatic memberGetPropertyValueWithReflection(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.
Public methodStatic memberIsTypeInAnyXNAAssembly
Checks if a type is defined in any loaded XNA assembly.
Public methodStatic memberIsTypeInReLogicAssembly
Checks if a type is defined in the proprietary ReLogic assembly.
Public methodStatic memberIsTypeInTerrariaAssembly
Checks if a type is defined in the Terraria assembly.
Public methodStatic memberSetFieldValueWithReflection(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.
Public methodStatic memberSetFieldValueWithReflection(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.
Public methodStatic memberSetFieldValueWithReflection(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.
Public methodStatic memberSetPropertyValueWithReflection(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.
Public methodStatic memberSetPropertyValueWithReflection(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.
Public methodStatic memberSetPropertyValueWithReflection(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.
Public methodStatic memberTryGetReLogicType
Gets the Type specified by its full name from the proprietary ReLogic assembly.
Public methodStatic memberTryGetTerrariaType
Gets the Type specified by its full name from the Terraria assembly.
Public methodStatic memberTryGetXNAType
Gets the Type specified by its full name from any of the loaded XNA assemblies.
Public methodStatic memberVerifyTypeForSecureReflectionUse
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.
Top
See Also